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

index 464ccfb3d42c9f8b879bda4a2175751bf11e304a..b132ce3f3a29f17de9e3406908e01a52d469f434 100644 (file)
@@ -1845,9 +1845,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     bufferProcessorIsInitialized = 1;
 
     stream->streamRepresentation.streamInfo.inputLatency =
-            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor);   /* FIXME: not initialised anywhere else */
+            (PaTime)PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) / sampleRate;   /* FIXME: only includes buffer processor latency */
     stream->streamRepresentation.streamInfo.outputLatency =
-            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor);    /* FIXME: not initialised anywhere else */
+            (PaTime)PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) / sampleRate;    /* FIXME: only includes buffer processor latency */
     stream->streamRepresentation.streamInfo.sampleRate = sampleRate;