[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] cd
Howzabout
tracks = [2,5,7]
track_index = 0
if CD.get_busy() = False:
CD.play(tracks[track_index])
if track_index < len(tracks):
track_index += 1
else:
track_index = 0
On Thu, 24 Feb 2005 08:45:38 +0100, gen2n <gen2n@xxxxxxxxx> wrote:
> I thing this would stop the script.
> Is it possible to play it on a background, as the simple CD.play(1) would
> do?
>
>
> gen2n ICQ 176015287
>
> Bob the Hamster napsal(a):
> On Wed, Feb 23, 2005 at 03:31:12PM +0100, gen2n wrote:
> I tried to play some tracks from my CD using: for track in 2,5,7:
> CD.play(track) It doesnt work. It plays only the last one (7), all the
> previous are always interrupted but the next track. Could it be somehow
> solved inside pygame without need of threading modul? Pavel CD.play starts
> the track playing and then returns instantly. It does not wait for the track
> to finish. You probably want something like this: for track in 2,5,7:
> CD.play(track) while CD.get_busy(): time.wait(1000) Hope that helps! --- Bob
> the Hamster
--
Andrew Ulysses Baker
"failrate"