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

10
libs/music/shims.d.ts vendored
View File

@ -25,6 +25,16 @@ declare namespace music {
//% weight=76 blockGap=8 shim=music::playTone
function playTone(frequency: int32, ms: int32): void;
/**
* 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 shim=music::stopSounds
function stopSounds(): void;
/** Makes a sound bound to a buffer in WAV format. */
//% shim=music::fromWAV
function fromWAV(buf: Buffer): Sound;