[BUG][UNIX][FIX] Trying to play sound without sound support in VM stops UI from running

Nyef nyef at softhome.net
Fri Mar 9 19:55:51 UTC 2001


Hello all,

I'm running what looks to be the 3.0final image on a Squeak-3.0pre2
VM on a FreeBSD 4.0-RELEASE system.

For whatever reason, configure decided to build the VM without sound
support.

Anyway, when I bring up the halo on a Morph and hit the X in the top left
corner to make it go away, it stopped everything and started munching CPU
time like crazy. Pressing Alt-. started things up again, though, so it was
less annoying than it could have been.

As it turns out, there's a problem with the no sound code that causes some
of the sound primatives to not fail, which causes a thread at
userInterrputPriority to go into an infinite loop when the system tries to
play a sound (like when you try to destroy a Morph). This, in turn,
prevents the UI thread from getting any time in.

In sqUnixSound.c, line 515 and 516 are as follows:
------------8<------------
int snd_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex)
     FAIL(1)
------------8<------------
Change the FAIL(1) to FAIL(false), and the problem goes away. I'm not sure
how far away, though, or if this fix would cause any other problems...

---------------------------
All programming can be viewed as an exercise.
---------------------------
Alastair Bridgewater
e-mail: nyef at softhome.net





More information about the Squeak-dev mailing list