Skip to content

Commit e1aab44

Browse files
committed
Use INVALID_MIDI_CH for Mixer UI switch
1 parent 42ce439 commit e1aab44

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

src/client.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ class CClient : public QObject
272272
Channel.GetBufErrorRates ( vecErrRates, dLimit, dMaxUpLimit );
273273
}
274274

275+
bool IsMIDIEnabled() { return Sound.IsMIDIEnabled(); }
276+
275277
// settings
276278
CChannelCoreInfo ChannelInfo;
277279
QString strClientName;

src/clientdlg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
CClientDlg::CClientDlg ( CClient* pNCliP,
2929
CClientSettings* pNSetP,
3030
const QString& strConnOnStartupAddress,
31-
const QString& strMIDISetup,
3231
const bool bNewShowComplRegConnList,
3332
const bool bShowAnalyzerConsole,
3433
const bool bMuteStream,
@@ -219,7 +218,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
219218
MainMixerBoard->SetNumMixerPanelRows ( pSettings->iNumMixerPanelRows );
220219

221220
// Pass through flag for MIDICtrlUsed
222-
MainMixerBoard->SetMIDICtrlUsed ( !strMIDISetup.isEmpty() );
221+
MainMixerBoard->SetMIDICtrlUsed ( pClient->IsMIDIEnabled() );
223222

224223
// reset mixer board
225224
MainMixerBoard->HideAll();

src/clientdlg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
7777
CClientDlg ( CClient* pNCliP,
7878
CClientSettings* pNSetP,
7979
const QString& strConnOnStartupAddress,
80-
const QString& strMIDISetup,
8180
const bool bNewShowComplRegConnList,
8281
const bool bShowAnalyzerConsole,
8382
const bool bMuteStream,

src/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ int main ( int argc, char** argv )
953953
CClientDlg ClientDlg ( &Client,
954954
&Settings,
955955
strConnOnStartupAddress,
956-
strMIDISetup,
957956
bShowComplRegConnList,
958957
bShowAnalyzerConsole,
959958
bMuteStream,

src/sound/soundbase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class CSoundBase : public QThread
115115
// in a callback function it has to be public -> better solution
116116
void EmitReinitRequestSignal ( const ESndCrdResetType eSndCrdResetType ) { emit ReinitRequest ( eSndCrdResetType ); }
117117

118+
bool IsMIDIEnabled() { return iCtrlMIDIChannel != INVALID_MIDI_CH; }
119+
118120
protected:
119121
virtual QString LoadAndInitializeDriver ( QString, bool ) { return ""; }
120122
virtual void UnloadCurrentDriver() {}

0 commit comments

Comments
 (0)