Ring buffer implemented to portaudio, trying to pass the samples to the callback