diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 63182a05..0332a230 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -250,6 +250,11 @@ void CChannelFader::SetFaderIsSolo ( const bool bIsSolo ) pcbSolo->setChecked ( bIsSolo ); } +void CChannelFader::SetFaderIsMute ( const bool bIsMute ) { + // changing the state automatically emits the signal, too + pcbMute->setChecked ( bIsMute ); +} + void CChannelFader::SendFaderLevelToServer ( const int iLevel ) { // if mute flag is set or other channel is on solo, do not apply the new @@ -468,6 +473,7 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) : vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ), vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ), vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ), + vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ), iNewClientFaderLevel ( 100 ), bNoFaderVisible ( true ) { @@ -690,13 +696,16 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecChanInf // stored settings if we have a matching entry int iStoredFaderLevel; bool bStoredFaderIsSolo; + bool bStoredFaderIsMute; if ( GetStoredFaderSettings ( vecChanInfo[j], iStoredFaderLevel, - bStoredFaderIsSolo ) ) + bStoredFaderIsSolo, + bStoredFaderIsMute ) ) { vecpChanFader[i]->SetFaderLevel ( iStoredFaderLevel ); vecpChanFader[i]->SetFaderIsSolo ( bStoredFaderIsSolo ); + vecpChanFader[i]->SetFaderIsMute ( bStoredFaderIsMute ); } } @@ -783,6 +792,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader ) { CVector viOldStoredFaderLevels ( vecStoredFaderLevels ); CVector vbOldStoredFaderIsSolo ( vecStoredFaderIsSolo ); + CVector vbOldStoredFaderIsMute ( vecStoredFaderIsMute ); // init temporary list count (may be overwritten later on) int iTempListCnt = 0; @@ -795,6 +805,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader ) // current fader level and solo state is at the top of the list vecStoredFaderLevels[0] = pChanFader->GetFaderLevel(); vecStoredFaderIsSolo[0] = pChanFader->IsSolo(); + vecStoredFaderIsMute[0] = pChanFader->IsMute(); iTempListCnt = 1; for ( int iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ ) @@ -809,6 +820,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader ) { vecStoredFaderLevels[iTempListCnt] = viOldStoredFaderLevels[iIdx]; vecStoredFaderIsSolo[iTempListCnt] = vbOldStoredFaderIsSolo[iIdx]; + vecStoredFaderIsMute[iTempListCnt] = vbOldStoredFaderIsMute[iIdx]; iTempListCnt++; } @@ -819,7 +831,8 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader ) bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo, int& iStoredFaderLevel, - bool& bStoredFaderIsSolo ) + bool& bStoredFaderIsSolo, + bool& bStoredFaderIsMute) { // only do the check if the name string is not empty if ( !ChanInfo.strName.isEmpty() ) @@ -831,7 +844,8 @@ bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo, { // copy stored settings values iStoredFaderLevel = vecStoredFaderLevels[iIdx]; - bStoredFaderIsSolo = vecStoredFaderIsSolo[iIdx] != false; + bStoredFaderIsSolo = vecStoredFaderIsSolo[iIdx] != 0; + bStoredFaderIsMute = vecStoredFaderIsMute[iIdx] != 0; // values found and copied, return OK return true; diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index a8c7e101..e22c485d 100755 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -53,11 +53,13 @@ public: void Hide() { pFrame->hide(); } bool IsVisible() { return plblLabel->isVisible(); } bool IsSolo() { return pcbSolo->isChecked(); } + bool IsMute() { return pcbMute->isChecked(); } void SetGUIDesign ( const EGUIDesign eNewDesign ); void UpdateSoloState ( const bool bNewOtherSoloState ); void SetFaderLevel ( const int iLevel ); void SetFaderIsSolo ( const bool bIsSolo ); + void SetFaderIsMute ( const bool bIsMute ); int GetFaderLevel() { return pFader->value(); } void Reset(); @@ -109,12 +111,15 @@ public: CVector vecStoredFaderTags; CVector vecStoredFaderLevels; CVector vecStoredFaderIsSolo; + CVector vecStoredFaderIsMute; int iNewClientFaderLevel; protected: bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo, int& iStoredFaderLevel, - bool& bStoredFaderIsSolo ); + bool& bStoredFaderIsSolo, + bool& bStoredFaderIsMute ); + void StoreFaderSettings ( CChannelFader* pChanFader ); void UpdateSoloStates(); diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index 7ed41376..1a06c53e 100755 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -98,7 +98,7 @@ void CChatDlg::AddChatText ( QString strChatText ) #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) txvChatWindow, 0, QAccessible::ValueChanged #else - new QAccessibleEvent ( txvChatWindow, QAccessible::ValueChanged ) + new QAccessibleValueChangeEvent ( txvChatWindow, strChatText ) #endif ); } diff --git a/src/client.cpp b/src/client.cpp index 54bfc0bd..aa8338de 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -35,6 +35,7 @@ CClient::CClient ( const quint16 iPortNumber, vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ), vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ), vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ), + vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ), iNewClientFaderLevel ( 100 ), vecWindowPosMain (), // empty array vecWindowPosSettings (), // empty array diff --git a/src/client.h b/src/client.h index f88641c8..62ea9ec7 100755 --- a/src/client.h +++ b/src/client.h @@ -282,6 +282,7 @@ public: CVector vecStoredFaderTags; CVector vecStoredFaderLevels; CVector vecStoredFaderIsSolo; + CVector vecStoredFaderIsMute; int iNewClientFaderLevel; // window position/state settings diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 39551f3a..06b90e97 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -189,6 +189,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags; MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels; MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo; + MainMixerBoard->vecStoredFaderIsMute = pClient->vecStoredFaderIsMute; MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; // init status label @@ -568,6 +569,7 @@ void CClientDlg::closeEvent ( QCloseEvent* Event ) pClient->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags; pClient->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels; pClient->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo; + pClient->vecStoredFaderIsMute = MainMixerBoard->vecStoredFaderIsMute; pClient->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel; // default implementation of this event handler routine diff --git a/src/global.h b/src/global.h index 6e2040ab..1a31c214 100755 --- a/src/global.h +++ b/src/global.h @@ -165,7 +165,7 @@ LED bar: lbr #define MAX_NUM_SERVER_ADDR_ITEMS 6 // maximum number of fader settings to be stored (together with the fader tags) -#define MAX_NUM_STORED_FADER_SETTINGS 70 +#define MAX_NUM_STORED_FADER_SETTINGS 200 // defines for LED input level meter #define NUM_STEPS_INP_LEV_METER 8 diff --git a/src/settings.cpp b/src/settings.cpp index 93ec691b..df592e16 100755 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -88,6 +88,17 @@ void CSettings::Load() } } + // stored fader muted state + for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ ) + { + if ( GetFlagIniSet ( IniXMLDocument, "client", + QString ( "storedfaderismute%1" ).arg ( iIdx ), + bValue ) ) + { + pClient->vecStoredFaderIsMute[iIdx] = bValue; + } + } + // new client level if ( GetNumericIniSet ( IniXMLDocument, "client", "newclientlevel", 0, 100, iValue ) ) @@ -392,7 +403,15 @@ void CSettings::Save() { SetFlagIniSet ( IniXMLDocument, "client", QString ( "storedfaderissolo%1" ).arg ( iIdx ), - pClient->vecStoredFaderIsSolo[iIdx] != false ); + pClient->vecStoredFaderIsSolo[iIdx] != 0 ); + } + + // stored fader muted states + for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ ) + { + SetFlagIniSet ( IniXMLDocument, "client", + QString ( "storedfaderismute%1" ).arg ( iIdx ), + pClient->vecStoredFaderIsMute[iIdx] != 0 ); } // new client level