refactor(eq): 更新EQ页面以优化预设缓存和滤波器管理
- 添加实时滑块预览状态以改善用户体验 - 重构预设缓存逻辑,使用新的PeqPresetLocalCache类型管理滤波器和增益设置 - 更新相关函数以支持新的预设缓存机制,减少重复计算 - 增强滤波器持久化逻辑,确保在耳机切换时正确保存和应用滤波器设置
This commit is contained in:
@@ -52,6 +52,13 @@ export const DEFAULT_BANDS = [
|
||||
/* ── PEQ catalog item type ── */
|
||||
export type PeqCatalogItem = NonNullable<PeqState["peq"]>[number];
|
||||
|
||||
/** 本地编辑缓存(按预设名称);syncPeq 拉取时优先于设备 catalog */
|
||||
export type PeqPresetLocalCache = {
|
||||
filters?: PeqFilter[];
|
||||
preamp?: number;
|
||||
autoPre?: number;
|
||||
};
|
||||
|
||||
/* ── Flat preset filters ── */
|
||||
export const FLAT_PRESET_FILTERS: PeqFilter[] = [
|
||||
{ type: 4, fc: 80, gain: 0, q: 0.1 },
|
||||
|
||||
Reference in New Issue
Block a user