Add 'stopAllSounds' block

This commit is contained in:
Caitlin Hennessy
2017-12-13 16:31:42 -08:00
parent 14f57f54bf
commit 2d81be3b24
5 changed files with 35 additions and 1 deletions

View File

@ -163,6 +163,18 @@ void playTone(int frequency, int ms) {
sleep_ms(1);
}
/**
* Play a tone through the speaker for some amount of time.
*/
//% help=music/stop-sound
//% blockId=music_stop_sounds block="stop all sounds"
//% parts="headphone" async
//% blockNamespace=music
//% weight=76 blockGap=8
void stopSounds() {
_stopSound();
}
/** Makes a sound bound to a buffer in WAV format. */
//%
Sound fromWAV(Buffer buf) {