summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2014-10-21 00:10:51 -0400
committer arbee <rb6502@users.noreply.github.com>2014-10-21 00:11:30 -0400
commita9ce0f0fbd0487fe7f327aa2755f8308ee7c9ad8 (patch)
tree4a94dc00c8e5d74e7ecdb97f8fc217211423dcc0
parentce2ff23fe090200b9b311807856ec8f791be13fc (diff)
SDL: experimental rework of buffer size calculation. (nw)
-rw-r--r--src/osd/modules/sound/sdl_sound.c2
1 files changed, 1 insertions, 1 deletions
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;