cleanup, preparations for new settings dialog, not yet working!

This commit is contained in:
Volker Fischer 2009-03-03 13:37:28 +00:00
parent 24a7740438
commit 0982cb21ff
11 changed files with 284 additions and 386 deletions

View File

@ -243,7 +243,7 @@ bool CSound::Write ( CVector<short>& psData )
// Common ***********************************************************************
bool CSound::SetHWParams ( snd_pcm_t* handle, const int iBufferSizeIn,
bool CSound::SetHWParams ( snd_pcm_t* handle, const int iDesiredBufferSize,
const int iNumPeriodBlocks )
{
int err;
@ -301,21 +301,39 @@ bool CSound::SetHWParams ( snd_pcm_t* handle, const int iBufferSizeIn,
return true;
}
// set the period size
snd_pcm_uframes_t PeriodSize = iDesiredBufferSize;
if ( err = snd_pcm_hw_params_set_period_size_near ( handle, hwparams, &PeriodSize, 0 ) < 0 )
{
qDebug ( "cannot set period size (%s)\n", snd_strerror ( err ) );
return true;
}
// set the buffer size and period size
snd_pcm_uframes_t BufferFrames = iBufferSizeIn * iNumPeriodBlocks;
snd_pcm_uframes_t BufferFrames = iDesiredBufferSize * iNumPeriodBlocks;
if ( err = snd_pcm_hw_params_set_buffer_size_near ( handle, hwparams, &BufferFrames ) < 0 )
{
qDebug ( "cannot set buffer size (%s)\n", snd_strerror ( err ) );
return true;
}
// set the period size
snd_pcm_uframes_t PeriodSize = iBufferSizeIn;
if ( err = snd_pcm_hw_params_set_period_size_near ( handle, hwparams, &PeriodSize, 0 ) < 0 )
{
qDebug ( "cannot set period size (%s)\n", snd_strerror ( err ) );
return true;
}
// check period and buffer size
snd_pcm_uframes_t period_size;
err = snd_pcm_hw_params_get_period_size ( hwparams, &period_size, 0 );
if ( err < 0 )
{
qDebug ( "Unable to get period size: %s\n", snd_strerror ( err ) );
}
qDebug ( "frame size: %d (desired: %d)", (int) period_size, iDesiredBufferSize );
snd_pcm_uframes_t buffer_size;
if ( err = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size ) < 0 )
{
qDebug ( "Unable to get buffer size: %s\n", snd_strerror ( err ) );
}
qDebug ( "buffer size: %d (desired: %d)", (int) buffer_size, iDesiredBufferSize * iNumPeriodBlocks );
// write the parameters to device
if ( err = snd_pcm_hw_params ( handle, hwparams ) < 0 )
@ -324,24 +342,6 @@ bool CSound::SetHWParams ( snd_pcm_t* handle, const int iBufferSizeIn,
return true;
}
// check period and buffer size
snd_pcm_uframes_t buffer_size;
if ( err = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size ) < 0 )
{
qDebug ( "Unable to get buffer size for playback: %s\n", snd_strerror ( err ) );
}
qDebug ( "buffer size: %d (desired: %d)", (int) buffer_size, iBufferSizeIn * iNumPeriodBlocks );
snd_pcm_uframes_t period_size;
err = snd_pcm_hw_params_get_period_size ( hwparams, &period_size, 0 );
if ( err < 0 )
{
qDebug ( "Unable to get period size for playback: %s\n", snd_strerror ( err ) );
}
qDebug ( "frame size: %d (desired: %d)", (int) period_size, iBufferSizeIn );
// clean-up
snd_pcm_hw_params_free ( hwparams );

View File

@ -648,10 +648,6 @@ CChannel::CChannel ( const bool bNIsServer ) : bIsServer ( bNIsServer ),
SIGNAL ( ConClientListMesReceived ( CVector<CChannelShortInfo> ) ),
SIGNAL ( ConClientListMesReceived ( CVector<CChannelShortInfo> ) ) );
QObject::connect ( &Protocol,
SIGNAL ( ChangeNetwBlSiFact ( int ) ),
this, SLOT ( OnNetwBlSiFactChange ( int ) ) );
QObject::connect( &Protocol, SIGNAL ( ChangeChanGain ( int, double ) ),
this, SLOT ( OnChangeChanGain ( int, double ) ) );
@ -867,11 +863,6 @@ void CChannel::OnSendProtMessage ( CVector<uint8_t> vecMessage )
}
}
void CChannel::OnNetwBlSiFactChange ( int iNewNetwBlSiFact )
{
SetNetwBufSizeFactOut ( iNewNetwBlSiFact );
}
void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
{
SetSockBufSize ( iNewJitBufSize );

View File

@ -203,7 +203,6 @@ protected:
public slots:
void OnSendProtMessage ( CVector<uint8_t> vecMessage );
void OnJittBufSizeChange ( int iNewJitBufSize );
void OnNetwBlSiFactChange ( int iNewNetwBlSiFact );
void OnChangeChanGain ( int iChanID, double dNewGain );
void OnChangeChanName ( QString strName );
void OnNetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps );

View File

@ -33,7 +33,6 @@ CClient::CClient ( const quint16 iPortNumber ) :
iAudioInFader ( AUD_FADER_IN_MIDDLE ),
iReverbLevel ( 0 ),
bReverbOnLeftChan ( false ),
iNetwBufSizeFactIn ( DEF_NET_BLOCK_SIZE_FACTOR ),
strIPAddress ( "" ), strName ( "" ),
bOpenChatOnNewMessage ( true ),
bDoAutoSockBufSize ( true )
@ -77,14 +76,8 @@ for ( int i = 0; i < vecMessage.Size(); i++ ) {
void CClient::OnReqJittBufSize()
{
// TODO cant we implement this OnReqJjittBufSize inside the channel object?
Channel.CreateJitBufMes ( Channel.GetSockBufSize() );
// FIXME: we set the network buffer size factor here, too -> in the
// future a separate request function for this parameter should be created
Channel.CreateNetwBlSiFactMes ( iNetwBufSizeFactIn );
}
void CClient::OnNewConnection()

View File

@ -114,18 +114,6 @@ public:
}
int GetSockBufSize() { return Channel.GetSockBufSize(); }
void SetNetwBufSizeFactIn ( const int iNewNetNetwBlSiFactIn )
{
// store value and tell the server about new value
iNetwBufSizeFactIn = iNewNetNetwBlSiFactIn;
Channel.CreateNetwBlSiFactMes ( iNewNetNetwBlSiFactIn );
}
int GetNetwBufSizeFactIn() { return iNetwBufSizeFactIn; }
void SetNetwBufSizeFactOut ( const int iNetNetwBlSiFact )
{ Channel.SetNetwBufSizeFactOut ( iNetNetwBlSiFact ); }
int GetNetwBufSizeFactOut() { return Channel.GetNetwBufSizeFactOut(); }
void SetAudioCompressionOut ( const EAudComprType eNewAudComprTypeOut )
{
Channel.SetAudioCompressionOut ( eNewAudComprTypeOut );
@ -185,8 +173,6 @@ protected:
int iMonoBlockSizeSam;
int iStereoBlockSizeSam;
int iNetwBufSizeFactIn;
bool bOpenChatOnNewMessage;
CVector<short> vecsAudioSndCrdStereo;

View File

@ -43,11 +43,19 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
TextNetBuf->setWhatsThis ( strJitterBufferSize );
GroupBoxJitterBuffer->setWhatsThis ( strJitterBufferSize );
// init driver button
#ifdef _WIN32
ButtonDriverSetup->setText ( "ASIO Setup" );
#else
// no use for this button for Linux right now, maybe later used
// for Jack
ButtonDriverSetup->hide();
#endif
// init delay information controls
CLEDOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME );
CLEDOverallDelay->Reset();
TextLabelPingTime->setText ( "" );
TextLabelBufferDelay->setText ( "" );
TextLabelOverallDelay->setText ( "" );
// init slider controls ---
@ -55,14 +63,6 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
SliderNetBuf->setRange ( MIN_NET_BUF_SIZE_NUM_BL, MAX_NET_BUF_SIZE_NUM_BL );
UpdateJitterBufferFrame();
// network buffer size factor in
SliderNetBufSiFactIn->setRange ( 1, MAX_NET_BLOCK_SIZE_FACTOR );
const int iCurNetBufSiFactIn = pClient->GetNetwBufSizeFactIn();
SliderNetBufSiFactIn->setValue ( iCurNetBufSiFactIn );
TextNetBufSiFactIn->setText ( "In:\n" + QString().setNum (
double ( iCurNetBufSiFactIn * MIN_SERVER_BLOCK_DURATION_MS ), 'f', 2 ) +
" ms" );
// init combo box containing all available sound cards in the system
cbSoundcard->clear();
for ( int iSndDevIdx = 0; iSndDevIdx < pClient->GetSndInterface()->GetNumDev(); iSndDevIdx++ )
@ -111,9 +111,6 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
QObject::connect ( SliderNetBuf, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderNetBuf ( int ) ) );
QObject::connect ( SliderNetBufSiFactIn, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderNetBufSiFactIn ( int ) ) );
// check boxes
QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) );
@ -124,6 +121,10 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
QObject::connect ( cbSoundcard, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSoundCrdSelection ( int ) ) );
// buttons
QObject::connect ( ButtonDriverSetup, SIGNAL ( clicked() ),
this, SLOT ( OnDriverSetupBut() ) );
// misc
QObject::connect ( pClient, SIGNAL ( PingTimeReceived ( int ) ),
this, SLOT ( OnPingTimeResult ( int ) ) );
@ -162,6 +163,11 @@ void CClientSettingsDlg::hideEvent ( QHideEvent* hideEvent )
TimerPing.stop();
}
void CClientSettingsDlg::OnDriverSetupBut()
{
// TODO write function in Windows sound interface
}
void CClientSettingsDlg::OnSliderNetBuf ( int value )
{
pClient->SetSockBufSize ( value );
@ -169,15 +175,6 @@ void CClientSettingsDlg::OnSliderNetBuf ( int value )
UpdateDisplay();
}
void CClientSettingsDlg::OnSliderNetBufSiFactIn ( int value )
{
pClient->SetNetwBufSizeFactIn ( value );
TextNetBufSiFactIn->setText ( "In:\n" + QString().setNum (
double ( value * MIN_SERVER_BLOCK_DURATION_MS ), 'f', 2 ) +
" ms" );
UpdateDisplay();
}
void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx )
{
try
@ -243,9 +240,13 @@ void CClientSettingsDlg::OnPingTimeResult ( int iPingTime )
- consider the jitter buffer on the server side, too
- assume that the sound card introduces an additional delay of 2 * MIN_SERVER_BLOCK_DURATION_MS
*/
const int iTotalJitterBufferDelayMS = MIN_SERVER_BLOCK_DURATION_MS *
( 2 * pClient->GetSockBufSize() + pClient->GetNetwBufSizeFactIn() +
pClient->GetNetwBufSizeFactOut() ) / 2;
// TODO revise this
const int iTotalJitterBufferDelayMS = 0;
// const int iTotalJitterBufferDelayMS = MIN_SERVER_BLOCK_DURATION_MS *
// ( 2 * pClient->GetSockBufSize() + pClient->GetNetwBufSizeFactIn() +
// pClient->GetNetwBufSizeFactOut() ) / 2;
// TODO consider sound card interface block size
@ -254,8 +255,9 @@ const int iTotalSoundCardDelayMS = 0;
// MIN_SERVER_BLOCK_DURATION_MS * ( pClient->GetSndInterface()->GetInNumBuf() +
// pClient->GetSndInterface()->GetOutNumBuf() ) / 2;
const int iDelayToFillNetworkPackets = MIN_SERVER_BLOCK_DURATION_MS *
( pClient->GetNetwBufSizeFactIn() + pClient->GetNetwBufSizeFactOut() );
// TODO
const int iDelayToFillNetworkPackets = 0;//MIN_SERVER_BLOCK_DURATION_MS *
// ( pClient->GetNetwBufSizeFactIn() + pClient->GetNetwBufSizeFactOut() );
const int iTotalBufferDelay = iDelayToFillNetworkPackets +
iTotalJitterBufferDelayMS + iTotalSoundCardDelayMS;
@ -264,7 +266,6 @@ const int iTotalSoundCardDelayMS = 0;
// apply values to GUI labels, take special care if ping time exceeds
// a certain value
TextLabelBufferDelay->setText ( QString().setNum ( iTotalBufferDelay ) + " ms" );
if ( iPingTime > 500 )
{
const QString sErrorText = "<font color=""red""><b>&#62;500 ms</b></font>";
@ -304,7 +305,6 @@ void CClientSettingsDlg::UpdateDisplay()
{
// clear text labels with client parameters
TextLabelPingTime->setText ( "" );
TextLabelBufferDelay->setText ( "" );
TextLabelOverallDelay->setText ( "" );
}
}

View File

@ -78,10 +78,10 @@ public slots:
void OnTimerStatus() { UpdateDisplay(); }
void OnTimerPing();
void OnSliderNetBuf ( int value );
void OnSliderNetBufSiFactIn ( int value );
void OnAutoJitBuf ( int value );
void OnOpenChatOnNewMessageStateChanged ( int value );
void OnAudioCompressionButtonGroupClicked ( QAbstractButton* button );
void OnPingTimeResult ( int iPingTime );
void OnSoundCrdSelection ( int iSndDevIdx );
void OnDriverSetupBut();
};

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>421</width>
<height>313</height>
<width>562</width>
<height>310</height>
</rect>
</property>
<property name="windowTitle" >
@ -73,9 +73,12 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>
@ -99,9 +102,12 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>
@ -116,9 +122,12 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>16</width>
<width>0</width>
<height>20</height>
</size>
</property>
@ -134,14 +143,14 @@
</property>
<property name="minimumSize" >
<size>
<width>13</width>
<height>13</height>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>13</width>
<height>13</height>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
@ -151,9 +160,12 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>16</width>
<width>0</width>
<height>20</height>
</size>
</property>
@ -165,116 +177,15 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="GroupBoxNetwBuf" >
<widget class="QGroupBox" name="GroupBoxSoundCard" >
<property name="title" >
<string>Block Size</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QLabel" name="TextNetBufSiFactIn" >
<property name="minimumSize" >
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>Size</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSlider" name="SliderNetBufSiFactIn" >
<property name="pageStep" >
<number>1</number>
</property>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="tickPosition" >
<enum>QSlider::TicksBothSides</enum>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="GroupBoxMeasureResults" >
<property name="title" >
<string>Misc</string>
<string>Soundcard</string>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QLabel" name="lSoundcard" >
<widget class="QLabel" name="TextSoundcardDevice" >
<property name="text" >
<string>Soundcard</string>
<string>Device</string>
</property>
</widget>
</item>
@ -294,6 +205,112 @@
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>201</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="GroupBoxSoundCrdBufDelay" >
<property name="title" >
<string>Buffer Delay</string>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QSlider" name="SliderSndCrdBufferDelay" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition" >
<enum>QSlider::TicksBelow</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="TextSndCrdBufDelayPreferred" >
<property name="text" >
<string>Preferred</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabelPreferredSndCrdBufDelay" >
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="TextSndCrdBufDelayActual" >
<property name="text" >
<string>Actual</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabelActualSndCrdBufDelay" >
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="ButtonDriverSetup" >
<property name="text" >
<string>Driver Setup</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="GroupBoxMeasureResults" >
<property name="title" >
<string>Misc</string>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="cbOpenChatOnNewMessage" >
<property name="text" >
<string>Open chat on new message</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxAudioCompressionType" >
<property name="title" >
@ -324,13 +341,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbOpenChatOnNewMessage" >
<property name="text" >
<string>Open chat on new message</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
@ -338,7 +348,7 @@
</property>
<property name="sizeHint" >
<size>
<width>116</width>
<width>201</width>
<height>16</height>
</size>
</property>
@ -346,84 +356,53 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>2</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lPingTime_2" >
<property name="text" >
<string>Buffer Delay</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabelBufferDelay" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label" >
<widget class="QLabel" name="TextPingTime" >
<property name="text" >
<string>+</string>
<string>Ping Time</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
<widget class="QLabel" name="TextLabelPingTime" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="TextOverallDelay" >
<property name="text" >
<string>Overall Delay</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="lPingTime" >
<property name="text" >
<string>Ping Time</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabelPingTime" >
<widget class="QLabel" name="TextLabelOverallDelay" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
@ -436,6 +415,12 @@
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
@ -445,99 +430,61 @@
<property name="text" >
<string>val</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</widget>
</item>
<item>
<widget class="CMultiColorLED" native="1" name="CLEDOverallDelay" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="label_2" >
<widget class="QLabel" name="TextUpstream" >
<property name="text" >
<string>=</string>
<string>Upstream</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>2</number>
<widget class="QLabel" name="TextUpstreamValue" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<item>
<widget class="QLabel" name="lPingTime_3" >
<property name="text" >
<string>Overall Delay</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="TextLabelOverallDelay" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="CMultiColorLED" native="1" name="CLEDOverallDelay" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>13</width>
<height>13</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>13</width>
<height>13</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>val</string>
</property>
</widget>
</item>
</layout>
</item>

View File

@ -78,8 +78,8 @@
// maximum value of factor for network block size
#define MAX_NET_BLOCK_SIZE_FACTOR 3
// default network block size factor
#define DEF_NET_BLOCK_SIZE_FACTOR 3
// default network block size factor (only used for server)
#define DEF_NET_BLOCK_SIZE_FACTOR 2
// minimum/maximum network buffer size (which can be chosen by slider)
#define MIN_NET_BUF_SIZE_NUM_BL 1 // number of blocks
@ -111,7 +111,7 @@
#define LEN_MOV_AV_RESPONSE ( TIME_MOV_AV_RESPONSE * 1000 / MIN_SERVER_BLOCK_DURATION_MS )
// GUI definition: width/heigth size of LED pixmaps
#define LED_WIDTH_HEIGHT_SIZE_PIXEL 13
#define LED_WIDTH_HEIGHT_SIZE_PIXEL 20
#define _MAXSHORT 32767

View File

@ -348,14 +348,14 @@
</property>
<property name="minimumSize" >
<size>
<width>13</width>
<height>13</height>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>13</width>
<height>13</height>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>

View File

@ -105,18 +105,6 @@ void CSettings::ReadIniFile ( const QString& sFileName )
pClient->SetSockBufSize ( iValue );
}
// network buffer size factor in
if ( GetNumericIniSet ( IniXMLDocument, "client", "netwbusifactin", 1, MAX_NET_BLOCK_SIZE_FACTOR, iValue ) )
{
pClient->SetNetwBufSizeFactIn ( iValue );
}
// network buffer size factor out
if ( GetNumericIniSet ( IniXMLDocument, "client", "netwbusifactout", 1, MAX_NET_BLOCK_SIZE_FACTOR, iValue ) )
{
pClient->SetNetwBufSizeFactOut ( iValue );
}
// flag whether the chat window shall be opened on a new chat message
if ( GetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", bValue ) )
{
@ -175,12 +163,6 @@ void CSettings::WriteIniFile ( const QString& sFileName )
// network jitter buffer size
SetNumericIniSet ( IniXMLDocument, "client", "jitbuf", pClient->GetSockBufSize() );
// network buffer size factor in
SetNumericIniSet ( IniXMLDocument, "client", "netwbusifactin", pClient->GetNetwBufSizeFactIn() );
// network buffer size factor out
SetNumericIniSet ( IniXMLDocument, "client", "netwbusifactout", pClient->GetNetwBufSizeFactOut() );
// flag whether the chat window shall be opened on a new chat message
SetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", pClient->GetOpenChatOnNewMessage() );