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:
Volker Fischer 2006-03-12 10:02:01 +00:00
parent 33ef3dcc69
commit 47f60d317e
5 changed files with 9 additions and 9 deletions

View file

@ -226,7 +226,7 @@ CChannel::CChannel ()
byTimeStampIdxCnt = 0;
/* 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
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 */
Mutex.lock ();
{
SockBuf.Init ( iNewBlockSize, iNumBlocks );
SockBuf.Init ( MIN_BLOCK_SIZE_SAMPLES, iNumBlocks );
}
Mutex.unlock ();
}
@ -304,7 +304,7 @@ void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
// TEST
qDebug ( "new jitter buffer size: %d", iNewJitBufSize );
SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, iNewJitBufSize );
SetSockBufSize ( iNewJitBufSize );
}
bool CChannel::GetAddress(CHostAddress& RetAddr)

View file

@ -80,7 +80,7 @@ public:
bool GetAddress ( CHostAddress& RetAddr );
CHostAddress GetAddress () { return InetAddr; }
void SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks );
void SetSockBufSize ( const int iNumBlocks );
int GetSockBufSize() { return SockBuf.GetSize(); }
// network protocol interface

View file

@ -85,10 +85,10 @@ public:
}
void SetSockBufSize ( const int iNewBlockSize, const int iNumBlocks )
void SetSockBufSize ( const int iNumBlocks )
{
// set the new socket size
Channel.SetSockBufSize ( iNewBlockSize, iNumBlocks );
Channel.SetSockBufSize ( iNumBlocks );
// tell the server that size has changed
Channel.CreateJitBufMes ( iNumBlocks );

View file

@ -237,7 +237,7 @@ void CLlconClientDlg::OnSliderSndBufOutChange(int value)
void CLlconClientDlg::OnSliderNetBuf(int value)
{
pClient->SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, value );
pClient->SetSockBufSize ( value );
TextNetBuf->setText("Size: " + QString().setNum(value));
}

View file

@ -79,7 +79,7 @@ void CSettings::ReadIniFile()
// network jitter buffer size
if ( GetNumericIniSet(ini, "Client", "jitbuf", 0, MAX_NET_BUF_SIZE_NUM_BL, iValue ) == TRUE ) {
pClient->SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, iValue );
pClient->SetSockBufSize ( iValue );
}
}