diff --git a/sim/state/sounds.ts b/sim/state/sounds.ts index 1747dee0..ae84fd85 100644 --- a/sim/state/sounds.ts +++ b/sim/state/sounds.ts @@ -43,9 +43,12 @@ namespace pxsim.SoundMethods { } export function stop() { - if (audio) { - audio.pause(); - } + return new Promise(resolve => { + if (audio) { + audio.pause(); + numSoundsPlaying--; + } + }) } }