[plug] Device usage

James Devenish devenish at guild.uwa.edu.au
Tue Aug 17 16:21:16 WST 2004


In message <4121BE39.3020902 at westnet.com.au>
on Tue, Aug 17, 2004 at 04:13:45PM +0800, Garry wrote:
> Specifically, I mean /dev/dsp for sound.
> 
> After I have been using Xine for watching a movie (xvid is a great codec 
> to rip to btw), shut it down then try to use mplayer for an audio 
> stream, mplayer tells me the device is in use. It doesn't always do it..

I think what it likely happening is that Xine is automatically starting
up a "userspace sound daemon" to handle audio. Many applications can
share the use of this daemon, and thus can use your sound device
concurrently. When Xine quits, the daemon is left running. However, it
seems that mplayer wasn't compiled with awareness of your daemon. Thus,
it attempts to access your audio directly rather than via the daemon. I
do not know how to find out what process is using /dev/dsp other than to
use some plain tools like:

% fuser /dev/dsp
7553
% ps p 7553
  PID TTY      STAT   TIME COMMAND
 7553 pts/9    S      0:00 esd

The above implies that my sound daemon is "esd" (and that Gnome has
been taking care of this for me). I could then choose to kill esd
myself (e.g. `pkill esd`). It would also be possible to change my Gnome
preferences to have it /not/ start up automatically. Even better, get a
copy of mplayer that has awareness of esd. Something along these lines
probably applies to your situation, but the specifics will be dependent
on the choices made during installation (e.g. what sound system your
distro prefers, what desktop environment you have chosen, etc.). Oh
dear, seems like I have some Linux-specific knowledge.





More information about the plug mailing list