[HTML5] AudioWorklet API implementation.

Rewrote AudioDriverJavaScript to support multiple processor nodes.
The old (and deprecated) ScriptProcessorNode when threads are not
available, and the new AudioWorklet API when threads are enabled.

The new implementation uses two ring buffers and a shared state to
communicated with the AudioWorklet thread.

The audio.worklet.js JavaScript file is always added to the export
template, but only really used (and downloaded) in the thread build.
This commit is contained in:
Fabio Alessandrelli 2020-11-10 11:05:22 +01:00
parent e2083871eb
commit 179ec3ca0e
8 changed files with 726 additions and 211 deletions

View file

@ -4,6 +4,8 @@ var Utils = {
function rw(path) {
if (path.endsWith('.worker.js')) {
return execName + '.worker.js';
} else if (path.endsWith('.audio.worklet.js')) {
return execName + '.audio.worklet.js';
} else if (path.endsWith('.js')) {
return execName + '.js';
} else if (path.endsWith('.wasm')) {