mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Revert "fix(AudioService): attempt to fix individual audio levels"
This reverts commit 0c79aedc25.
This commit is contained in:
@@ -370,24 +370,17 @@ Singleton {
|
||||
continue;
|
||||
}
|
||||
|
||||
var isNewStream = !_knownAppStreamIds[s.id];
|
||||
currentIds[s.id] = true;
|
||||
|
||||
var key = getAppKey(s);
|
||||
var ov = key ? appVolumeOverrides[key] : null;
|
||||
if (!ov || !s.audio) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// ONLY sync the volume to the override if the stream is NEW.
|
||||
// E.g., a new track starts playing, or Firefox is restarted.
|
||||
if (isNewStream) {
|
||||
if (ov.volume !== undefined && Math.abs(s.audio.volume - ov.volume) > root.epsilon) {
|
||||
s.audio.volume = ov.volume;
|
||||
}
|
||||
if (ov.muted !== undefined && s.audio.muted !== ov.muted) {
|
||||
s.audio.muted = ov.muted;
|
||||
}
|
||||
if (ov.volume !== undefined && Math.abs(s.audio.volume - ov.volume) > root.epsilon) {
|
||||
s.audio.volume = ov.volume;
|
||||
}
|
||||
if (ov.muted !== undefined && s.audio.muted !== ov.muted) {
|
||||
s.audio.muted = ov.muted;
|
||||
}
|
||||
}
|
||||
_knownAppStreamIds = currentIds;
|
||||
|
||||
Reference in New Issue
Block a user