From a9ce0f0fbd0487fe7f327aa2755f8308ee7c9ad8 Mon Sep 17 00:00:00 2001 From: arbee Date: Tue, 21 Oct 2014 00:10:51 -0400 Subject: SDL: experimental rework of buffer size calculation. (nw) --- src/osd/modules/sound/sdl_sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/modules/sound/sdl_sound.c b/src/osd/modules/sound/sdl_sound.c index bbebb6e741a..22f63a67017 100644 --- a/src/osd/modules/sound/sdl_sound.c +++ b/src/osd/modules/sound/sdl_sound.c @@ -489,7 +489,7 @@ static int sdl_init(running_machine &machine) } // compute the buffer sizes - stream_buffer_size = machine.sample_rate() * 2 * sizeof(INT16) * audio_latency / MAX_AUDIO_LATENCY; + stream_buffer_size = (machine.sample_rate() * 2 * sizeof(INT16) * (2 + audio_latency)) / 30; stream_buffer_size = (stream_buffer_size / 1024) * 1024; if (stream_buffer_size < 1024) stream_buffer_size = 1024; -- cgit v1.2.3