Threads or suggestion?

Jason Dufair jase at dufair.org
Thu Aug 8 20:50:25 UTC 2002


Thanks for this suggestion as well, as he implements a nice state 
machine that I may liberally borrow from :-)

Magistrello Alejandro (SFA) wrote:

>Hi,
>
>[Suggestion] _  you can check Bob Hartwig's SqueakAmp at
>http://www.bobjectsinc.com/squeakamp
>
>
>hth
>
>Alejandro	
>
>  
>
>>-----Mensaje original-----
>>De:	Jason Dufair [SMTP:jase at dufair.org]
>>Enviado el:	jueves 8 de agosto de 2002 17:02
>>Para:	squeak-dev at lists.squeakfoundation.org
>>Asunto:	Threads or suggestion?
>>
>>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
>>
>>
>>    
>>

-- 
Jason Dufair - jase at dufair.org
http://www.dufair.org/
"Time flies like an arrow. Fruit flies like a banana."
-- Groucho Marx






More information about the Squeak-dev mailing list