fixed ring buffer, still have to make the portaudio callback wotk