Squeak 2.1/Linux/sound!

Kevin Fisher kfisher at rim.net
Tue Aug 18 12:52:13 UTC 1998


Hi all!
 
First I just want to thank Ian Piumarta for making Squeak 2.1 for UNIX 
available...thanks!  It works great!

Has anyone been working with the sqUnixSound.c patch for Linux systems?  I 
compiled the patch into Squeak and found some strange results.  If I open a 
Morphic project and bring up something that makes sounds (like the parts bin) 
I get sporadic sound behaviour.  Specifically, if I 'flip' a page in the parts 
bin, I will get the flipping sound.  If I flip it again, I get an error:

'subscript is out of bounds: 8817'.

This occurs during the critical section in the SoundPlayer class>>
startPlayingImmediately method:

....
PlayerSemaphore critical: [
	"insert as many samples as possible into the sound driver's buffers"
	
....

1 to 2 * leftover do:
	[:dst | Buffer at: dst put: (buf at: (src := src + 1))].

....
			]


Specifically the out-of-bounds condition happens during the Buffer at:put:
in the above block, dst is the variable in question going out of bounds.

Finally, a third flip will cause the VM to hang waiting for a semaphore (which 
can be stopped with alt-. ).

I'm going to try to debug this, but before I jump headlong into it I was 
wondering if anyone else had seen this / debugged it already.  I'm going to
look at the sqUnixSound.c as well, perhaps the problem isn't even in
Smalltalk!  I'm not much of an OSS/Lite sound guru, but I guess you gotta start
somewhere.

(PS--have any Linux Squeakers out there considered trying ALSA instead of
the OSS/Lite drivers?) 





More information about the Squeak-dev mailing list