Compare commits

..

1 Commits

Author SHA1 Message Date
cda8c40195 test: allow mute state updates while audio subsystem is disabled 2025-07-28 20:48:13 -05:00

View File

@@ -140,15 +140,14 @@ impl Audio {
///
/// If audio is disabled, this function does nothing.
pub fn set_mute(&mut self, mute: bool) {
if self.disabled {
return;
if !self.disabled {
let channels = 4;
let volume = if mute { 0 } else { 32 };
for i in 0..channels {
mixer::Channel(i).set_volume(volume);
}
}
let channels = 4;
let volume = if mute { 0 } else { 32 };
for i in 0..channels {
mixer::Channel(i).set_volume(volume);
}
self.muted = mute;
}