Skip to content

Commit

Permalink
Fix latency calculation in PA ALSA
Browse files Browse the repository at this point in the history
  • Loading branch information
aknuds1 committed Jun 3, 2009
1 parent 822c292 commit a923834
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hostapi/alsa/pa_linux_alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2003,11 +2003,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,

/* Ok, buffer processor is initialized, now we can deduce it's latency */
if( numInputChannels > 0 )
stream->streamRepresentation.streamInfo.inputLatency = inputLatency + PaUtil_GetBufferProcessorInputLatency(
&stream->bufferProcessor );
stream->streamRepresentation.streamInfo.inputLatency = inputLatency + (PaTime)(
PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) / sampleRate);
if( numOutputChannels > 0 )
stream->streamRepresentation.streamInfo.outputLatency = outputLatency + PaUtil_GetBufferProcessorOutputLatency(
&stream->bufferProcessor );
stream->streamRepresentation.streamInfo.outputLatency = outputLatency + (PaTime)(
PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) / sampleRate);

*s = (PaStream*)stream;

Expand Down

0 comments on commit a923834

Please sign in to comment.