Plays music files, currently ogg and wav. In contrast to SoundPlayer,
which is optimized for dealing with lots of short sounds, this facility
is for longer files, which are streamed, rather than loaded. Also in
contrast to SoundPlayer, MusicPlayer can only play one song at a
time.
For ogg files the method setPlayhead() allows clients to move foward
and back within a song as it plays.
|
|
|
play(self,
whatToPlay,
repeats=0,
startTime=0.0,
blockTillDone=False,
volume=None)
Play an .mp3 or .ogg file, or File class instance. |
source code
|
|
|
|
|
pause(self)
Pause either currently playing song, if any. |
source code
|
|
|
|
|
|
float
|
|
|
setPlayhead(self,
secs,
timeReference=1)
Set playhead to 'secs' seconds into the currently playing song. |
source code
|
|
float
|
|
|
getPlayStatus(self)
Return one of PlayStatus.STOPPED, PlayStatus.PLAYING,
PlayStatus.PAUSED to reflect what the player is currently doing. |
source code
|
|
boolean
|
|
boolean
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|