[MPlayer-dev-eng] audio_out.c question

Mitch Golden mgolden at mitchgolden.com
Wed Mar 22 06:09:58 CET 2006


I am new to this list but I have a question about the code in 
libao2/audio_out.c.  I am running on Linux Fedora Core 4, using KDE.

The situation is this: I checked out the CVS head (about a week ago) and 
built it.  Whenever I play an audio file, I notice that it tries first to 
open the /dev/dsp (OSS driver).  If artsd is running, this fails (and I 
get an annoying popup if I'm running the GUI) and then it opens the alsa 
driver and plays the audio that way.  (For those not on Linux/KDE, you 
should know that artsd auto-suspends when it's not in use for a while, so 
it might or might not be running at any given time.)

This leads to a big problem: If I play something when artsd is *not* 
running, the player will grab /dev/dsp, meaning that artsd can't play 
anything.  Worse yet, if I pause the playback when it's playing through 
OSS, and while it's paused some other application starts up artsd 
(something as simple as a system beep), gmplayer crashes when I unpause 
it.

It seems to me that the fix is trivial: the order in which the drivers are 
listed in audio_out.c is wrong.  The "wrapper-type" drivers are listed 
below the "native" drivers, so the native ones are tried first.  This 
seems to me backwards - you should try wrappers before trying native.

My suggested ordering has artsd first, then alsa, then oss.  Of course 
this is true on my Linux system, and I don't know what should be done with 
some of the others.

Forgive me if this is something that's been discussed before.  If people 
agree with me, I can make a patch.

   - Mitch Golden




More information about the MPlayer-dev-eng mailing list