renamed PaUtil_GetBufferProcessorInputLatency to PaUtil_GetBufferProcessorInputLatencyFrames and PaUtil_GetBufferProcessorOutputLatency to PaUtil_GetBufferProcessorOutputLatencyFrames. see ticket #161

This commit is contained in:
rossb 2011-05-02 17:07:11 +00:00
commit cbd24dc45c
12 changed files with 44 additions and 44 deletions

View file

@ -428,13 +428,13 @@ void PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bp )
} }
unsigned long PaUtil_GetBufferProcessorInputLatency( PaUtilBufferProcessor* bp ) unsigned long PaUtil_GetBufferProcessorInputLatencyFrames( PaUtilBufferProcessor* bp )
{ {
return bp->initialFramesInTempInputBuffer; return bp->initialFramesInTempInputBuffer;
} }
unsigned long PaUtil_GetBufferProcessorOutputLatency( PaUtilBufferProcessor* bp ) unsigned long PaUtil_GetBufferProcessorOutputLatencyFrames( PaUtilBufferProcessor* bp )
{ {
return bp->initialFramesInTempOutputBuffer; return bp->initialFramesInTempOutputBuffer;
} }

View file

@ -406,25 +406,25 @@ void PaUtil_TerminateBufferProcessor( PaUtilBufferProcessor* bufferProcessor );
void PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bufferProcessor ); void PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bufferProcessor );
/** Retrieve the input latency of a buffer processor. /** Retrieve the input latency of a buffer processor, in frames.
@param bufferProcessor The buffer processor examine. @param bufferProcessor The buffer processor examine.
@return The input latency introduced by the buffer processor, in frames. @return The input latency introduced by the buffer processor, in frames.
@see PaUtil_GetBufferProcessorOutputLatency @see PaUtil_GetBufferProcessorOutputLatencyFrames
*/ */
unsigned long PaUtil_GetBufferProcessorInputLatency( PaUtilBufferProcessor* bufferProcessor ); unsigned long PaUtil_GetBufferProcessorInputLatencyFrames( PaUtilBufferProcessor* bufferProcessor );
/** Retrieve the output latency of a buffer processor. /** Retrieve the output latency of a buffer processor, in frames.
@param bufferProcessor The buffer processor examine. @param bufferProcessor The buffer processor examine.
@return The output latency introduced by the buffer processor, in frames. @return The output latency introduced by the buffer processor, in frames.
@see PaUtil_GetBufferProcessorInputLatency @see PaUtil_GetBufferProcessorInputLatencyFrames
*/ */
unsigned long PaUtil_GetBufferProcessorOutputLatency( PaUtilBufferProcessor* bufferProcessor ); unsigned long PaUtil_GetBufferProcessorOutputLatencyFrames( PaUtilBufferProcessor* bufferProcessor );
/*@}*/ /*@}*/

View file

@ -2768,10 +2768,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
/* Ok, buffer processor is initialized, now we can deduce it's latency */ /* Ok, buffer processor is initialized, now we can deduce it's latency */
if( numInputChannels > 0 ) if( numInputChannels > 0 )
stream->streamRepresentation.streamInfo.inputLatency = inputLatency + (PaTime)( stream->streamRepresentation.streamInfo.inputLatency = inputLatency + (PaTime)(
PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) / sampleRate); PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) / sampleRate);
if( numOutputChannels > 0 ) if( numOutputChannels > 0 )
stream->streamRepresentation.streamInfo.outputLatency = outputLatency + (PaTime)( stream->streamRepresentation.streamInfo.outputLatency = outputLatency + (PaTime)(
PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) / sampleRate); PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) / sampleRate);
PA_DEBUG(( "%s: Stream: framesPerBuffer = %lu, maxFramesPerHostBuffer = %lu, latency = i(%f)/o(%f), \n", __FUNCTION__, framesPerBuffer, stream->maxFramesPerHostBuffer, stream->streamRepresentation.streamInfo.inputLatency, stream->streamRepresentation.streamInfo.outputLatency)); PA_DEBUG(( "%s: Stream: framesPerBuffer = %lu, maxFramesPerHostBuffer = %lu, latency = i(%f)/o(%f), \n", __FUNCTION__, framesPerBuffer, stream->maxFramesPerHostBuffer, stream->streamRepresentation.streamInfo.inputLatency, stream->streamRepresentation.streamInfo.outputLatency));

View file

@ -1827,7 +1827,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
/ sampleRate / stream->input->bytesPerFrame; / sampleRate / stream->input->bytesPerFrame;
stream->baseStreamRep.streamInfo.inputLatency = stream->baseStreamRep.streamInfo.inputLatency =
bufferDuration + bufferDuration +
((PaTime)PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) - ((PaTime)PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) -
stream->maxFramesPerHostBuffer) / sampleRate; stream->maxFramesPerHostBuffer) / sampleRate;
assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 ); assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 );
} }
@ -1844,7 +1844,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
} }
stream->baseStreamRep.streamInfo.outputLatency = stream->baseStreamRep.streamInfo.outputLatency =
bufferDuration + bufferDuration +
((PaTime)PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) - ((PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) -
stream->maxFramesPerHostBuffer) / sampleRate; stream->maxFramesPerHostBuffer) / sampleRate;
assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 ); assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 );
} }

View file

@ -2369,8 +2369,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
/* Compute total intput latency in seconds */ /* Compute total intput latency in seconds */
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
(double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor ) (double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor )
+ PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor)
+ (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
+ stream->asioInputLatencyFrames ) + stream->asioInputLatencyFrames )
/ sampleRate; / sampleRate;
@ -2382,10 +2382,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n", PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
stream->asioInputLatencyFrames, stream->asioInputLatencyFrames,
(long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ), (long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor), PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor),
(long)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ), (long)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer, PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
(long)( (PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) ) (long)( (PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )
)); ));
/* Determine the size of ring buffer in bytes. */ /* Determine the size of ring buffer in bytes. */
@ -2460,8 +2460,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
/* Compute total output latency in seconds */ /* Compute total output latency in seconds */
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
(double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor ) (double)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)
+ PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor)
+ (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
+ stream->asioOutputLatencyFrames ) + stream->asioOutputLatencyFrames )
/ sampleRate; / sampleRate;
@ -2473,10 +2473,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n", PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
stream->asioOutputLatencyFrames, stream->asioOutputLatencyFrames,
(long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ), (long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor), PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor),
(long)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ), (long)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer, PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
(long)( (PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) ) (long)( (PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )
)); ));
/* Determine the size of ring buffer in bytes. */ /* Determine the size of ring buffer in bytes. */
@ -2517,10 +2517,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
callbackBufferProcessorInited = TRUE; callbackBufferProcessorInited = TRUE;
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
(double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) (double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)
+ stream->asioInputLatencyFrames) / sampleRate; // seconds + stream->asioInputLatencyFrames) / sampleRate; // seconds
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
(double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) (double)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)
+ stream->asioOutputLatencyFrames) / sampleRate; // seconds + stream->asioOutputLatencyFrames) / sampleRate; // seconds
stream->streamRepresentation.streamInfo.sampleRate = sampleRate; stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
@ -2529,15 +2529,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n", PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
stream->asioInputLatencyFrames, stream->asioInputLatencyFrames,
(long)((stream->asioInputLatencyFrames*1000)/ sampleRate), (long)((stream->asioInputLatencyFrames*1000)/ sampleRate),
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor), PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor),
(long)((PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)*1000)/ sampleRate) (long)((PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)*1000)/ sampleRate)
)); ));
PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n", PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
stream->asioOutputLatencyFrames, stream->asioOutputLatencyFrames,
(long)((stream->asioOutputLatencyFrames*1000)/ sampleRate), (long)((stream->asioOutputLatencyFrames*1000)/ sampleRate),
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor), PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor),
(long)((PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)*1000)/ sampleRate) (long)((PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)*1000)/ sampleRate)
)); ));
} }

View file

@ -1693,9 +1693,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
maybe need to change input latency estimate if IO devs differ maybe need to change input latency estimate if IO devs differ
*/ */
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)/sampleRate; PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)/sampleRate;
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)/sampleRate; PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)/sampleRate;
stream->streamRepresentation.streamInfo.sampleRate = sampleRate; stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
stream->sampleRate = sampleRate; stream->sampleRate = sampleRate;

View file

@ -1843,9 +1843,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
bufferProcessorIsInitialized = 1; bufferProcessorIsInitialized = 1;
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
(PaTime)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */ (PaTime)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
(PaTime)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */ (PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* FIXME: only includes buffer processor latency */
stream->streamRepresentation.streamInfo.sampleRate = sampleRate; stream->streamRepresentation.streamInfo.sampleRate = sampleRate;

View file

@ -1296,11 +1296,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
if( stream->num_incoming_connections > 0 ) if( stream->num_incoming_connections > 0 )
stream->streamRepresentation.streamInfo.inputLatency = (jack_port_get_latency( stream->remote_output_ports[0] ) stream->streamRepresentation.streamInfo.inputLatency = (jack_port_get_latency( stream->remote_output_ports[0] )
- jack_get_buffer_size( jackHostApi->jack_client ) /* One buffer is not counted as latency */ - jack_get_buffer_size( jackHostApi->jack_client ) /* One buffer is not counted as latency */
+ PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor )) / sampleRate; + PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor )) / sampleRate;
if( stream->num_outgoing_connections > 0 ) if( stream->num_outgoing_connections > 0 )
stream->streamRepresentation.streamInfo.outputLatency = (jack_port_get_latency( stream->remote_input_ports[0] ) stream->streamRepresentation.streamInfo.outputLatency = (jack_port_get_latency( stream->remote_input_ports[0] )
- jack_get_buffer_size( jackHostApi->jack_client ) /* One buffer is not counted as latency */ - jack_get_buffer_size( jackHostApi->jack_client ) /* One buffer is not counted as latency */
+ PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor )) / sampleRate; + PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor )) / sampleRate;
stream->streamRepresentation.streamInfo.sampleRate = jackSr; stream->streamRepresentation.streamInfo.sampleRate = jackSr;
stream->t0 = jack_frame_time( jackHostApi->jack_client ); /* A: Time should run from Pa_OpenStream */ stream->t0 = jack_frame_time( jackHostApi->jack_client ); /* A: Time should run from Pa_OpenStream */

View file

@ -1241,13 +1241,13 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
{ {
inputHostFormat = stream->capture->hostFormat; inputHostFormat = stream->capture->hostFormat;
stream->streamRepresentation.streamInfo.inputLatency = inLatency + stream->streamRepresentation.streamInfo.inputLatency = inLatency +
PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) / sampleRate; PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) / sampleRate;
} }
if( outputParameters ) if( outputParameters )
{ {
outputHostFormat = stream->playback->hostFormat; outputHostFormat = stream->playback->hostFormat;
stream->streamRepresentation.streamInfo.outputLatency = outLatency + stream->streamRepresentation.streamInfo.outputLatency = outLatency +
PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) / sampleRate; PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) / sampleRate;
} }
/* Initialize buffer processor with fixed host buffer size. /* Initialize buffer processor with fixed host buffer size.

View file

@ -518,9 +518,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
values. values.
*/ */
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
(PaTime)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate; /* inputLatency is specified in _seconds_ */ (PaTime)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* inputLatency is specified in _seconds_ */
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
(PaTime)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate; /* outputLatency is specified in _seconds_ */ (PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* outputLatency is specified in _seconds_ */
stream->streamRepresentation.streamInfo.sampleRate = sampleRate; stream->streamRepresentation.streamInfo.sampleRate = sampleRate;

View file

@ -3004,12 +3004,12 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
// Set Input latency // Set Input latency
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
((double)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate) ((double)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+ ((inputParameters)?stream->in.latencySeconds : 0); + ((inputParameters)?stream->in.latencySeconds : 0);
// Set Output latency // Set Output latency
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
((double)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate) ((double)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+ ((outputParameters)?stream->out.latencySeconds : 0); + ((outputParameters)?stream->out.latencySeconds : 0);
// Set SR // Set SR

View file

@ -2477,10 +2477,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
bufferProcessorIsInitialized = 1; bufferProcessorIsInitialized = 1;
stream->streamRepresentation.streamInfo.inputLatency = stream->streamRepresentation.streamInfo.inputLatency =
(double)(PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) (double)(PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)
+(framesPerHostInputBuffer * (hostInputBufferCount-1))) / sampleRate; +(framesPerHostInputBuffer * (hostInputBufferCount-1))) / sampleRate;
stream->streamRepresentation.streamInfo.outputLatency = stream->streamRepresentation.streamInfo.outputLatency =
(double)(PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) (double)(PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)
+(framesPerHostOutputBuffer * (hostOutputBufferCount-1))) / sampleRate; +(framesPerHostOutputBuffer * (hostOutputBufferCount-1))) / sampleRate;
stream->streamRepresentation.streamInfo.sampleRate = sampleRate; stream->streamRepresentation.streamInfo.sampleRate = sampleRate;