auto jitter buffer change
This commit is contained in:
parent
2d5ab5dbd8
commit
18d3872d71
1 changed files with 3 additions and 3 deletions
|
@ -444,8 +444,8 @@ void CClient::UpdateSocketBufferSize()
|
||||||
// We use the time response measurement for the automatic setting.
|
// We use the time response measurement for the automatic setting.
|
||||||
// Assumptions:
|
// Assumptions:
|
||||||
// - the audio interface/network jitter is assumed to be Gaussian
|
// - the audio interface/network jitter is assumed to be Gaussian
|
||||||
// - the buffer size is set to 2.3 times the standard deviation of
|
// - the buffer size is set to 3 times the standard deviation of
|
||||||
// the jitter (~90% of the jitter should be fit in the
|
// the jitter (~97% of the jitter should be fit in the
|
||||||
// buffer)
|
// buffer)
|
||||||
// - introduce a hysteresis to avoid switching the buffer sizes all the
|
// - introduce a hysteresis to avoid switching the buffer sizes all the
|
||||||
// time in case the time response measurement is close to a bound
|
// time in case the time response measurement is close to a bound
|
||||||
|
@ -469,7 +469,7 @@ void CClient::UpdateSocketBufferSize()
|
||||||
// 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() ) ) /
|
3 * ( Channel.GetTimingStdDev() + CycleTimeVariance.GetStdDev() ) ) /
|
||||||
MIN_SERVER_BLOCK_DURATION_MS + 0.5;
|
MIN_SERVER_BLOCK_DURATION_MS + 0.5;
|
||||||
|
|
||||||
// upper/lower hysteresis decision
|
// upper/lower hysteresis decision
|
||||||
|
|
Loading…
Reference in a new issue