mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-06 09:27:44 +00:00
fix: propagate audio settings from local storage and add compressor feedback
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user