[vorbis-dev] optimization to libao audio output autodetection code

David Walser luigiwalser at yahoo.com
Mon Jul 14 02:26:48 PDT 2003



--- Stan Seibert <volsung at mailsnare.net> wrote:
> Hi, just wanted to let you know that this patch is
> in CVS.  For a second
> I thought I had found some sort of implementation
> issue, but it turned
> out to be a mostly bizarre set of circumstances.
> 
> Apparently the Mandrake version of esd has been
> patched to output
> through arts (yes, very weird), so when I was

yeah, I knew that, didn't know it could be an issue
this big.  It's the reason aRts was given a higher
priority (aka try it first) than esd.

> testing your plugins to
> see if the esd plugin would pass on detection if it
> wasn't holding the
> device, I found that there was a 20 second gap where
> libao would fail to
> find any device.  I thought this was most bizarre,
> until I realized that
> when I used esd purposely (to make it grab the
> device), the following
> happened:
> 
> * esd opened arts connection
> * arts opened alsa device
> * wait 10 seconds:
> * esd releases "audio device" (really connection to
> arts)
> If I try to get the default device here, it failed
> because esd said
> "nope, I don't have the device open" and alsa said
> "nope, I can't open
> the device".  As it turns out, I hadn't built the
> arts plugin.  :)
> * wait 20 more seconds.
> * arts releases the device

Yeah I hadn't thought of not building the aRts plugin.
 I was discussing something else on the Mandrake
Cooker mailing list, a problem I was seeing with libao
only on current Cooker, and he couldn't reproduce it,
turns out only until he built the aRts plugin.  The
problem we're seeing on Cooker is if aRts has the
sound device open, and you let libao do its
autodetection (this is with or without my patch) you
get a segfault.  Tell it explicitly to use aRts and
it's fine.  It seems to die (just watching ltrace)
inside a pthreads call, and I suspect glibc to the
problem, but don't know for sure.  I need to figure
out a way to build libao as a static library and link
it into mpg321 and build it all with -g to see if gdb
can help me, unless you have any better ideas.

> Anyway, not really a problem with your patch since
> for those 20 seconds
> there really isn't any device I can use without the
> arts plugin.  Just
> thought you might be interested in knowing how
> tangled all these audio
> APIs can get.  :)
> 
> Thanks again for the patch.

No problem, thanks for committing it.  I hear you've
committed a NAS plugin too, I'm wondering how it fits
into all of this.

> ---
> Stan Seibert

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list