gecko-dev/dom/worklet/tests/worklet_audioWorklet_WASM.js

17 строки
377 B
JavaScript

class WasmProcessWorkletProcessor extends AudioWorkletProcessor {
constructor(...args) {
super(...args);
this.port.onmessage = e => {
// Let's send it back.
this.port.postMessage(e.data);
};
}
process(inputs, outputs, parameters) {
// Do nothing, output silence
return true;
}
}
registerProcessor("wasm", WasmProcessWorkletProcessor);