From: rossb Date: Sat, 12 Feb 2011 09:19:37 +0000 (+0000) Subject: fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProces... X-Git-Tag: pa_stable_v19_20110326_r1647~48 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=ba156ee92f6455c1b6f4303d8a76ed9300c8db2e;p=portaudio fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in , code assumed it was in seconds. --- diff --git a/src/hostapi/dsound/pa_win_ds.c b/src/hostapi/dsound/pa_win_ds.c index 464ccfb..b132ce3 100644 --- a/src/hostapi/dsound/pa_win_ds.c +++ b/src/hostapi/dsound/pa_win_ds.c @@ -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;