aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helpers/music_file.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/helpers/music_file.py b/helpers/music_file.py
index a972bc5..9976306 100644
--- a/helpers/music_file.py
+++ b/helpers/music_file.py
@@ -115,6 +115,9 @@ class MusicFile:
115 debug_print("Loaded « {} »".format(self.name)) 115 debug_print("Loaded « {} »".format(self.name))
116 116
117 def on_enter_loaded(self): 117 def on_enter_loaded(self):
118 self.cleanup()
119
120 def cleanup(self):
118 self.gain_effects = [] 121 self.gain_effects = []
119 self.set_gain(0, absolute=True) 122 self.set_gain(0, absolute=True)
120 self.current_audio_segment = None 123 self.current_audio_segment = None
@@ -136,6 +139,7 @@ class MusicFile:
136 def trigger_stopped_events(self): 139 def trigger_stopped_events(self):
137 self.mixer.remove_file(self) 140 self.mixer.remove_file(self)
138 self.wait_event.set() 141 self.wait_event.set()
142 self.cleanup()
139 143
140 # Actions and properties called externally 144 # Actions and properties called externally
141 @property 145 @property