зеркало из https://github.com/mozilla/gecko-dev.git
17 строки
377 B
JavaScript
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);
|