aboutsummaryrefslogtreecommitdiff
path: root/helpers/music_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/music_file.py')
-rw-r--r--helpers/music_file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpers/music_file.py b/helpers/music_file.py
index 5f4fe76..b0e218f 100644
--- a/helpers/music_file.py
+++ b/helpers/music_file.py
@@ -259,7 +259,7 @@ class MusicFile(Machine):
259 self.gain_effects = [] 259 self.gain_effects = []
260 self.set_gain(db_gain) 260 self.set_gain(db_gain)
261 261
262 def stop(self, fade_out=0, wait=False): 262 def stop(self, fade_out=0, wait=False, set_wait_id=None):
263 if self.is_loaded_playing(): 263 if self.is_loaded_playing():
264 ms = int(self.sound_position * 1000) 264 ms = int(self.sound_position * 1000)
265 ms_fo = max(1, int(fade_out * 1000)) 265 ms_fo = max(1, int(fade_out * 1000))
@@ -270,6 +270,8 @@ class MusicFile(Machine):
270 self.current_audio_segment = new_audio_segment 270 self.current_audio_segment = new_audio_segment
271 self.stop_playing() 271 self.stop_playing()
272 if wait: 272 if wait:
273 if set_wait_id is not None:
274 self.mapping.add_wait_id(set_wait_id, self.wait_event)
273 self.wait_end() 275 self.wait_end()
274 else: 276 else:
275 self.stop_playing() 277 self.stop_playing()