Read default volume from device settings at start (#987)

This commit is contained in:
Maciej Mroziński
2020-09-09 21:06:33 +02:00
committed by GitHub
parent 40aaf0fb18
commit a157943bf7
5 changed files with 50 additions and 3 deletions

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

@ -13,6 +13,16 @@ declare namespace music {
//% weight=1 shim=music::setVolume
function setVolume(volume: int32): void;
/**
* Return the output volume of the sound synthesizer.
*/
//% weight=96
//% blockId=synth_get_volume block="volume"
//% parts="speaker" blockGap=8
//% help=music/volume
//% weight=1 shim=music::volume
function volume(): int32;
/**
* Play a tone through the speaker for some amount of time.
* @param frequency pitch of the tone to play in Hertz (Hz), eg: Note.C