]> Repos - portaudio/commitdiff
fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProces...
authorrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Sat, 12 Feb 2011 09:20:26 +0000 (09:20 +0000)
committerrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Sat, 12 Feb 2011 09:20:26 +0000 (09:20 +0000)
src/common/pa_skeleton.c

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