Threads or suggestion?
Karl Ramberg
karl.ramberg at chello.se
Fri Aug 9 17:51:45 UTC 2002
Jason Dufair wrote:
>
> 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?
If your app has a morphic interface use the morphic stepping mechanism.
Take a look in MPEGMoviePlayerMorph>>step.
Karl
More information about the Squeak-dev
mailing list
|