From a RingBuffer, build an object that can dequeue audio in a ring buffer.
Attempt to dequeue at most buf.length
samples from the queue. This
returns the number of samples dequeued. If greater than 0, the samples are
at the beginning of buf
.
Care should be taken to dequeue a number of samples that is a multiple of the channel count of the audio stream.
A buffer in which to copy the dequeued interleaved audio frames.
The number of samples dequeued.
Receive interleaved audio frames to another thread, wait-free.
GC can happen during the initial construction of this object when hopefully no audio is being output. This depends on how implementations schedule GC passes. After the setup phase no GC is triggered on either side of the queue.