修复 bug
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user