if previous is not None:
previous.stop(fade_out=fade_out)
previous = music
+ else:
+ music.stop(fade_out=fade_out)
if previous is not None:
previous.stop(fade_out=fade_out, wait=wait)
self.master_volume)
for music in self.open_files.values():
+ if not (music.is_loaded_playing() or music.is_loaded_paused()):
+ continue
+
if fade > 0:
music.gain_effects.append(GainEffect(
"fade",
]
Machine.__init__(self, states=states,
- transitions=transitions, initial='initial')
+ transitions=transitions, initial='initial',
+ ignore_invalid_triggers=True)
self.volume = 100
self.mapping = mapping