LogoSearch packages:      

Sourcecode: audacity version File versions

PaError Pa_SetStreamFinishedCallback ( PaStream stream,
PaStreamFinishedCallback streamFinishedCallback 
)

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.

Parameters:
stream a pointer to a PaStream that is in the stopped state - if the stream is not stopped, the stream's finished callback will remain unchanged and an error code will be returned.
streamFinishedCallback a pointer to a function with the same signature as PaStreamFinishedCallback, that will be called when the stream becomes inactive. Passing NULL for this parameter will un-register a previously registered stream finished callback function.
Returns:
on success returns paNoError, otherwise an error code indicating the cause of the error.
See also:
PaStreamFinishedCallback

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;

}


Generated by  Doxygen 1.5.1   Back to index