system standard resets audio context

This commit is contained in:
Jade Rowland 2023-12-17 23:15:38 -05:00
parent f45a3933de
commit 48fa04f164
3 changed files with 14 additions and 11 deletions

View file

@ -28,8 +28,8 @@ export const resetLoadedSounds = () => soundMap.set({});
let audioContext;
export const getAudioContext = () => {
if (!audioContext) {
export const getAudioContext = (reset) => {
if (!audioContext || reset) {
audioContext = new AudioContext();
}
return audioContext;