bug fixes
This commit is contained in:
parent
633fc9b72e
commit
b31360a27a
3 changed files with 11 additions and 10 deletions
|
@ -224,7 +224,7 @@ CChannel::CChannel()
|
||||||
{
|
{
|
||||||
// query all possible network in buffer sizes for determining if an
|
// query all possible network in buffer sizes for determining if an
|
||||||
// audio packet was received
|
// 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 )
|
// network block size factor must start from 1 -> ( i + 1 )
|
||||||
vecNetwInBufSizes[i] = AudioCompressionIn.Init (
|
vecNetwInBufSizes[i] = AudioCompressionIn.Init (
|
||||||
|
@ -367,17 +367,18 @@ EPutDataStat CChannel::PutData ( const CVector<unsigned char>& vecbyData,
|
||||||
bool bIsAudioPacket = false;
|
bool bIsAudioPacket = false;
|
||||||
|
|
||||||
// check if this is an audio packet by checking all possible lengths
|
// 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] )
|
if ( iNumBytes == vecNetwInBufSizes[i] )
|
||||||
{
|
{
|
||||||
bIsAudioPacket = true;
|
bIsAudioPacket = true;
|
||||||
|
|
||||||
// check if we are correctly initialized
|
// check if we are correctly initialized
|
||||||
if ( iAudComprSizeIn != vecNetwInBufSizes[i] )
|
const int iNewNetwInBlSiFact = i + 1;
|
||||||
|
if ( iNewNetwInBlSiFact != iCurNetwInBlSiFact )
|
||||||
{
|
{
|
||||||
// re-initialize to new value
|
// re-initialize to new value
|
||||||
SetNetwInBlSiFact ( i + 1 );
|
SetNetwInBlSiFact ( iNewNetwInBlSiFact );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
SliderNetBufSiFactIn->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX);
|
SliderNetBufSiFactIn->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX);
|
||||||
const int iCurNetBufSiFactIn = pClient->GetNetwBufSizeFactIn();
|
const int iCurNetBufSiFactIn = pClient->GetNetwBufSizeFactIn();
|
||||||
SliderNetBufSiFactIn->setValue(iCurNetBufSiFactIn);
|
SliderNetBufSiFactIn->setValue(iCurNetBufSiFactIn);
|
||||||
TextNetBufSiFactIn->setText("Len: " + QString().setNum(
|
TextNetBufSiFactIn->setText("In: " + QString().setNum(
|
||||||
double(iCurNetBufSiFactIn * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
double(iCurNetBufSiFactIn * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
||||||
" ms");
|
" ms");
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
SliderNetBufSiFactOut->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX);
|
SliderNetBufSiFactOut->setRange(1, NET_BLOCK_SIZE_FACTOR_MAX);
|
||||||
const int iCurNetBufSiFactOut = pClient->GetNetwBufSizeFactOut();
|
const int iCurNetBufSiFactOut = pClient->GetNetwBufSizeFactOut();
|
||||||
SliderNetBufSiFactOut->setValue(iCurNetBufSiFactOut);
|
SliderNetBufSiFactOut->setValue(iCurNetBufSiFactOut);
|
||||||
TextNetBufSiFactOut->setText("Len: " + QString().setNum(
|
TextNetBufSiFactOut->setText("Out: " + QString().setNum(
|
||||||
double(iCurNetBufSiFactOut * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
double(iCurNetBufSiFactOut * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
||||||
" ms");
|
" ms");
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ void CLlconClientDlg::OnSliderNetBuf(int value)
|
||||||
void CLlconClientDlg::OnSliderNetBufSiFactIn(int value)
|
void CLlconClientDlg::OnSliderNetBufSiFactIn(int value)
|
||||||
{
|
{
|
||||||
pClient->SetNetwBufSizeFactIn ( value );
|
pClient->SetNetwBufSizeFactIn ( value );
|
||||||
TextNetBufSiFactIn->setText("Len: " + QString().setNum(
|
TextNetBufSiFactIn->setText("In: " + QString().setNum(
|
||||||
double(value * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
double(value * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
||||||
" ms");
|
" ms");
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
|
@ -277,7 +277,7 @@ void CLlconClientDlg::OnSliderNetBufSiFactIn(int value)
|
||||||
void CLlconClientDlg::OnSliderNetBufSiFactOut(int value)
|
void CLlconClientDlg::OnSliderNetBufSiFactOut(int value)
|
||||||
{
|
{
|
||||||
pClient->SetNetwBufSizeFactOut ( value );
|
pClient->SetNetwBufSizeFactOut ( value );
|
||||||
TextNetBufSiFactOut->setText("Len: " + QString().setNum(
|
TextNetBufSiFactOut->setText("Out: " + QString().setNum(
|
||||||
double(value * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
double(value * MIN_BLOCK_DURATION_MS), 'f', 2) +
|
||||||
" ms");
|
" ms");
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>914</width>
|
<width>927</width>
|
||||||
<height>287</height>
|
<height>287</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -761,7 +761,7 @@
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>minimumSize</name>
|
<name>minimumSize</name>
|
||||||
<size>
|
<size>
|
||||||
<width>72</width>
|
<width>85</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue