demosys.timers.music.Timer¶
-
demosys.timers.music.
Timer
¶ Timer based on the current position in a wav, ogg or mp3 using pygame.mixer. Path to the music file is configured in
settings.MUSIC
.
Methods¶
-
Timer.
start
()¶ Play the music
-
Timer.
stop
() → float¶ Stop the music
Returns: The current location in the music
-
Timer.
pause
()¶ Pause the music
-
Timer.
toggle_pause
()¶ Toggle pause mode
-
Timer.
get_time
() → float¶ Get the current position in the music in seconds
-
Timer.
set_time
(value: float)¶ Set the current time in the music in seconds causing the player to seek to this location in the file.