working portaudio stream implementation