Closed klausw closed 3 years ago
This seems to be a race condition, stopping and immediately restarting a melody replaces the playingMelodies entry and the MelodyPlayer, but the first instance's playCore then unexpectedly calls unregisterMelody() while playing, leaving the melody in an unstoppable state.
PR https://github.com/microsoft/pxt-common-packages/pull/1196 fixes it for me, but I'm not sure if that's the correct way to handle it.
Describe the bug The
music.stopAllSounds()
method doesn't consistently stop sounds from playing.To Reproduce Steps to reproduce the behavior:
Expected behavior Music should stop playing, the B button event handler calls
music.stopAllSounds()
Desktop (please complete the following information):
I've confirmed this behavior both in the Arcade simulator and on an Adafruit PyGamer. @mmoskal FYI since you've been working on the sound code.