diff options
author | arbee <rb6502@users.noreply.github.com> | 2014-10-20 22:10:30 -0400 |
---|---|---|
committer | arbee <rb6502@users.noreply.github.com> | 2014-10-20 22:10:30 -0400 |
commit | 5912fc0a5b0d1bca7457e4e0377aff300f25612b (patch) | |
tree | adeafc402aace42f6a6ec02aa05e135acc6b6121 | |
parent | 8482a70a1e53320080b8ac4546e74faa2deee374 (diff) |
Tell SDL to stop sound when volume is set to max attenuation. (nw)
-rw-r--r-- | src/osd/modules/sound/sdl_sound.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osd/modules/sound/sdl_sound.c b/src/osd/modules/sound/sdl_sound.c index 0f92a1e779c..bbebb6e741a 100644 --- a/src/osd/modules/sound/sdl_sound.c +++ b/src/osd/modules/sound/sdl_sound.c @@ -355,6 +355,15 @@ void sound_sdl::set_mastervolume(int _attenuation) _attenuation = -32; attenuation = _attenuation; + + if ((attenuation == -32) && (stream_in_initialized)) + { + SDL_PauseAudio(1); + } + else if (stream_in_initialized) + { + SDL_PauseAudio(0); + } } //============================================================ |