err = Pa_CloseStream( stream ); if( err != paNoError ) goto error;
We've already mentioned this in Initializing PortAudio, but in case you forgot, be sure to terminate PortAudio when you are done:
err = Pa_Terminate( ); if( err != paNoError ) goto error;
Previous: Starting, Stopping and Aborting a Stream | Next: Utility Functions