out_data[:] = audio_segment.ljust(len(out_data), b'\0')
+ def seek(self, value = 0, delta = False):
+ # We don't want to do that while stopping
+ if not (self.is_loaded_playing() or self.is_loaded_paused()):
+ return
+ with self.music_lock:
+ self.current_frame = max(0, int(delta) * self.current_frame + int(value * self.audio_segment.frame_rate))
+
def stop(self, fade_out = 0, wait = False):
if self.is_loaded_playing():
ms = int(self.sound_position * 1000)