diff --git a/src/channel.cpp b/src/channel.cpp index 958845db..0539fe16 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -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 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) diff --git a/src/channel.h b/src/channel.h index cf5a61a2..d0758669 100755 --- a/src/channel.h +++ b/src/channel.h @@ -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 diff --git a/src/client.h b/src/client.h index 149a1a7b..cc9a4930 100755 --- a/src/client.h +++ b/src/client.h @@ -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 ); diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index 79f3309e..6907421b 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -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)); } diff --git a/src/settings.cpp b/src/settings.cpp index ae0a7c66..a156ecbc 100755 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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 ); } }