From a5eb2767c74bf30344ddfcd9aaaea08e057bbc65 Mon Sep 17 00:00:00 2001 From: rossb Date: Sat, 12 Feb 2011 09:20:26 +0000 Subject: [PATCH] fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in , code assumed it was in seconds. --- src/common/pa_skeleton.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.43.0