From: rossb Date: Sat, 12 Feb 2011 09:20:26 +0000 (+0000) Subject: fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProces... X-Git-Tag: pa_stable_v19_20110326_r1647~47 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=a5eb2767c74bf30344ddfcd9aaaea08e057bbc65;p=portaudio fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in , code assumed it was in seconds. --- diff --git a/src/common/pa_skeleton.c b/src/common/pa_skeleton.c index aff691e..84f73c7 100644 --- a/src/common/pa_skeleton.c +++ b/src/common/pa_skeleton.c @@ -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;