This improves on the old ring buffer by having a much simpler
implementation and a much simpler API that does not require the caller
to do reading and writing in a loop.
Future commits will be removing the old ring buffer.
Public issue https://github.com/mackron/miniaudio/issues/671