diff --git a/src/client.cpp b/src/client.cpp index f77e4d7286..339e7acfe6 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -164,6 +164,8 @@ CClient::CClient ( const quint16 iPortNumber, QObject::connect ( &Sound, &CSound::ControllerInFaderIsMute, this, &CClient::OnControllerInFaderIsMute ); + QObject::connect ( &Sound, &CSound::ControllerInMuteMyself, this, &CClient::OnControllerInMuteMyself ); + QObject::connect ( &Socket, &CHighPrioSocket::InvalidPacketReceived, this, &CClient::OnInvalidPacketReceived ); QObject::connect ( pSignalHandler, &CSignalHandler::HandledSignal, this, &CClient::OnHandledSignal ); @@ -704,6 +706,17 @@ void CClient::OnControllerInFaderIsMute ( int iChannelIdx, bool bIsMute ) emit ControllerInFaderIsMute ( iChannelIdx, bIsMute ); } +void CClient::OnControllerInMuteMyself ( bool bMute ) +{ + // in case of a headless client the buttons are not displayed so we need + // to send the controller information directly to the server +#ifdef HEADLESS + // FIXME: no idea what to do here. +#endif + + emit ControllerInMuteMyself ( bMute ); +} + void CClient::OnClientIDReceived ( int iChanID ) { // for headless mode we support to mute our own signal in the personal mix diff --git a/src/client.h b/src/client.h index b7ea19a88a..e7e44da2a9 100644 --- a/src/client.h +++ b/src/client.h @@ -393,6 +393,7 @@ protected slots: void OnControllerInPanValue ( int iChannelIdx, int iValue ); void OnControllerInFaderIsSolo ( int iChannelIdx, bool bIsSolo ); void OnControllerInFaderIsMute ( int iChannelIdx, bool bIsMute ); + void OnControllerInMuteMyself ( bool bMute ); void OnClientIDReceived ( int iChanID ); signals: @@ -423,4 +424,5 @@ protected slots: void ControllerInPanValue ( int iChannelIdx, int iValue ); void ControllerInFaderIsSolo ( int iChannelIdx, bool bIsSolo ); void ControllerInFaderIsMute ( int iChannelIdx, bool bIsMute ); + void ControllerInMuteMyself ( bool bMute ); }; diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 4cb9b971f0..148870c860 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -507,6 +507,8 @@ CClientDlg::CClientDlg ( CClient* pNCliP, QObject::connect ( pClient, &CClient::ControllerInFaderIsMute, this, &CClientDlg::OnControllerInFaderIsMute ); + QObject::connect ( pClient, &CClient::ControllerInMuteMyself, this, &CClientDlg::OnControllerInMuteMyself ); + QObject::connect ( pClient, &CClient::CLChannelLevelListReceived, this, &CClientDlg::OnCLChannelLevelListReceived ); QObject::connect ( pClient, &CClient::VersionAndOSReceived, this, &CClientDlg::OnVersionAndOSReceived ); diff --git a/src/clientdlg.h b/src/clientdlg.h index ffab3b3322..bbcc604766 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -147,6 +147,8 @@ public slots: void OnControllerInFaderIsMute ( const int iChannelIdx, const bool bIsMute ) { MainMixerBoard->SetFaderIsMute ( iChannelIdx, bIsMute ); } + void OnControllerInMuteMyself ( const bool bMute ) { chbLocalMute->setChecked ( bMute ); } + void OnVersionAndOSReceived ( COSUtil::EOpSystemType, QString strVersion ); void OnCLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString strVersion ); diff --git a/src/soundbase.cpp b/src/soundbase.cpp index a541d9f16c..dc34574a09 100644 --- a/src/soundbase.cpp +++ b/src/soundbase.cpp @@ -28,11 +28,12 @@ // a single character to an EMidiCtlType char const sMidiCtlChar[] = { // Has to follow order of EMidiCtlType - /* [EMidiCtlType::Fader] = */ 'f', - /* [EMidiCtlType::Pan] = */ 'p', - /* [EMidiCtlType::Solo] = */ 's', - /* [EMidiCtlType::Mute] = */ 'm', - /* [EMidiCtlType::None] = */ '\0' }; + /* [EMidiCtlType::Fader] = */ 'f', + /* [EMidiCtlType::Pan] = */ 'p', + /* [EMidiCtlType::Solo] = */ 's', + /* [EMidiCtlType::Mute] = */ 'm', + /* [EMidiCtlType::MuteMyself] = */ 'o', + /* [EMidiCtlType::None] = */ '\0' }; /* Implementation *************************************************************/ CSoundBase::CSoundBase ( const QString& strNewSystemDriverTechniqueName, @@ -392,6 +393,12 @@ void CSoundBase::ParseMIDIMessage ( const CVector& vMIDIPaketBytes ) emit ControllerInFaderIsMute ( cCtrl.iChannel, iValue >= 0x40 ); } break; + case MuteMyself: + { + // We depend on toggles reflecting the desired state to Mute Myself + emit ControllerInMuteMyself ( iValue >= 0x40 ); + } + break; default: break; } diff --git a/src/soundbase.h b/src/soundbase.h index 525dce675b..2249904aec 100644 --- a/src/soundbase.h +++ b/src/soundbase.h @@ -48,6 +48,7 @@ enum EMidiCtlType Pan, Solo, Mute, + MuteMyself, None }; @@ -171,4 +172,5 @@ class CSoundBase : public QThread void ControllerInPanValue ( int iChannelIdx, int iValue ); void ControllerInFaderIsSolo ( int iChannelIdx, bool bIsSolo ); void ControllerInFaderIsMute ( int iChannelIdx, bool bIsMute ); + void ControllerInMuteMyself ( bool bMute ); };