WincE Audio Latency

WinCE seems to accept audio latencies less than 1/4 second perfectly
fine. Did a small mod to DIB_OpenAudio in SDL_dibaudio.c :

/* Check the buffer size – minimum of 1/4 second (word aligned) */
#ifndef _WIN32_WCE
if ( spec->samples < (spec->freq/4) )
spec->samples = ((spec->freq/4)+3)&~3;
#endif

I ran into that same latency issue while writing a game under w2k/xp.
250-500ms of latency is unacceptable for most games, so I chopped that code
out too. Of course if you get too agressive and have buffers too small, you
will get choppy sound, but I think that’s an acceptable balancing act that
programmers have to work.

As an aside, does anyone know how to make the win32 directX sound
implementation compile instead of dibaudio? configure didn’t seem to do it.
(using mingw)

Dan.> ----- Original Message -----

From: tsm@accesscomm.ca (Tyler Montbriand)
To:
Sent: Saturday, November 02, 2002 12:09 PM
Subject: [SDL] WincE Audio Latency

WinCE seems to accept audio latencies less than 1/4 second perfectly
fine. Did a small mod to DIB_OpenAudio in SDL_dibaudio.c :

/* Check the buffer size – minimum of 1/4 second (word aligned) */
#ifndef _WIN32_WCE
if ( spec->samples < (spec->freq/4) )
spec->samples = ((spec->freq/4)+3)&~3;
#endif


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

As an aside, does anyone know how to make the win32 directX sound
implementation compile instead of dibaudio? configure didn’t seem to do it.
(using mingw)

This is mentioned in the trouble-shooting section of:
http://www.libsdl.org/extras/win32/mingw32/README.txt===========================================================================
Q: My version of SDL doesn’t have DirectX support!
A: You need to get the DirectX development headers and libraries from:
http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
You need to unpack these in the /mingw directory.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment