Skip to content

Commit a5af8cc

Browse files
committed
Revert some changes for now
1 parent 38fb414 commit a5af8cc

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

src/client.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ void CClient::Init()
942942
bFraSiFactSafeSupported = true;
943943
#else
944944
bFraSiFactPrefSupported = ( Sound.Init ( iFraSizePreffered ) == iFraSizePreffered );
945-
bFraSiFactDefSupported = ( Sound.Init ( iFraSizeDefault ) == iFraSizeDefault );
945+
bFraSiFactDefSupported = ( Sound.Init ( iFraSizeDefault ) == iFraSizeDefault );
946946
bFraSiFactSafeSupported = ( Sound.Init ( iFraSizeSafe ) == iFraSizeSafe );
947947
#endif
948948

src/client.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ class CClient : public QObject
121121
bool Connect ( QString strServerAddress, QString strServerName );
122122
bool Disconnect();
123123

124-
bool SoundIsRunning() const { return Sound.IsCallbackEntered(); } // For OnTimerCheckAudioDeviceOk only
125-
bool IsConnected() { return Channel.IsConnected(); }
124+
bool IsRunning() { return Sound.IsRunning(); }
125+
bool IsCallbackEntered() const { return Sound.IsCallbackEntered(); } // For OnTimerCheckAudioDeviceOk only
126126

127127
double GetLevelForMeterdBLeft() { return SignalLevelMeter.GetLevelForMeterdBLeftOrMono(); }
128128
double GetLevelForMeterdBRight() { return SignalLevelMeter.GetLevelForMeterdBRight(); }
129129

130130
bool GetAndResetbJitterBufferOKFlag();
131+
132+
bool IsConnected() { return Channel.IsConnected(); }
131133

132134
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
133135
void SetGUIDesign ( const EGUIDesign eNGD ) { eGUIDesign = eNGD; }

src/clientdlg.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ void CClientDlg::OnChatTextReceived ( QString strChatText )
827827
// always when a new message arrives since this is annoying.
828828
ShowChatWindow ( ( strChatText.indexOf ( WELCOME_MESSAGE_PREFIX ) == 0 ) );
829829

830-
UpdateSettingsAndChatButtons();
830+
UpdateDisplay();
831831
}
832832

833833
void CClientDlg::OnLicenceRequired ( ELicenceType eLicenceType )
@@ -982,7 +982,7 @@ void CClientDlg::ShowChatWindow ( const bool bForceRaise )
982982
ChatDlg.activateWindow();
983983
}
984984

985-
UpdateSettingsAndChatButtons();
985+
UpdateDisplay();
986986
}
987987

988988
void CClientDlg::ShowAnalyzerConsole()
@@ -1132,7 +1132,7 @@ void CClientDlg::OnTimerCheckAudioDeviceOk()
11321132
// timeout to check if a valid device is selected and if we do not have
11331133
// fundamental settings errors (in which case the GUI would only show that
11341134
// it is trying to connect the server which does not help to solve the problem (#129))
1135-
if ( !pClient->SoundIsRunning() )
1135+
if ( !pClient->IsCallbackEntered() )
11361136
{
11371137
QMessageBox::warning ( this,
11381138
APP_NAME,
@@ -1220,7 +1220,7 @@ void CClientDlg::OnDisconnect()
12201220
TimerDetectFeedback.stop();
12211221
bDetectFeedback = false;
12221222

1223-
UpdateSettingsAndChatButtons();
1223+
UpdateDisplay();
12241224

12251225
// reset LEDs
12261226
ledBuffers->Reset();
@@ -1238,7 +1238,7 @@ void CClientDlg::OnDisconnect()
12381238
SetMixerBoardDeco ( RS_UNDEFINED, pClient->GetGUIDesign() );
12391239
}
12401240

1241-
void CClientDlg::UpdateSettingsAndChatButtons()
1241+
void CClientDlg::UpdateDisplay()
12421242
{
12431243
// update settings/chat buttons (do not fire signals since it is an update)
12441244
if ( chbSettings->isChecked() && !ClientSettingsDlg.isVisible() )

src/clientdlg.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
9292
void ShowChatWindow ( const bool bForceRaise = true );
9393
void ShowAnalyzerConsole();
9494
void UpdateAudioFaderSlider();
95-
void ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept );
9695
void UpdateRevSelection();
96+
void ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept );
9797
void SetPingTime ( const int iPingTime, const int iOverallDelayMs, const CMultiColorLED::ELightColor eOverallDelayLEDColor );
9898

9999
CClient* pClient;
@@ -116,7 +116,7 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
116116
virtual void closeEvent ( QCloseEvent* Event );
117117
virtual void dragEnterEvent ( QDragEnterEvent* Event ) { ManageDragNDrop ( Event, true ); }
118118
virtual void dropEvent ( QDropEvent* Event ) { ManageDragNDrop ( Event, false ); }
119-
void UpdateSettingsAndChatButtons();
119+
void UpdateDisplay();
120120

121121
CClientSettingsDlg ClientSettingsDlg;
122122
CChatDlg ChatDlg;
@@ -132,7 +132,7 @@ public slots:
132132
void OnTimerCheckAudioDeviceOk();
133133
void OnTimerDetectFeedback();
134134

135-
void OnTimerStatus() { UpdateSettingsAndChatButtons(); }
135+
void OnTimerStatus() { UpdateDisplay(); }
136136

137137
void OnTimerPing();
138138
void OnPingTimeResult ( int iPingTime );

src/main.cpp

+15-3
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,13 @@ int main ( int argc, char** argv )
919919
{
920920
// Client:
921921
// actual client object
922-
CClient Client ( iPortNumber, iQosNumber, strMIDISetup, bNoAutoJackConnect, strClientName, bEnableIPv6, bMuteMeInPersonalMix );
922+
CClient Client ( iPortNumber,
923+
iQosNumber,
924+
strMIDISetup,
925+
bNoAutoJackConnect,
926+
strClientName,
927+
bEnableIPv6,
928+
bMuteMeInPersonalMix );
923929

924930
// load settings from init-file (command line options override)
925931
CClientSettings Settings ( &Client, strIniFileName );
@@ -943,8 +949,14 @@ int main ( int argc, char** argv )
943949
}
944950

945951
// GUI object
946-
CClientDlg
947-
ClientDlg ( &Client, &Settings, strMIDISetup, bShowComplRegConnList, bShowAnalyzerConsole, bMuteStream, bEnableIPv6, nullptr );
952+
CClientDlg ClientDlg ( &Client,
953+
&Settings,
954+
strMIDISetup,
955+
bShowComplRegConnList,
956+
bShowAnalyzerConsole,
957+
bMuteStream,
958+
bEnableIPv6,
959+
nullptr );
948960

949961
// show dialog
950962
ClientDlg.show();

0 commit comments

Comments
 (0)