chore: create AudioContext when it is needed (#12460)
This commit is contained in:

committed by
GitHub

parent
755ca97857
commit
ccb951f11e
@@ -58,6 +58,7 @@ import { useStream } from '@/stream.js';
|
||||
import number from '@/filters/number.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { deepClone } from '@/scripts/clone.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
const name = 'jobQueue';
|
||||
|
||||
@@ -102,7 +103,9 @@ const prev = reactive({} as typeof current);
|
||||
let jammedAudioBuffer: AudioBuffer | null = $ref(null);
|
||||
let jammedSoundNodePlaying: boolean = $ref(false);
|
||||
|
||||
sound.loadAudio('syuilo/queue-jammed').then(buf => jammedAudioBuffer = buf);
|
||||
if (defaultStore.state.sound_masterVolume) {
|
||||
sound.loadAudio('syuilo/queue-jammed').then(buf => jammedAudioBuffer = buf);
|
||||
}
|
||||
|
||||
for (const domain of ['inbox', 'deliver']) {
|
||||
prev[domain] = deepClone(current[domain]);
|
||||
|
Reference in New Issue
Block a user