fix: propagate audio settings from local storage and add compressor feedback

This commit is contained in:
Timo
2026-06-13 04:48:25 +02:00
parent 6ba5e1b10b
commit 10fdaa23fc
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1821,7 +1821,7 @@ async function handleAsyncMessage(message, sender, sendResponse) {
}
chrome.storage.onChanged.addListener(async (changes, area) => {
if (area !== 'sync' || !changes.audioSettings) return;
if (area !== 'local' || !changes.audioSettings) return;
await ensureState();
if (!currentTabId) return;
+3 -1
View File
@@ -184,7 +184,7 @@
}
}
if (audioCtx.state === 'suspended') {
audioCtx.resume().catch(() => {});
audioCtx.resume().catch(() => { reportLog('AudioContext resume failed - browser may need page interaction first', 'warn'); });
}
return audioCtx;
}
@@ -242,6 +242,7 @@
rampGain(chain.dryGain, 1, t);
rampGain(chain.compGain, 0, t);
chain.active = false;
reportLog('Audio compressor disabled', 'info');
}
function bypassCurrentAudioProcessing() {
@@ -274,6 +275,7 @@
rampGain(chain.dryGain, 0, t);
rampGain(chain.compGain, 1, t);
chain.active = true;
reportLog('Audio compressor enabled', 'info');
}
}