- def stop(self, music = None, fade_out = 0, **kwargs):
- if music is not None:
- music.stop(fade_out = fade_out)
- else:
- if fade_out > 0:
- pygame.fadeout(int(fade_out * 1000))
- else:
- pygame.mixer.stop()
+ def seek(self, music = None, value = 0, delta = False, **kwargs):
+ for music in self.music_list(music):
+ music.seek(value = value, delta = delta)
+
+ def stop(self, music = None, fade_out = 0, wait = False, **kwargs):
+ previous = None
+ for music in self.music_list(music):
+ if music.is_loaded_paused() or music.is_loaded_playing():
+ if previous is not None:
+ previous.stop(fade_out = fade_out)
+ previous = music
+
+ if previous is not None:
+ previous.stop(fade_out = fade_out, wait = wait)