EsounD?

Lex Spoon lex at cc.gatech.edu
Fri Jan 8 16:23:46 UTC 1999


Chris Reuter <cgreuter at calum.csclub.uwaterloo.ca> wrote:
> 
> 
> Hi all,
> 
> I recently installed EsounD, the Enlightened Sound Daemon on my Linux
> box.  It seems to work and is fairly simple.  It occurs to me that it
> might provide a way to implement sound support under Linux (and other
> PC Unixen) without resorting to threads.
> 
> Web page is at:
> 
>  http://www.tux.org/~ricdude/EsounD.html
> 
> 
> 			--Chris

I checked out EsounD before, and at your prompting checked it out again.  I think using a sound deamon would be a better design, but this particular one doesn't make sound support any easier than writing straight to /dev/dsp would.  

In particular, I couldn't find any support for feedback from the  daemon about how many samples had been played.  Squeak theoretically provides an infinite stream of sound samples, so this kind of buffer control is needed to get Squeak sound working at all.  Furthermore, some sort of insertSamples() would be needed to support Squeak's startPlayingImmediately:.

Perhaps there IS a sound server out there somewhere with enough functionality to meet Squeak's (quite reasonable) requirements.  However, I don't think EsounD is up to it just yet.

But the idea of a server could still be used to get around threads.  If you fork() the  main Squeak process, you could have a process which is dedicated to sound and which talks back to the main process via pipes and signals.  The more I think about this, the simpler it seems.  However, it has a builtin inefficiency: all sound samples must be sent over a pipe to let the server play them, whereas in a threaded version they could be just written straight to the sound device.  I have no idea what this means in practice, though.  Anyone up for trying it and comparing?

It's a tradeoff of simplicity and some efficiency, versus ease on administrators.  Personally, I don't think pthreads is really that harsh of a requirement; if you can download Squeak, can't you download pthreads support?


Lex





More information about the Squeak-dev mailing list