From 8389e735fa46453ab41e68bf9b3c67ad76f5cfec Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 10 Jun 2019 15:06:56 -0700 Subject: [PATCH] stop background before foreground (#2174) --- libs/core/music.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/core/music.ts b/libs/core/music.ts index c2837e24..a7e3c6f2 100644 --- a/libs/core/music.ts +++ b/libs/core/music.ts @@ -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); } /**