|
Examples
If you have any trouble with the examples below, please leave a comment about it, and I or another user will be glad to help you out. Quick referencemp3play.load(filename) or mp3play.AudioClip(filename) gives an AudioClip representing the file. AudioClip methods:
Simplest examplePlay an MP3 for 30 seconds. import mp3play filename = r'C:\Documents and Settings\Michael\Desktop\music.mp3' mp3 = mp3play.load(filename) mp3.play() # Let it play for up to 30 seconds, then stop it. import time time.sleep(min(30, mp3.seconds())) mp3.stop() |
► Sign in to add a comment
print clip
print clip.isplaying()One seconds later, another thread: print clip print clip.isplaying() False
what is these problem?