[SDL] SDL_mixer lib questions

Ben Campbell ben.campbell at cyberlife.co.uk
Wed Apr 5 03:27:25 PDT 2000

I've recently started porting some directsound stuff, and have run into
a few questions about the SDL_mixer library:

1) What is the rationale behind the maximum number of channels being set
to 8? Would it be worth adding a function to allow apps to up this

The game I'm hacking about on would probably benefit from more channels.
The original directsound version uses up to 32 channels, each with
stereo panning. On a decent sound card under dsound, I think most of the
mixing is done by the hardware. Even my crappy little no-namebrand
soundcard can mix 8 channels in hardware.

2) Can SDL take advantage of hardware mixing? From looking at the audio
code, it looks like everything is mixed in software.

Actually, I'm not sure if hardware mixing is even such a big win these
days - CPUs are getting pretty zippy. Also, there are a lot of cool
effects you can do with software...

3) Would I be better off just ditching the SDL audio support and just
going to OpenAL?

Probably somewhat overkill for a non-3d sound system, but the API looks
really nice to work with...


Ben Campbell (Antipodean Straggler)
Programmer, Creature Labs
ben.campbell at creaturelabs.com

More information about the SDL mailing list