From edd5322503eb9c2d23d384f30edd6c9e8fb26ba8 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Wed, 11 Mar 2026 00:10:25 +0100 Subject: [PATCH] fix(assets): try to fix audio delay --- app/composables/useAssets.ts.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/composables/useAssets.ts.in b/app/composables/useAssets.ts.in index fedbdcb..41c986d 100644 --- a/app/composables/useAssets.ts.in +++ b/app/composables/useAssets.ts.in @@ -41,7 +41,12 @@ const createAudio = (path: string) => { const node = audioContext.createBufferSource(); node.buffer = buffer; node.connect(gain).connect(audioContext.destination); - node.start(); + + if (audioContext.state === "suspended") { + audioContext.resume().then(() => node.start()); + } else { + node.start(); + } }, }; };