Re: [AD] [linux] ALSA detection can hang

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2002-02-11, Martijn Versteegh <m.versteegh@xxxxxxxxxx> wrote:
> 
> I noticed the digital-sound autodetection code for ALSA hangs when
> the pcm device is busy, for example when another program is using it.
> I could trace it back to 
> src/unix/alsa.c:173 :
> 
> if (snd_pcm_open(&handle, card, device, SND_PCM_OPEN_PLAYBACK) == 0) 

Oops, sorry about that.  If you look a bit further down, there's a
similar call, but with a non-block flag. 

Try (SND_PCM_OPEN_PLAYBACK | SND_PCM_OPEN_NONBLOCK) and tell me how
it goes.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/