Open
Description
Currently, the webaudio backend internally uses AudioBuffers chained together by AudioBufferSourceNodes' onended. These buffers need to be maintained regularly by the backend.
Web Audio has another type of node that closely resembles CPAL's API (translated to Javascript): AudioWorkletNodes regularly call the process
callback in a separate thread to generate new samples.
Maybe, CPAL could implement an AudioWorkletProcessor that receives a WASM module and a SharedArrayBuffer and uses these to create a new WASM thread that is called each time in the process
callback. This solution would provide more consistent behavior across platforms and could maybe reduce overhead and latency.
Metadata
Metadata
Assignees
Labels
No labels