stop background before foreground (#2174)
This commit is contained in:
		@@ -371,10 +371,10 @@ namespace music {
 | 
				
			|||||||
    //% blockId=device_stop_melody block="stop melody $options"
 | 
					    //% blockId=device_stop_melody block="stop melody $options"
 | 
				
			||||||
    //% parts="headphone"
 | 
					    //% parts="headphone"
 | 
				
			||||||
    export function stopMelody(options: MelodyStopOptions) {
 | 
					    export function stopMelody(options: MelodyStopOptions) {
 | 
				
			||||||
        if (options & MelodyStopOptions.Foreground)
 | 
					 | 
				
			||||||
            beginMelody([], MelodyOptions.Once);
 | 
					 | 
				
			||||||
        if (options & MelodyStopOptions.Background)
 | 
					        if (options & MelodyStopOptions.Background)
 | 
				
			||||||
            beginMelody([], MelodyOptions.OnceInBackground);
 | 
					            beginMelody([], MelodyOptions.OnceInBackground);
 | 
				
			||||||
 | 
					        if (options & MelodyStopOptions.Foreground)
 | 
				
			||||||
 | 
					            beginMelody([], MelodyOptions.Once);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user