diff --git a/src/channel.cpp b/src/channel.cpp index 0db88bae..368b1980 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -224,7 +224,7 @@ CChannel::CChannel() { // query all possible network in buffer sizes for determining if an // audio packet was received - for ( int i = 0; i < ( NET_BLOCK_SIZE_FACTOR_MAX - 1 ); i++ ) + for ( int i = 0; i < NET_BLOCK_SIZE_FACTOR_MAX; i++ ) { // network block size factor must start from 1 -> ( i + 1 ) vecNetwInBufSizes[i] = AudioCompressionIn.Init ( @@ -367,17 +367,18 @@ EPutDataStat CChannel::PutData ( const CVector& vecbyData, bool bIsAudioPacket = false; // check if this is an audio packet by checking all possible lengths - for ( int i = 0; i < ( NET_BLOCK_SIZE_FACTOR_MAX - 1 ); i++ ) + for ( int i = 0; i < NET_BLOCK_SIZE_FACTOR_MAX; i++ ) { if ( iNumBytes == vecNetwInBufSizes[i] ) { bIsAudioPacket = true; // check if we are correctly initialized - if ( iAudComprSizeIn != vecNetwInBufSizes[i] ) + const int iNewNetwInBlSiFact = i + 1; + if ( iNewNetwInBlSiFact != iCurNetwInBlSiFact ) { // re-initialize to new value - SetNetwInBlSiFact ( i + 1 ); + SetNetwInBlSiFact ( iNewNetwInBlSiFact ); } } } diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index 4371e24b..8071fd04 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -102,7 +102,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent, SliderNetBufSiFactIn->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX); const int iCurNetBufSiFactIn = pClient->GetNetwBufSizeFactIn(); SliderNetBufSiFactIn->setValue(iCurNetBufSiFactIn); - TextNetBufSiFactIn->setText("Len: " + QString().setNum( + TextNetBufSiFactIn->setText("In: " + QString().setNum( double(iCurNetBufSiFactIn * MIN_BLOCK_DURATION_MS), 'f', 2) + " ms"); @@ -110,7 +110,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent, SliderNetBufSiFactOut->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX); const int iCurNetBufSiFactOut = pClient->GetNetwBufSizeFactOut(); SliderNetBufSiFactOut->setValue(iCurNetBufSiFactOut); - TextNetBufSiFactOut->setText("Len: " + QString().setNum( + TextNetBufSiFactOut->setText("Out: " + QString().setNum( double(iCurNetBufSiFactOut * MIN_BLOCK_DURATION_MS), 'f', 2) + " ms"); @@ -268,7 +268,7 @@ void CLlconClientDlg::OnSliderNetBuf(int value) void CLlconClientDlg::OnSliderNetBufSiFactIn(int value) { pClient->SetNetwBufSizeFactIn ( value ); - TextNetBufSiFactIn->setText("Len: " + QString().setNum( + TextNetBufSiFactIn->setText("In: " + QString().setNum( double(value * MIN_BLOCK_DURATION_MS), 'f', 2) + " ms"); UpdateDisplay(); @@ -277,7 +277,7 @@ void CLlconClientDlg::OnSliderNetBufSiFactIn(int value) void CLlconClientDlg::OnSliderNetBufSiFactOut(int value) { pClient->SetNetwBufSizeFactOut ( value ); - TextNetBufSiFactOut->setText("Len: " + QString().setNum( + TextNetBufSiFactOut->setText("Out: " + QString().setNum( double(value * MIN_BLOCK_DURATION_MS), 'f', 2) + " ms"); UpdateDisplay(); diff --git a/src/llconclientdlgbase.ui b/src/llconclientdlgbase.ui index 0a4cfcf2..e5bdadfd 100755 --- a/src/llconclientdlgbase.ui +++ b/src/llconclientdlgbase.ui @@ -11,7 +11,7 @@ 0 0 - 914 + 927 287 @@ -761,7 +761,7 @@ minimumSize - 72 + 85 0