Register a stream finished callback function which will be called when the stream becomes inactive. See the description of PaStreamFinishedCallback for further details about when the callback will be called.
Definition at line 1479 of file pa_front.c. References PA_STREAM_INTERFACE, PA_STREAM_REP, PaUtil_DebugPrint(), and PaUtil_ValidateStreamPointer(). {
PaError result = PaUtil_ValidateStreamPointer( stream );
#ifdef PA_LOG_API_CALLS
PaUtil_DebugPrint("Pa_SetStreamFinishedCallback called:\n" );
PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
PaUtil_DebugPrint("\tPaStreamFinishedCallback* streamFinishedCallback: 0x%p\n", streamFinishedCallback );
#endif
if( result == paNoError )
{
result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
if( result == 0 )
{
result = paStreamIsNotStopped ;
}
if( result == 1 )
{
PA_STREAM_REP( stream )->streamFinishedCallback = streamFinishedCallback;
result = paNoError;
}
}
#ifdef PA_LOG_API_CALLS
PaUtil_DebugPrint("Pa_SetStreamFinishedCallback returned:\n" );
PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
#endif
return result;
}
|