fix for auto jitter buffer setting

This commit is contained in:
Volker Fischer 2009-03-19 06:53:05 +00:00
parent 564d54f68c
commit 2d5ab5dbd8

View file

@ -465,12 +465,12 @@ void CClient::UpdateSocketBufferSize()
// accumulate the standard deviations of input network stream and // accumulate the standard deviations of input network stream and
// internal timer, // 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 // divide by MIN_SERVER_BLOCK_DURATION_MS because this is the size of
// one block in the jitter buffer // one block in the jitter buffer
const double dEstCurBufSet = ( dAudioBufferDurationMs + const double dEstCurBufSet = ( dAudioBufferDurationMs +
2.3 * ( Channel.GetTimingStdDev() + CycleTimeVariance.GetStdDev() + 0.5 ) ) / 2.3 * ( Channel.GetTimingStdDev() + CycleTimeVariance.GetStdDev() ) ) /
MIN_SERVER_BLOCK_DURATION_MS; MIN_SERVER_BLOCK_DURATION_MS + 0.5;
// upper/lower hysteresis decision // upper/lower hysteresis decision
const int iUpperHystDec = LlconMath().round ( dEstCurBufSet - dHysteresis ); const int iUpperHystDec = LlconMath().round ( dEstCurBufSet - dHysteresis );