summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2017-06-25 07:55:14 -0400
committer GitHub <noreply@github.com>2017-06-25 07:55:14 -0400
commit10f74bb2feb6b60a23110787a564dbd2de9c7d1f (patch)
treee8bb86cf13975a963ca8e0c9eb3c90ab4dbdfd11
parent319eb61d0fec64eca6ee72eb824e0531fac552ba (diff)
parent9788f622e2f76c0487e5f0c430e92be75be991ea (diff)
Merge pull request #2409 from 057a3dd61f99517a3afea0051a49cb27994f94d/sdl-callback-fix
Fix sound_sdl::sdl_callback, fill buffer with silence when underflow.
-rw-r--r--src/osd/modules/sound/sdl_sound.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osd/modules/sound/sdl_sound.cpp b/src/osd/modules/sound/sdl_sound.cpp
index 6ea3af913d9..ad38fab4bab 100644
--- a/src/osd/modules/sound/sdl_sound.cpp
+++ b/src/osd/modules/sound/sdl_sound.cpp
@@ -359,6 +359,7 @@ static void sdl_callback(void *userdata, Uint8 *stream, int len)
if (LOG_SOUND)
fprintf(sound_log, "Underflow at sdl_callback: SPP=%d SBI=%d(%d) Len=%d\n", (int)thiz->stream_playpos, (int)sb_in, (int)thiz->stream_buffer_in, (int)len);
+ memset(stream, 0, len);
return;
}
else if ((thiz->stream_playpos+len) > thiz->stream_buffer_size)