From a RingBuffer, build an object that can enqueue enqueue audio in a ring buffer.
Returns:The free space in the ring buffer. This is the amount of samples that can be queued, with a guarantee of success.
Enqueue a buffer of interleaved audio into the ring buffer. Care should be taken to enqueue a number of samples that is a multiple of the channel count of the audio stream.
Name Type Description
Float32Array An array of interleaved audio frames.
Returns:The number of samples that have been successfuly written to the queue. `buf` is not written to during this call, so the samples that haven't been written to the queue are still available.