[squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on

osp at aloha.com osp at aloha.com
Tue Aug 4 13:33:10 UTC 2009


> On 04.08.2009, at 21:51, David Corking wrote:
> 
> > Bert Freudenberg wrote:
> >
> >> Only if someone can think of a way to reliably detect the problem.
> > ...
> >> (PulseAudio) is what appears to break Squeak sound, because it works
> >> fine on "real ALSA" but breaks on "emulated ALSA".
> >
> > Oh, I had hoped the workaround would be an effective fallback for
> > everyone on Debian derivatives.  I bet the lack of native ALSA is far
> > from trivial to detect in a shell script :(
> 
> Yes, but detecting active pulseaudio is simpler. See my comment on
> 
> http://tracker.squeakland.org/browse/SQ-214
> 
> >> OSS is obsolete. It's not supported out-of-the-box on most modern  
> >> Linux
> >> distros anymore. If at all, it is provided by an emulation layer like
> >> alsa-oss which adds considerable delay. We would get Squeak talking  
> >> to OSS
> >> talking to emulated ALSA talking to PulseAudio talking to real  
> >> ALSA. No
> >> wonder there is delay in that.
> >
> > I haven't done any testing - is the delay noticeable?
> 
> We tried it in SoaS on an Intel Classmate in Mexico today. First using  
> the alsa-oss wrapper which had an awful delay. Then using the padsp  
> wrapper, much better, but still with a slight delay.
> 
> > The OSS API
> > (via emulation layers) is not obsolete, and OSS is still the standard
> > on BSD.
> 
> You are right - but since in many Linux distros it is not pre- 
> installed anymore (not even the emulation wrapper) we cannot rely on  
> it. Likewise, it is not on the OLPC XO (which actually prompted doing  
> the ALSA driver).
> 
> > 10 years ago, ALSA was the next big thing.  Now, ALSA is fading away,
> > and OSS and /dev/dsp , with all their flaws, are still here.
> 
> ALSA seems to still be the low-level interface of choice. It's just  
> that PulseAudio is trying to virtualize it, breaking some code.
> 
> >> Here is an overview of the various Linux sound APIs:
> >>
> >> http://0pointer.de/blog/projects/guide-to-sound-apis.html
> >
> > (great guide - thanks -  and the author admits his bias too!  I also
> > enjoyed the linked article:  http://lwn.net/Articles/299211/  and
> > comments)
> >
> > Given that so many distros have already gone to PulseAudio, Lennart
> > makes a pretty convincing case for the Linux VM to move towards a
> > "PulseAudio-safe" subset of the ALSA API.  Thanks for your patience
> > with me.
> 
> 
> Well, the code is here if you want to try:
> 
>
http://squeakvm.org/svn/squeak/trunk/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c
> 
> - Bert -

On my FreeBSD desktop Dell GX280 running FreeBSD 7.1, I get a 0.5 sec delay
between clicking on a key on the piano keyboard and the start of sound
event. Just good enough for toy, much too long for anything serious.
Doesn't sound like a piano, either, more like a pipe organ set to reed pipes.

Although FreeBSD uses the OSS API, most the the code has been replaced with
 better stuff. Definitly NOT obsolete. Other APIs are layered on top of
this, which adds delays.
 
Two small related items:

"Pulseaudio doesn't work !"
http://lists.freebsd.org/pipermail/freebsd-multimedia/2007-July/007194.html

"FreeBSD's sound system lineage...."
http://forums.freebsd.org/archive/index.php/t-2613.html

Gary Dunn
Open Slate





More information about the Squeak-dev mailing list