stop background before foreground (#2174)

This commit is contained in:
Peli de Halleux 2019-06-10 15:06:56 -07:00 committed by GitHub
parent 3b4c5a2fcb
commit 8389e735fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,10 +371,10 @@ namespace music {
//% blockId=device_stop_melody block="stop melody $options"
//% parts="headphone"
export function stopMelody(options: MelodyStopOptions) {
if (options & MelodyStopOptions.Foreground)
beginMelody([], MelodyOptions.Once);
if (options & MelodyStopOptions.Background)
beginMelody([], MelodyOptions.OnceInBackground);
if (options & MelodyStopOptions.Foreground)
beginMelody([], MelodyOptions.Once);
}
/**