[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: No sound with SDL apps



On Thursday 15 April 2004 11:22, you wrote:
> > # export SDL_DEBUG=true
> > # frozen-bubble
> > <debug output>
> >
> > Post  the debug output, and hopefully, we can help.
>
>  there doesnt seem to be any extra debug output
>
> Keir

I get extra debug output, but not much.  Compare unset:
[SDL Init] [Graphics...] [Levels]
Warning: can't initialize sound (reason: No available audio device).
Ready.

to set:
[SDL Init] SDL_SetError: No available audio device
[Graphics...] [Levels]
Warning: can't initialize sound (reason: No available audio device).
Ready.

Not a whole lot, and nothing I don't already know, except when I try to use 
alsa, as you'll see below.

I couldn't get FB to work properly with arts.  I did, however, get it to 
work OK with alsa, dsp, or dma, provided arts wasn't hogging the sound 
device.  If it was, I got a message like this:
[SDL Init] ALSA lib pcm_hw.c:1056:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p 
failed: Device or resource busy
[Graphics...] [Levels]
Warning: can't initialize sound (reason: No available audio device).

Interestingly, when I tried to use SDL with arts, I got a crash:
[SDL Init] [Graphics...] [Levels] Fatal signal: Segmentation Fault (SDL 
Parachute Deployed)

Note that the sound device was found OK, though.

All this leads me to suspect you should be OK using dsp or dma, provided 
nothing is using the sound card.

You said that you got exactly the same error trying the ESD SDL.  Did you 
also set the SDL_AUDIODRIVER environment variable to esd before starting 
FB?

Perhaps you'll get more useful information from lsof.  Try "lsof | less" 
then look for all the device files in use (or grep for /dev/dsp, if you're 
sure that's your audio device).  You should see a line like this:
artsd     1297 jguerin   13u   CHR     116,16              
179597 /dev/snd/pcmC0D0p

if anything has the audio device open.  In my case, arts does.  If anything 
has the audio device open, FB won't be able to play sounds.  Any luck with 
lsof?  You may have to run it as root, if you think a root (or process 
running as any user besides yourself) might have the device open.

Justin

p.s. you might want to reply to the list instead of just me.



Reply to: