Add sounds (only simulator for now)
This commit is contained in:
17
libs/music/shims.d.ts
vendored
17
libs/music/shims.d.ts
vendored
@ -24,6 +24,23 @@ declare namespace music {
|
||||
//% blockNamespace=music
|
||||
//% weight=76 blockGap=8 shim=music::playTone
|
||||
function playTone(frequency: int32, ms: int32): void;
|
||||
|
||||
/** Makes a sound bound to a buffer in WAV format. */
|
||||
//% shim=music::fromWAV
|
||||
function fromWAV(buf: Buffer): Sound;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//% fixedInstances
|
||||
declare interface Sound {
|
||||
/** Returns the underlaying Buffer object. */
|
||||
//% property shim=SoundMethods::buffer
|
||||
buffer: Buffer;
|
||||
|
||||
/** Play sound with given volume. */
|
||||
//% promise shim=SoundMethods::play
|
||||
play(volume: int32): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
||||
|
Reference in New Issue
Block a user