From 3e0af0815abad307b184f0d2b0c713c5be4a7431 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 21 Sep 2013 18:40:17 -0300 Subject: [PATCH] SDL sound: Reduce considerably sound latency --- sndout_sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sndout_sdl.c b/sndout_sdl.c index 83b3ea2..a7be5ed 100644 --- a/sndout_sdl.c +++ b/sndout_sdl.c @@ -75,7 +75,7 @@ int sndout_sdl_start(int rate, int stereo) desired.callback = callback; desired.userdata = NULL; - samples = rate * 4 * 16 / 1000; + samples = rate >> 6; for (shift = 8; (1 << shift) < samples; shift++) ; desired.samples = 1 << shift; -- 2.39.2