[SDL] SDL 1.3 audio API proposal...

Simon Roby simon.roby at gmail.com
Fri Aug 4 19:07:13 PDT 2006


On 8/4/06, Peter Mulholland <darkmatter at freeuk.com> wrote:
> This is not the same thing. This means you can open the sound device
> more than once, so that you can have more than one app running that's
> outputting sound. It is not the same as having your app open the sound
> device and then being able to feed it multiple channels to mix together.

No, I wasn't talking about multiple apps opening the same sound device
at once (though it's naturally a bonus side effect). ALSA really does
support multiple hardware buffers, which it calls "subdevices".

For example my SB Audigy provides 32 subdevices on its "pcm0p" device
node, according to /proc/asound/card0/pcm0p/info. Stepmania (which as
I've previously said is the only app I know of that uses multiple
buffers) opens up 21 of them on startup, according to its stdout
(don't ask me why it opens so many of them though).

OTOH with my on-board AC97 chip there is only one subdevice. Stepmania
then uses a fallback "ALSA9_Software" backend that does software
mixing on a single ALSA subdevice.

Check out the Stepmania source code, all the crazy stuff they do with
ALSA is pretty interesting.
-- 
- SR




More information about the SDL mailing list