Audio fragment size

I just realized that there isn’t any explicit documentation on what
value to use for the ‘samples’ member of the SDL_AudioSpec.

For operating systems with a 10 ms timeslice, you need at least 128
samples for 11025 Hz, 256 for 22050 Hz, and 512 for 44100 Hz. I usually
recommend that SDL developers use a fragment size of four times that,
or 1024 at 22050 Hz, which gives an average audio latency of about 50
ms, which is generally plenty for games.

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

For operating systems with a 10 ms timeslice, you need at least 128
samples for 11025 Hz, 256 for 22050 Hz, and 512 for 44100 Hz. I usually
recommend that SDL developers use a fragment size of four times that,
or 1024 at 22050 Hz, which gives an average audio latency of about 50
ms, which is generally plenty for games.

FWIW, I couldn’t get steady audio unless I used 2048 samples under Windows
or FreeBSD. But then again, that was with 1.2.3. Has 1.2.4 made any tweaks
in this regard?

–>Neil-------------------------------------------------------------------------------
Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me