alsa-xmms-user
[Top][All Lists]
Advanced

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

Re: [Alsa-xmms-user] dmix plugin / will it work one day?


From: Steve Leung
Subject: Re: [Alsa-xmms-user] dmix plugin / will it work one day?
Date: Sat, 14 Jun 2003 12:56:56 -0600 (MDT)


On Sat, 14 Jun 2003, Matthieu Sozeau wrote:

> His card has the same behavior (hangs on stop), but i've found something
> interesting: when you switch songs (it closes and reopens the device each
> time), it works most of the time. Can you try that ?

Yes, this seems to work most of the time.  When I wrote the test
program, I noticed that adding the sleep() call made the deadlocking
more consistent.  Forgot to mention that, sorry.. :)

> Also I wonder if it's not related to the use of the rate plugin (which
> converts to 48000Hz for the card). Have you tested any 48000Hz file ?

This doesn't seem to have an effect.

However, I've discovered something interesting:  alsa-xmms seems to
work fine as long as another program keeps the dmix sound device open.

I discovered this by running aplay in the background, then starting
alsa-xmms.  As long as aplay kept the sound device busy, I was able to
stop and start songs whenever I wished, and alsa-xmms never hung.

I've even started two xmms instances (both using dmix) and verified
the same result.  I can start and stop songs in either instance so
long as the other instance is busy playing something.

If I run a program that simply calls snd_pcm_open, then sleeps
forever, then I do not see any hanging in xmms.  This could be
considered yet another (bad) workaround. :)

The reason why switching songs works most of the time may be because
the time between closing and opening the device is so short.  It's
possible that dmix has some kind of 'keepalive' feature that prevents
deadlock.  I suppose that xmms could also be using the same thread to
close and reopen the sound device, which may also prevent hanging.

Steve





reply via email to

[Prev in Thread] Current Thread [Next in Thread]