[SDL] Blocking ALSA
lionsphil at dsl.pipex.com
Tue Apr 13 06:15:15 PDT 2004
I'm using libSDL 1.2.7 on Gentoo. I have SDL_AUDIODRIVER set to "alsa",
and am using the ALSA sound system in kernel 2.6.3. ALSA is set up to
use dmix on the "default" device. As a result, I can play multiple sound
streams from multiple alsaplayers and XMMS happily.
However, SDL appears to engage in blocking behaviour, even though the
changelog shows this being fixed in 1.2.6. For example, if I try to
start FreeCiv (a SDL game) while playing music in XMMS:
ALSA lib pcm_hw.c:1055:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p
failed: Device or resource busy
ALSA lib pcm_dmix.c:812:(snd_pcm_dmix_open) unable to open slave
1: Error calling Mix_OpenAudio
1: Plugin sdl found but can't be initialized.
2: Proceeding with sound support disabled
Conversely, if I start it with nothing else playing, sound works fine,
but other applications are 'locked out' from playing sound. Similar
behaviour is demonstratable with other SDL apps, like BZFlag.
Why does SDL behave this way? Is it by design (Why? It's quite
annoying), or is it a bug?
Philip "LionsPhil" Boulain
More information about the SDL