From 2d5ab5dbd86d75690ab7d7b2609036f8fecedac3 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Thu, 19 Mar 2009 06:53:05 +0000 Subject: [PATCH] fix for auto jitter buffer setting --- src/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 40a8ca1d..04444cd1 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -465,12 +465,12 @@ void CClient::UpdateSocketBufferSize() // accumulate the standard deviations of input network stream and // internal timer, - // add .5 to "round up" -> ceil, + // add 0.5 to "round up" -> ceil, // divide by MIN_SERVER_BLOCK_DURATION_MS because this is the size of // one block in the jitter buffer const double dEstCurBufSet = ( dAudioBufferDurationMs + - 2.3 * ( Channel.GetTimingStdDev() + CycleTimeVariance.GetStdDev() + 0.5 ) ) / - MIN_SERVER_BLOCK_DURATION_MS; + 2.3 * ( Channel.GetTimingStdDev() + CycleTimeVariance.GetStdDev() ) ) / + MIN_SERVER_BLOCK_DURATION_MS + 0.5; // upper/lower hysteresis decision const int iUpperHystDec = LlconMath().round ( dEstCurBufSet - dHysteresis );