修复 bug

This commit is contained in:
eafonyang
2026-06-12 15:58:08 +08:00
parent 56a76e68ef
commit 1b0b447eee
10 changed files with 135 additions and 20 deletions
+15
View File
@@ -6,6 +6,21 @@ export function cloneBands(source: EqBand[]) {
return source.map((band) => ({ ...band }));
}
/** Dev: log decoded syncPeq JSON after EQ page fetches device PEQ state. */
export function logEqSyncPeqDev(source: string, data: PeqState): void {
if (!import.meta.env.DEV) return;
console.log(`[EQ syncPeq] ${source}`, data);
}
export async function fetchEqSyncPeq(
api: { getPeqState: () => Promise<PeqState> },
source: string,
): Promise<PeqState> {
const data = await api.getPeqState();
logEqSyncPeqDev(source, data);
return data;
}
export function buildPeqCatalogSyncKey(
remote: Pick<PeqState, "peq" | "peqSelect"> | null | undefined,
devicePeqSelect?: number,