superpoweredSDK/web-audio-javascript-webassembly-SDK-interactive-audio

The node created callback is called before the onReady() function in the AudioWorkletProcessor

Closed this issue · 1 comments

Superpowered.createAudioNode(audioContext, currentPath + '/processor.js', 'MyProcessor',
                function (newNode) {
                    console.log("node");
                });
class MyProcessor extends SuperpoweredModule.AudioWorkletProcessor {

    // runs after the constructor
    onReady() { console.log("ready");}
}

"node" prints before "ready'. This causes problem in using onReady() for initialization since on very short audio files the decoding can finish before onReady() is called.

Please try the experimental builds in your other ticket: #4