From ab36996acd778a96ca814a91ff5cada0aee2b0d2 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 24 Apr 2020 12:09:48 +0000 Subject: [PATCH] Try to fix compressed audio loading issue with the web port. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5678 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/web/ftejslib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/web/ftejslib.js b/engine/web/ftejslib.js index 7c5778fe2..c6fb6cc43 100644 --- a/engine/web/ftejslib.js +++ b/engine/web/ftejslib.js @@ -1083,14 +1083,14 @@ console.log("onerror: " + _url); emscriptenfte_al_loadaudiofile : function(buf, dataptr, datasize) { + var ctx = AL.currentContext || AL.currentCtx; //match emscripten's openal support. if (!buf) return; - + var albuf = ctx.buffers[buf]; ctx.buffers[buf] = null; //alIsBuffer will report it as invalid now - var ctx = AL.currentContext || AL.currentCtx; try { //its async, so it needs its own copy of an arraybuffer