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:
(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/sqUnixSoun...
- Bert -