Spaces:
Sleeping
Sleeping
| class RecorderProcessor extends AudioWorkletProcessor { | |
| process(inputs) { | |
| const channel = inputs[0]?.[0]; | |
| if (channel?.length) { | |
| const copy = channel.slice(); | |
| this.port.postMessage(copy, [copy.buffer]); | |
| } | |
| return true; | |
| } | |
| } | |
| registerProcessor("recorder-processor", RecorderProcessor); | |