PortAudio 2.0

Closing a Stream and Terminating PortAudio

When you are done with a stream, you should close it to free up resources:

err = Pa_CloseStream( stream );
if( err != paNoError ) goto error;
Pa_CloseStream
PaError Pa_CloseStream(PaStream *stream)

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;
Pa_Terminate
PaError Pa_Terminate(void)

Previous: Starting, Stopping and Aborting a Stream | Next: Utility Functions