Create an actor blueprint that generates an audio component and plays some wav file.
Drop the blueprint to your level and make sure it plays the wav file.
Do the same for another level.
There has to be a way to change levels for testing.
Export your project for html5. If you try to change levels, _alDeleteBuffers method generates an exception and game tick crashes.
I’ve extracted the function. The crash occurs in the for-loop of src.queue.length, and thrown error is Uncaught TypeError: Cannot read property ‘length’ of undefined
function _alDeleteBuffers ( count, buffers ) {
if ( !AL.currentContext ) {
return
}
if ( count > AL.currentContext.buf.length ) {
AL.currentContext.err = 40963;
return
}
for ( var i = 0; i < count; ++i ) {
var bufferIdx = HEAP32[ buffers + i * 4 >> 2 ] - 1;
if ( bufferIdx >= AL.currentContext.buf.length || !AL.currentContext.buf[ bufferIdx ] ) {
AL.currentContext.err = 40961;
return
}
var buffer = AL.currentContext.buf[ bufferIdx ];
for ( var srcId in AL.currentContext.src ) {
var src = AL.currentContext.src[ srcId ];
if ( !src ) {
continue
}
// ERROR IN HERE...
for ( var k = 0; k < src.queue.length; k++ ) {
if ( buffer === src.queue[ k ].buffer ) {
AL.currentContext.err = 40964;
return
}
}
}
}
for ( var i = 0; i < count; ++i ) {
var bufferIdx = HEAP32[ buffers + i * 4 >> 2 ] - 1;
delete AL.currentContext.buf[ bufferIdx ]
}
}