From: Paul Cercueil Date: Sat, 21 Sep 2013 21:40:17 +0000 (-0300) Subject: SDL sound: Reduce considerably sound latency X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0af0815abad307b184f0d2b0c713c5be4a7431;p=libpicofe.git SDL sound: Reduce considerably sound latency --- 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;