bug fixes

This commit is contained in:
Volker Fischer 2006-03-13 21:05:53 +00:00
parent 633fc9b72e
commit b31360a27a
3 changed files with 11 additions and 10 deletions

View file

@ -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<unsigned char>& 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 );
}
}
}

View file

@ -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();

View file

@ -11,7 +11,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>914</width>
<width>927</width>
<height>287</height>
</rect>
</property>
@ -761,7 +761,7 @@
<property stdset="1">
<name>minimumSize</name>
<size>
<width>72</width>
<width>85</width>
<height>0</height>
</size>
</property>