diff --git a/Engine/src/shared/audio.ts b/Engine/src/shared/audio.ts index dab061b..9b43653 100644 --- a/Engine/src/shared/audio.ts +++ b/Engine/src/shared/audio.ts @@ -90,6 +90,12 @@ export function playSong(name: string) { } } +export function stopSong() { + if (playingSongAudio && !playingSongAudio.paused) { + playingSongAudio.pause() + } +} + export function playSound(name: string, volume: number): HTMLAudioElement|undefined { if (!enabled) return let s = audioCache.pop()