1
0
Fork 0
forked from fte/fteqw

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
This commit is contained in:
Spoike 2020-04-24 12:09:48 +00:00
parent 712b57851a
commit ab36996acd

View file

@ -1083,6 +1083,7 @@ 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;
@ -1090,7 +1091,6 @@ console.log("onerror: " + _url);
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