when setting jitter buffer size, only use number of blocks, not the size of the block anymore (since this is constant anyway
This commit is contained in:
parent
33ef3dcc69
commit
47f60d317e
5 changed files with 9 additions and 9 deletions
|
@ -226,7 +226,7 @@ CChannel::CChannel ()
|
||||||
byTimeStampIdxCnt = 0;
|
byTimeStampIdxCnt = 0;
|
||||||
|
|
||||||
/* init the socket buffer */
|
/* init the socket buffer */
|
||||||
SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, DEF_NET_BUF_SIZE_NUM_BL );
|
SetSockBufSize ( DEF_NET_BUF_SIZE_NUM_BL );
|
||||||
|
|
||||||
// set initial input and output block size factors
|
// set initial input and output block size factors
|
||||||
SetNetwInBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
SetNetwInBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
||||||
|
@ -289,12 +289,12 @@ void CChannel::OnSendProtMessage ( CVector<uint8_t> vecMessage )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CChannel::SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks )
|
void CChannel::SetSockBufSize ( const int iNumBlocks )
|
||||||
{
|
{
|
||||||
/* this opperation must be done with mutex */
|
/* this opperation must be done with mutex */
|
||||||
Mutex.lock ();
|
Mutex.lock ();
|
||||||
{
|
{
|
||||||
SockBuf.Init ( iNewBlockSize, iNumBlocks );
|
SockBuf.Init ( MIN_BLOCK_SIZE_SAMPLES, iNumBlocks );
|
||||||
}
|
}
|
||||||
Mutex.unlock ();
|
Mutex.unlock ();
|
||||||
}
|
}
|
||||||
|
@ -304,7 +304,7 @@ void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
|
||||||
// TEST
|
// TEST
|
||||||
qDebug ( "new jitter buffer size: %d", iNewJitBufSize );
|
qDebug ( "new jitter buffer size: %d", iNewJitBufSize );
|
||||||
|
|
||||||
SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, iNewJitBufSize );
|
SetSockBufSize ( iNewJitBufSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CChannel::GetAddress(CHostAddress& RetAddr)
|
bool CChannel::GetAddress(CHostAddress& RetAddr)
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
bool GetAddress ( CHostAddress& RetAddr );
|
bool GetAddress ( CHostAddress& RetAddr );
|
||||||
CHostAddress GetAddress () { return InetAddr; }
|
CHostAddress GetAddress () { return InetAddr; }
|
||||||
|
|
||||||
void SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks );
|
void SetSockBufSize ( const int iNumBlocks );
|
||||||
int GetSockBufSize() { return SockBuf.GetSize(); }
|
int GetSockBufSize() { return SockBuf.GetSize(); }
|
||||||
|
|
||||||
// network protocol interface
|
// network protocol interface
|
||||||
|
|
|
@ -85,10 +85,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks )
|
void SetSockBufSize ( const int iNumBlocks )
|
||||||
{
|
{
|
||||||
// set the new socket size
|
// set the new socket size
|
||||||
Channel.SetSockBufSize ( iNewBlockSize, iNumBlocks );
|
Channel.SetSockBufSize ( iNumBlocks );
|
||||||
|
|
||||||
// tell the server that size has changed
|
// tell the server that size has changed
|
||||||
Channel.CreateJitBufMes ( iNumBlocks );
|
Channel.CreateJitBufMes ( iNumBlocks );
|
||||||
|
|
|
@ -237,7 +237,7 @@ void CLlconClientDlg::OnSliderSndBufOutChange(int value)
|
||||||
|
|
||||||
void CLlconClientDlg::OnSliderNetBuf(int value)
|
void CLlconClientDlg::OnSliderNetBuf(int value)
|
||||||
{
|
{
|
||||||
pClient->SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, value );
|
pClient->SetSockBufSize ( value );
|
||||||
TextNetBuf->setText("Size: " + QString().setNum(value));
|
TextNetBuf->setText("Size: " + QString().setNum(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ void CSettings::ReadIniFile()
|
||||||
|
|
||||||
// network jitter buffer size
|
// network jitter buffer size
|
||||||
if ( GetNumericIniSet(ini, "Client", "jitbuf", 0, MAX_NET_BUF_SIZE_NUM_BL, iValue ) == TRUE ) {
|
if ( GetNumericIniSet(ini, "Client", "jitbuf", 0, MAX_NET_BUF_SIZE_NUM_BL, iValue ) == TRUE ) {
|
||||||
pClient->SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, iValue );
|
pClient->SetSockBufSize ( iValue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue