优化 peq 流程

This commit is contained in:
eafonyang
2026-09-20 13:58:32 +08:00
parent b606e7ad4d
commit cc818fe26e
6 changed files with 556 additions and 343 deletions
+2 -2
View File
@@ -196,7 +196,7 @@ export function DeviceProvider({ children }: { children: React.ReactNode }) {
applyPeqFiltersToState(payload.peqChange.filters);
return;
}
if (!api) return;
if (!api) throw new Error("EQ unavailable");
await api.upgradePeqChange(payload);
applyPeqFiltersToState(payload.peqChange.filters);
}, [api, isDemoMode, applyPeqFiltersToState]);
@@ -207,7 +207,7 @@ export function DeviceProvider({ children }: { children: React.ReactNode }) {
applyPeqFiltersToState(payload.peqApply.filters);
return;
}
if (!api) return;
if (!api) throw new Error("EQ unavailable");
await api.upgradePeqApply(payload);
applyPeqFiltersToState(payload.peqApply.filters);
}, [api, isDemoMode, applyPeqFiltersToState]);