some fixes
This commit is contained in:
parent
70f0c66b85
commit
16f1bb0eb3
5 changed files with 10 additions and 16 deletions
|
@ -359,6 +359,9 @@ void CChannel::OnNetTranspPropsReceived ( CNetworkTransportProps NetworkTranspor
|
|||
|
||||
// init conversion buffer
|
||||
ConvBuf.Init ( iNetwFrameSize * iNetwFrameSizeFact );
|
||||
|
||||
// reset statistic
|
||||
CycleTimeVariance.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -605,8 +608,7 @@ int CChannel::GetUploadRateKbps()
|
|||
SYSTEM_SAMPLE_RATE_HZ / iAudioSizeOut / 1000;
|
||||
}
|
||||
|
||||
void CChannel::UpdateSocketBufferSize ( const double dAudioBufferDurationMs,
|
||||
const double dLocalStdDev )
|
||||
void CChannel::UpdateSocketBufferSize ( const double dLocalStdDev )
|
||||
{
|
||||
// just update the socket buffer size if auto setting is enabled, otherwise
|
||||
// do nothing
|
||||
|
@ -631,7 +633,7 @@ void CChannel::UpdateSocketBufferSize ( const double dAudioBufferDurationMs,
|
|||
// 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 +
|
||||
const double dEstCurBufSet = ( SYSTEM_BLOCK_DURATION_MS_FLOAT +
|
||||
3.3 * ( CycleTimeVariance.GetStdDev() + dLocalStdDev ) ) /
|
||||
SYSTEM_BLOCK_DURATION_MS_FLOAT + 0.5;
|
||||
|
||||
|
|
|
@ -96,8 +96,7 @@ public:
|
|||
const bool bPreserve = false );
|
||||
int GetSockBufNumFrames() const { return iCurSockBufNumFrames; }
|
||||
|
||||
void UpdateSocketBufferSize ( const double dAudioBufferDurationMs,
|
||||
const double dLocalStdDev );
|
||||
void UpdateSocketBufferSize ( const double dLocalStdDev );
|
||||
|
||||
int GetUploadRateKbps();
|
||||
|
||||
|
|
|
@ -946,15 +946,8 @@ void CClient::ProcessAudioDataIntern ( CVector<int16_t>& vecsStereoSndCrd )
|
|||
// update response time measurement
|
||||
CycleTimeVariance.Update();
|
||||
|
||||
// calculate current buffer setting
|
||||
const double dAudioBufferDurationMs =
|
||||
static_cast<double> ( GetSndCrdActualMonoBlSize() +
|
||||
GetSndCrdConvBufAdditionalDelayMonoBlSize() ) *
|
||||
1000 / SYSTEM_SAMPLE_RATE_HZ;
|
||||
|
||||
// update socket buffer size
|
||||
Channel.UpdateSocketBufferSize ( dAudioBufferDurationMs,
|
||||
CycleTimeVariance.GetStdDev() );
|
||||
Channel.UpdateSocketBufferSize ( CycleTimeVariance.GetStdDev() );
|
||||
}
|
||||
|
||||
int CClient::EstimatedOverallDelay ( const int iPingTimeMs )
|
||||
|
|
|
@ -717,8 +717,6 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>chbAutoJitBuf</tabstop>
|
||||
<tabstop>sldNetBuf</tabstop>
|
||||
<tabstop>cbxSoundcard</tabstop>
|
||||
<tabstop>cbxLInChan</tabstop>
|
||||
<tabstop>cbxRInChan</tabstop>
|
||||
|
@ -728,6 +726,9 @@
|
|||
<tabstop>rbtBufferDelayDefault</tabstop>
|
||||
<tabstop>rbtBufferDelaySafe</tabstop>
|
||||
<tabstop>butDriverSetup</tabstop>
|
||||
<tabstop>chbAutoJitBuf</tabstop>
|
||||
<tabstop>sldNetBuf</tabstop>
|
||||
<tabstop>sldNetBufServer</tabstop>
|
||||
<tabstop>chbOpenChatOnNewMessage</tabstop>
|
||||
<tabstop>chbGUIDesignFancy</tabstop>
|
||||
<tabstop>chbUseHighQualityAudio</tabstop>
|
||||
|
|
|
@ -679,7 +679,6 @@ void CServer::OnTimer()
|
|||
|
||||
// update socket buffer size
|
||||
vecChannels[iCurChanID].UpdateSocketBufferSize (
|
||||
SYSTEM_BLOCK_DURATION_MS_FLOAT,
|
||||
CycleTimeVariance.GetStdDev() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue