Threads or suggestion?

Jason Dufair jase at dufair.org
Thu Aug 8 20:01:59 UTC 2002


Hi all -

I poked around for threads in Squeak and didn't find much.  I'm looking 
for suggestions.

I have Playlist object that holds a ReadStream on a collection of (mp3) 
files.  I want to play the stream, song after song.  So I set up a 
StreamingMp3Sound on the first one and tell it to play.  No problem. 
 Now, I want the next one to play when this one is done playing.  I 
don't want to use playAndWaitUntilDone, because operations need to be 
asynchronous (i.e. I may want to pause, go to the next track, etc.).  My 
instinct is to create a thread that monitors the StreamingMp3Sound and 
has the Playlist start the next track when the current track's 
samplesRemaining are 0.  But I can't figure out a way to set up this 
monitoring thread.

Ideas?

-- 
Jason Dufair - jase at dufair.org
http://www.dufair.org/
"Every word is like an unnecessary stain on silence and nothingness."
-- Beckett





More information about the Squeak-dev mailing list