VolumeBooster: Fix error when going back to the default device (#3273)

This commit is contained in:
sadan4 2025-03-21 08:24:03 -04:00 committed by GitHub
parent 94ee0c518a
commit 16910c95ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,7 +136,7 @@ export default definePlugin({
// @ts-expect-error
if (data.sinkId != null && data.sinkId !== data.audioContext.sinkId && "setSinkId" in AudioContext.prototype) {
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId
data.audioContext.setSinkId(data.sinkId);
data.audioContext.setSinkId(data.sinkId === "default" ? "" : data.sinkId);
}
data.gainNode.gain.value = data._mute