[squeak-dev] Squeak sound on Unix; potential improvement found in old code

tim Rowledge tim at rowledge.org
Tue Mar 28 00:04:46 UTC 2017


The particular attraction of this old Lex-code is getting the ‘insertSample…’ stuff working so that low-latency response to playing sounds on the keyboard morph becomes functional. I had a teacher in France trying to use Scratch on a Pi to play music and we simply couldn’t get the latency down to a tolerable level because you end up with an average of slightly over half the SoundPlayer buffer length of delay. It was possible to improve things a bit with a smaller buffer but then the sound rapidly gets to break up levels of choppiness. Not good for playing music…

A related and possibly improvable issue is that setting the ‘stop sounds when there is nothing to play’ preference causes long delays in HDMI sound output because (apparently, according to RPF) the hardware level player has to restart.  Maybe there is nothing we can do beyond not using that preference, but I know little about sound and unix.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Suffers from permanent rapture of the deep.  (Nitrogen narcosis.)





More information about the Squeak-dev mailing list