Fixed the audio mute method so we can mute and un-mute even when we are not rendering.

--HG--
branch : nfb
This commit is contained in:
Peter
2014-03-21 11:45:23 -07:00
parent a6712c250a
commit 6d772967f1

View File

@@ -1954,12 +1954,20 @@ static bool audioShouldBecomeUnmuted = false;
void audioLimit_Mute(bool onNotOff) { void audioLimit_Mute(bool onNotOff) {
if (onNotOff) { if (onNotOff) {
if (audioIsMuted) return; if (audioIsMuted) {
audioShouldBecomeMuted = false;
audioShouldBecomeUnmuted = false;
return;
}
audioShouldBecomeMuted = true; audioShouldBecomeMuted = true;
audioShouldBecomeUnmuted = false; audioShouldBecomeUnmuted = false;
} }
else { else {
if (!audioIsMuted) return; if (!audioIsMuted) {
audioShouldBecomeMuted = false;
audioShouldBecomeUnmuted = false;
return;
}
audioShouldBecomeMuted = false; audioShouldBecomeMuted = false;
audioShouldBecomeUnmuted = true; audioShouldBecomeUnmuted = true;
} }