From 5912fc0a5b0d1bca7457e4e0377aff300f25612b Mon Sep 17 00:00:00 2001 From: arbee Date: Mon, 20 Oct 2014 22:10:30 -0400 Subject: Tell SDL to stop sound when volume is set to max attenuation. (nw) --- src/osd/modules/sound/sdl_sound.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); + } } //============================================================ -- cgit v1.2.3