ringbuf.js
ringbuf.js
is a single-producer single-consumer wait-free ring
buffer library written in JavaScript, that uses
SharedArrayBuffer
s to allow non-blocking communication
between the main thread of a web application, Web Workers, and an
AudioWorkletGlobalScope
.
After an initial phase of setup, it is possible to read and write from and to the ring buffer without causing any garbage collection or making any allocations, making it particularly suitable for high-performance communication in real-time audio processing scenario.
When not used in a real-time context, a slighly more user-friendly API can be used, at the expense of very minimal generation of garbage, that is often acceptable with current garbage collector implementations.
node.js
server
server.js
available at the root of the repository and
serving the public/
works just as well.