Skip to content

Commit

Permalink
Use INVALID_MIDI_CH for Mixer UI switch
Browse files Browse the repository at this point in the history
  • Loading branch information
pljones committed Oct 26, 2024
1 parent 8b26969 commit cd31d25
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ class CClient : public QObject
Channel.GetBufErrorRates ( vecErrRates, dLimit, dMaxUpLimit );
}

bool IsMIDIEnabled() { return Sound.IsMIDIEnabled(); }

// settings
CChannelCoreInfo ChannelInfo;
QString strClientName;
Expand Down
3 changes: 1 addition & 2 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
CClientDlg::CClientDlg ( CClient* pNCliP,
CClientSettings* pNSetP,
const QString& strConnOnStartupAddress,
const QString& strMIDISetup,
const bool bNewShowComplRegConnList,
const bool bShowAnalyzerConsole,
const bool bMuteStream,
Expand Down Expand Up @@ -219,7 +218,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
MainMixerBoard->SetNumMixerPanelRows ( pSettings->iNumMixerPanelRows );

// Pass through flag for MIDICtrlUsed
MainMixerBoard->SetMIDICtrlUsed ( !strMIDISetup.isEmpty() );
MainMixerBoard->SetMIDICtrlUsed ( pClient->IsMIDIEnabled() );

// reset mixer board
MainMixerBoard->HideAll();
Expand Down
1 change: 0 additions & 1 deletion src/clientdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
CClientDlg ( CClient* pNCliP,
CClientSettings* pNSetP,
const QString& strConnOnStartupAddress,
const QString& strMIDISetup,
const bool bNewShowComplRegConnList,
const bool bShowAnalyzerConsole,
const bool bMuteStream,
Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,6 @@ int main ( int argc, char** argv )
CClientDlg ClientDlg ( &Client,
&Settings,
strConnOnStartupAddress,
strMIDISetup,
bShowComplRegConnList,
bShowAnalyzerConsole,
bMuteStream,
Expand Down
2 changes: 2 additions & 0 deletions src/sound/soundbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class CSoundBase : public QThread
// in a callback function it has to be public -> better solution
void EmitReinitRequestSignal ( const ESndCrdResetType eSndCrdResetType ) { emit ReinitRequest ( eSndCrdResetType ); }

bool IsMIDIEnabled() { return iCtrlMIDIChannel != INVALID_MIDI_CH; }

protected:
virtual QString LoadAndInitializeDriver ( QString, bool ) { return ""; }
virtual void UnloadCurrentDriver() {}
Expand Down

0 comments on commit cd31d25

Please sign in to comment.