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 *********************************************************************** // Common ***********************************************************************
bool CSound::SetHWParams ( snd_pcm_t* handle, const int iBufferSizeIn, bool CSound::SetHWParams ( snd_pcm_t* handle, const int iDesiredBufferSize,
const int iNumPeriodBlocks ) const int iNumPeriodBlocks )
{ {
int err; int err;
@ -301,21 +301,39 @@ bool CSound::SetHWParams ( snd_pcm_t* handle, const int iBufferSizeIn,
return true; 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 // 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 ) if ( err = snd_pcm_hw_params_set_buffer_size_near ( handle, hwparams, &BufferFrames ) < 0 )
{ {
qDebug ( "cannot set buffer size (%s)\n", snd_strerror ( err ) ); qDebug ( "cannot set buffer size (%s)\n", snd_strerror ( err ) );
return true; return true;
} }
// set the period size // check period and buffer size
snd_pcm_uframes_t PeriodSize = iBufferSizeIn; snd_pcm_uframes_t period_size;
if ( err = snd_pcm_hw_params_set_period_size_near ( handle, hwparams, &PeriodSize, 0 ) < 0 ) err = snd_pcm_hw_params_get_period_size ( hwparams, &period_size, 0 );
if ( err < 0 )
{ {
qDebug ( "cannot set period size (%s)\n", snd_strerror ( err ) ); qDebug ( "Unable to get period size: %s\n", snd_strerror ( err ) );
return true;
} }
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 // write the parameters to device
if ( err = snd_pcm_hw_params ( handle, hwparams ) < 0 ) 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; 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 // clean-up
snd_pcm_hw_params_free ( hwparams ); 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> ) ),
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 ) ), QObject::connect( &Protocol, SIGNAL ( ChangeChanGain ( int, double ) ),
this, SLOT ( OnChangeChanGain ( 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 ) void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
{ {
SetSockBufSize ( iNewJitBufSize ); SetSockBufSize ( iNewJitBufSize );

View file

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

View file

@ -33,7 +33,6 @@ CClient::CClient ( const quint16 iPortNumber ) :
iAudioInFader ( AUD_FADER_IN_MIDDLE ), iAudioInFader ( AUD_FADER_IN_MIDDLE ),
iReverbLevel ( 0 ), iReverbLevel ( 0 ),
bReverbOnLeftChan ( false ), bReverbOnLeftChan ( false ),
iNetwBufSizeFactIn ( DEF_NET_BLOCK_SIZE_FACTOR ),
strIPAddress ( "" ), strName ( "" ), strIPAddress ( "" ), strName ( "" ),
bOpenChatOnNewMessage ( true ), bOpenChatOnNewMessage ( true ),
bDoAutoSockBufSize ( true ) bDoAutoSockBufSize ( true )
@ -77,14 +76,8 @@ for ( int i = 0; i < vecMessage.Size(); i++ ) {
void CClient::OnReqJittBufSize() void CClient::OnReqJittBufSize()
{ {
// TODO cant we implement this OnReqJjittBufSize inside the channel object? // TODO cant we implement this OnReqJjittBufSize inside the channel object?
Channel.CreateJitBufMes ( Channel.GetSockBufSize() ); 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() void CClient::OnNewConnection()

View file

@ -114,18 +114,6 @@ public:
} }
int GetSockBufSize() { return Channel.GetSockBufSize(); } 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 ) void SetAudioCompressionOut ( const EAudComprType eNewAudComprTypeOut )
{ {
Channel.SetAudioCompressionOut ( eNewAudComprTypeOut ); Channel.SetAudioCompressionOut ( eNewAudComprTypeOut );
@ -185,8 +173,6 @@ protected:
int iMonoBlockSizeSam; int iMonoBlockSizeSam;
int iStereoBlockSizeSam; int iStereoBlockSizeSam;
int iNetwBufSizeFactIn;
bool bOpenChatOnNewMessage; bool bOpenChatOnNewMessage;
CVector<short> vecsAudioSndCrdStereo; CVector<short> vecsAudioSndCrdStereo;

View file

@ -43,11 +43,19 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
TextNetBuf->setWhatsThis ( strJitterBufferSize ); TextNetBuf->setWhatsThis ( strJitterBufferSize );
GroupBoxJitterBuffer->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 // init delay information controls
CLEDOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME ); CLEDOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME );
CLEDOverallDelay->Reset(); CLEDOverallDelay->Reset();
TextLabelPingTime->setText ( "" ); TextLabelPingTime->setText ( "" );
TextLabelBufferDelay->setText ( "" );
TextLabelOverallDelay->setText ( "" ); TextLabelOverallDelay->setText ( "" );
// init slider controls --- // 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 ); SliderNetBuf->setRange ( MIN_NET_BUF_SIZE_NUM_BL, MAX_NET_BUF_SIZE_NUM_BL );
UpdateJitterBufferFrame(); 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 // init combo box containing all available sound cards in the system
cbSoundcard->clear(); cbSoundcard->clear();
for ( int iSndDevIdx = 0; iSndDevIdx < pClient->GetSndInterface()->GetNumDev(); iSndDevIdx++ ) 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 ) ), QObject::connect ( SliderNetBuf, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderNetBuf ( int ) ) ); this, SLOT ( OnSliderNetBuf ( int ) ) );
QObject::connect ( SliderNetBufSiFactIn, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderNetBufSiFactIn ( int ) ) );
// check boxes // check boxes
QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ), QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) ); this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) );
@ -124,6 +121,10 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
QObject::connect ( cbSoundcard, SIGNAL ( activated ( int ) ), QObject::connect ( cbSoundcard, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSoundCrdSelection ( int ) ) ); this, SLOT ( OnSoundCrdSelection ( int ) ) );
// buttons
QObject::connect ( ButtonDriverSetup, SIGNAL ( clicked() ),
this, SLOT ( OnDriverSetupBut() ) );
// misc // misc
QObject::connect ( pClient, SIGNAL ( PingTimeReceived ( int ) ), QObject::connect ( pClient, SIGNAL ( PingTimeReceived ( int ) ),
this, SLOT ( OnPingTimeResult ( int ) ) ); this, SLOT ( OnPingTimeResult ( int ) ) );
@ -162,6 +163,11 @@ void CClientSettingsDlg::hideEvent ( QHideEvent* hideEvent )
TimerPing.stop(); TimerPing.stop();
} }
void CClientSettingsDlg::OnDriverSetupBut()
{
// TODO write function in Windows sound interface
}
void CClientSettingsDlg::OnSliderNetBuf ( int value ) void CClientSettingsDlg::OnSliderNetBuf ( int value )
{ {
pClient->SetSockBufSize ( value ); pClient->SetSockBufSize ( value );
@ -169,15 +175,6 @@ void CClientSettingsDlg::OnSliderNetBuf ( int value )
UpdateDisplay(); 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 ) void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx )
{ {
try try
@ -243,9 +240,13 @@ void CClientSettingsDlg::OnPingTimeResult ( int iPingTime )
- consider the jitter buffer on the server side, too - 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 - 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() + // TODO revise this
pClient->GetNetwBufSizeFactOut() ) / 2;
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 // TODO consider sound card interface block size
@ -254,8 +255,9 @@ const int iTotalSoundCardDelayMS = 0;
// MIN_SERVER_BLOCK_DURATION_MS * ( pClient->GetSndInterface()->GetInNumBuf() + // MIN_SERVER_BLOCK_DURATION_MS * ( pClient->GetSndInterface()->GetInNumBuf() +
// pClient->GetSndInterface()->GetOutNumBuf() ) / 2; // pClient->GetSndInterface()->GetOutNumBuf() ) / 2;
const int iDelayToFillNetworkPackets = MIN_SERVER_BLOCK_DURATION_MS * // TODO
( pClient->GetNetwBufSizeFactIn() + pClient->GetNetwBufSizeFactOut() ); const int iDelayToFillNetworkPackets = 0;//MIN_SERVER_BLOCK_DURATION_MS *
// ( pClient->GetNetwBufSizeFactIn() + pClient->GetNetwBufSizeFactOut() );
const int iTotalBufferDelay = iDelayToFillNetworkPackets + const int iTotalBufferDelay = iDelayToFillNetworkPackets +
iTotalJitterBufferDelayMS + iTotalSoundCardDelayMS; iTotalJitterBufferDelayMS + iTotalSoundCardDelayMS;
@ -264,7 +266,6 @@ const int iTotalSoundCardDelayMS = 0;
// apply values to GUI labels, take special care if ping time exceeds // apply values to GUI labels, take special care if ping time exceeds
// a certain value // a certain value
TextLabelBufferDelay->setText ( QString().setNum ( iTotalBufferDelay ) + " ms" );
if ( iPingTime > 500 ) if ( iPingTime > 500 )
{ {
const QString sErrorText = "<font color=""red""><b>&#62;500 ms</b></font>"; 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 // clear text labels with client parameters
TextLabelPingTime->setText ( "" ); TextLabelPingTime->setText ( "" );
TextLabelBufferDelay->setText ( "" );
TextLabelOverallDelay->setText ( "" ); TextLabelOverallDelay->setText ( "" );
} }
} }

View file

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

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>421</width> <width>562</width>
<height>313</height> <height>310</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@ -73,9 +73,12 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>40</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -99,9 +102,12 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>40</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -116,9 +122,12 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>16</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -134,14 +143,14 @@
</property> </property>
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>13</width> <width>20</width>
<height>13</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximumSize" > <property name="maximumSize" >
<size> <size>
<width>13</width> <width>20</width>
<height>13</height> <height>20</height>
</size> </size>
</property> </property>
</widget> </widget>
@ -151,9 +160,12 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>16</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -165,117 +177,16 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="GroupBoxNetwBuf" > <widget class="QGroupBox" name="GroupBoxSoundCard" >
<property name="title" > <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>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QLabel" name="lSoundcard" >
<property name="text" >
<string>Soundcard</string> <string>Soundcard</string>
</property> </property>
<layout class="QVBoxLayout" >
<item>
<widget class="QLabel" name="TextSoundcardDevice" >
<property name="text" >
<string>Device</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -294,6 +205,112 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<widget class="QGroupBox" name="groupBoxAudioCompressionType" > <widget class="QGroupBox" name="groupBoxAudioCompressionType" >
<property name="title" > <property name="title" >
@ -324,13 +341,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="cbOpenChatOnNewMessage" >
<property name="text" >
<string>Open chat on new message</string>
</property>
</widget>
</item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
@ -338,7 +348,7 @@
</property> </property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>116</width> <width>201</width>
<height>16</height> <height>16</height>
</size> </size>
</property> </property>
@ -346,80 +356,11 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="spacing" >
<number>2</number>
</property>
<item> <item>
<layout class="QVBoxLayout" > <widget class="QLabel" name="TextPingTime" >
<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" >
<property name="text" >
<string>+</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lPingTime" >
<property name="text" > <property name="text" >
<string>Ping Time</string> <string>Ping Time</string>
</property> </property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -445,36 +386,17 @@
<property name="text" > <property name="text" >
<string>val</string> <string>val</string>
</property> </property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2" > <layout class="QHBoxLayout" >
<property name="text" >
<string>=</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QVBoxLayout" > <widget class="QLabel" name="TextOverallDelay" >
<property name="spacing" >
<number>2</number>
</property>
<item>
<widget class="QLabel" name="lPingTime_3" >
<property name="text" > <property name="text" >
<string>Overall Delay</string> <string>Overall Delay</string>
</property> </property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -508,9 +430,6 @@
<property name="text" > <property name="text" >
<string>val</string> <string>val</string>
</property> </property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -523,14 +442,14 @@
</property> </property>
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>13</width> <width>20</width>
<height>13</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximumSize" > <property name="maximumSize" >
<size> <size>
<width>13</width> <width>20</width>
<height>13</height> <height>20</height>
</size> </size>
</property> </property>
</widget> </widget>
@ -539,6 +458,34 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="TextUpstream" >
<property name="text" >
<string>Upstream</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextUpstreamValue" >
<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>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>

View file

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

View file

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

View file

@ -105,18 +105,6 @@ void CSettings::ReadIniFile ( const QString& sFileName )
pClient->SetSockBufSize ( iValue ); 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 // flag whether the chat window shall be opened on a new chat message
if ( GetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", bValue ) ) if ( GetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", bValue ) )
{ {
@ -175,12 +163,6 @@ void CSettings::WriteIniFile ( const QString& sFileName )
// network jitter buffer size // network jitter buffer size
SetNumericIniSet ( IniXMLDocument, "client", "jitbuf", pClient->GetSockBufSize() ); 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 // flag whether the chat window shall be opened on a new chat message
SetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", pClient->GetOpenChatOnNewMessage() ); SetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage", pClient->GetOpenChatOnNewMessage() );