Squeak... No Sound

Lex Spoon lex at cc.gatech.edu
Wed Jan 21 03:08:26 UTC 1998


Joe Novosel writes:
 > > 
 > > > I don't seem to be very lucky with Squeak 1.3, on both Windows 95 
 > > > (several ones) and Linux.
 > > 
 > > The Unix ports don't support sound at all.  There are so many different
 > > ways of doing it on Unix boxes that implementing it would be a nightmare.
 > > 
 > > I once tried to do it using NetAudio, but after failing to make the
 > > server run reliably on Linux (and seeing similar reports all over the
 > > relevant newgroups) I gave up.
 > > 
 > > If anyone wants to volunteer to implement _portable_ sound for Unix,
 > > please press the "reply" button now...  ;)
 > > 
 > > Ian
 > > 
 > > 
 > Look at: http://www.4front-tech.com/
 > They have a set of drivers that work with most unix implementations
 > (including Linux).  All drivers share a common API.  (RealAudio for Unix
 > uses the oss API.)
 > This might be the best bet for Squeak to have sound on unix systems.



I've actually hacked some code together to support this API on Linux
Squeak.  You can check it out at:

    http://www.cc.gatech.edu/~lex/squeak


It works for 1.21 and 1.23.  If the sound primitives are the same in
1.3, then it should work there, too.

Now, this code is only for playback, and it's not asynchronous, but it
works well enough to play the examples and such.  Recording isn't
implemented, because the image currently requires asynchronous
recording and I don't know how to do it.  (I know, set a signal to get
called when data arrives, and in the signal handler signal Squeak's
semaphore.  But how do you get the signal to be called to start with?)

By the way, I copied the wrong 1.23 file to the above URL; I've fixed
it, but due to the annoying way web pages are done here the corrected
version won't show up until 6am tomorrow.  If you are in a big hurry,
then you can get the C file tonight from:

    http://chaos.resnet.gatech.edu:8000/~lex/squeak/sqLinuxSound.c.1.23

(this is a very flaky site)


Lex





More information about the Squeak-dev mailing list