[SDL] Audio! More than 5.1?

Greg Lee greg at ling.lll.hawaii.edu
Thu Jan 20 11:41:27 PST 2005

Matt Pelmear wrote:
> Hello all!
> I'm developing a cross-platform (read: linux, osx, windows) audio
> playback program. I need it to support a large number (at least 8) of
> outputs and I've been drawn to SDL because of its portability.
> (surprise!)
> However, after playing around for a little while with the audio
> capabilities of SDL (using SDL_mixer) I've run up across a little
> problem. SDL supports only 1ch, 2ch, 4ch, and 5.1 audio :-)
> (Can you picture the moment when I realized "Oh, that's why I can only
> request 6 channels?!)

The 6 channel support is only for Linux, in case that horrible
realization hasn't yet come to you.

> So here's the question I'm posing to you SDL-experts/audio-gurus:
> How difficult do you think it would be for me to use SDL to produce 8+
> outputs? That is, if I were to access some of the lower-level functions
> directly and rewrite my own functions to go on top of them?

I didn't provide for 8 as well as 6 channel sound for the two
reasons that Linux Alsa does not, so far as I know, have support
for 8 channels on any ordinary consumer sound card (like my Audigy),
and that I have only a 6 speaker system.  So I wouldn't have been
able to test 8 channel sound (having only a Linux system).

However, following the pattern of the 6 channel support I added,
I don't think it would be terribly hard to extend it to 8 channelsi,
given operating system support and hardware to test it on.  Just more
of the same.

> Is there another library out there that I'm not aware of which would
> better suit my needs?

I don't.  Doesn't mean there isn't one.


More information about the SDL mailing list