LogoSearch packages:      

Sourcecode: audacity version File versions

PaError Pa_IsStreamActive ( PaStream stream  ) 

Determine whether the stream is active. A stream is active after a successful call to Pa_StartStream(), until it becomes inactive either as a result of a call to Pa_StopStream() or Pa_AbortStream(), or as a result of a return value other than paContinue from the stream callback. In the latter case, the stream is considered inactive after the last buffer has finished playing.

Returns:
Returns one (1) when the stream is active (ie playing or recording audio), zero (0) when not playing or, a PaErrorCode (which are always negative) if PortAudio is not initialized or an error is encountered.
See also:
Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped

Definition at line 1627 of file pa_front.c.

References PA_STREAM_INTERFACE, PaUtil_DebugPrint(), and PaUtil_ValidateStreamPointer().

{
    PaError result = PaUtil_ValidateStreamPointer( stream );

#ifdef PA_LOG_API_CALLS
    PaUtil_DebugPrint("Pa_IsStreamActive called:\n" );
    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
#endif

    if( result == paNoError )
        result = PA_STREAM_INTERFACE(stream)->IsActive( stream );

#ifdef PA_LOG_API_CALLS
    PaUtil_DebugPrint("Pa_IsStreamActive 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