using audio context manager function (#243)
* using audio context manager function * updated pxt reference * trigger build
This commit is contained in:
@ -291,6 +291,9 @@ namespace music {
|
||||
export function playSoundEffect(sound: Sound) {
|
||||
if (!sound || numSoundsPlaying >= soundsLimit) return;
|
||||
numSoundsPlaying++;
|
||||
control.runInBackground(() => {sound.play(); numSoundsPlaying--;});
|
||||
control.runInBackground(() => {
|
||||
sound.play();
|
||||
numSoundsPlaying--;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user