Re: esound and playing mp3's ?



On Sun, 10 Jan 1999, Ronald de Man wrote:

> I think one of the reasons that esd doesn't close /dev/dsp when no sound
> is being played, is that starting and stopping the DMA often produce
> a click. And I don't think it's possible for esd to detect that another
> process is trying to open the device.

DMA:  Hmn.  I don't know about that.  If that's the case, there _ought_ to be
a workaround (dwiddle the mixer volume for a few dozen nanoseconds while you
init DMA or the like), but I'm not enough of a coder to know for sure.

And the solution I'm talking about wouldn't involve esd needing to know that
another program were trying to open a device -- esd would open the dsp, play,
close it, and be out of the way for other programs to play with it.

> Start the app with
> 
>   esddsp app
> 
> Or put that in a one-line wrapper script yourself.

The original context of this paragraph was the newbie who installs his
distribution that defaults to esd, and then installs some non-esd-compliant
program from RPM, say.  And it doesn't work, and said newbie doesn't know or
care to know about workarounds, command lines, or scripts.  And can't spell
FAQ.  Don't think it won't happeni, more and more....

> > And now we're back to 'you must be esd-compliant or else you face lesser
> > performance.'  Not OK.
> 
> You must be esd-compliant or face lesser performance or not use esd.

(*nod)  Right, exactly.  Which is the least of the three evils?

> So at a professional level you either have to use applications developed
> for esd, or not use esd at all. If you want a sound daemon that takes
> audio from multiple sources and plays it through a single sound card,
> and has to work with existing applications, how can you avoid a small
> latency?

'Small' is a relative term.  I don't have any actual numbers on esd, so my
comparison to MMSYSTEM may be less than fair (or may not be), but for
professional applications, sample-level synchronization is a sine qua non.
1/44100 or 1/48000 of a second is the MAXIMUM, and higher-end audio is now
running at 96K sample rates, so 1/96000 of a second will soon be the maximum
latency.  That's about 100 microseconds, for those of you keeping score at
home...  ;-)  So, a 10ms delay between trying to play a sound and hearing it
is roughly two orders of magnitude too long.  For comparison's sake, MMSYSTEM
originally could only guarantee a maximum _250_ ms latency -- up to 1/4
second.

But this half of the conversation is getting more and more off-topic.  For
this list, just the 'how to make esd play nice' half seems correct.

-- 
----------------------------------------------------------------
R Pickett                Look around you. This is what the world
emerson@hayseed.net      looks like at the end of the millenium.
----------------------------------------------------------------



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