Store mute settings for faders.
Also increase stored fader settings capacity to 200, since up to 50 clients are now supported.
This commit is contained in:
parent
0bdf6a45ae
commit
83fb9d47b5
8 changed files with 49 additions and 7 deletions
|
@ -250,6 +250,11 @@ void CChannelFader::SetFaderIsSolo ( const bool bIsSolo )
|
||||||
pcbSolo->setChecked ( 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 )
|
void CChannelFader::SendFaderLevelToServer ( const int iLevel )
|
||||||
{
|
{
|
||||||
// if mute flag is set or other channel is on solo, do not apply the new
|
// 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, "" ),
|
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
|
||||||
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
||||||
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||||
|
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||||
iNewClientFaderLevel ( 100 ),
|
iNewClientFaderLevel ( 100 ),
|
||||||
bNoFaderVisible ( true )
|
bNoFaderVisible ( true )
|
||||||
{
|
{
|
||||||
|
@ -690,13 +696,16 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInf
|
||||||
// stored settings if we have a matching entry
|
// stored settings if we have a matching entry
|
||||||
int iStoredFaderLevel;
|
int iStoredFaderLevel;
|
||||||
bool bStoredFaderIsSolo;
|
bool bStoredFaderIsSolo;
|
||||||
|
bool bStoredFaderIsMute;
|
||||||
|
|
||||||
if ( GetStoredFaderSettings ( vecChanInfo[j],
|
if ( GetStoredFaderSettings ( vecChanInfo[j],
|
||||||
iStoredFaderLevel,
|
iStoredFaderLevel,
|
||||||
bStoredFaderIsSolo ) )
|
bStoredFaderIsSolo,
|
||||||
|
bStoredFaderIsMute ) )
|
||||||
{
|
{
|
||||||
vecpChanFader[i]->SetFaderLevel ( iStoredFaderLevel );
|
vecpChanFader[i]->SetFaderLevel ( iStoredFaderLevel );
|
||||||
vecpChanFader[i]->SetFaderIsSolo ( bStoredFaderIsSolo );
|
vecpChanFader[i]->SetFaderIsSolo ( bStoredFaderIsSolo );
|
||||||
|
vecpChanFader[i]->SetFaderIsMute ( bStoredFaderIsMute );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -783,6 +792,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
||||||
{
|
{
|
||||||
CVector<int> viOldStoredFaderLevels ( vecStoredFaderLevels );
|
CVector<int> viOldStoredFaderLevels ( vecStoredFaderLevels );
|
||||||
CVector<int> vbOldStoredFaderIsSolo ( vecStoredFaderIsSolo );
|
CVector<int> vbOldStoredFaderIsSolo ( vecStoredFaderIsSolo );
|
||||||
|
CVector<int> vbOldStoredFaderIsMute ( vecStoredFaderIsMute );
|
||||||
|
|
||||||
// init temporary list count (may be overwritten later on)
|
// init temporary list count (may be overwritten later on)
|
||||||
int iTempListCnt = 0;
|
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
|
// current fader level and solo state is at the top of the list
|
||||||
vecStoredFaderLevels[0] = pChanFader->GetFaderLevel();
|
vecStoredFaderLevels[0] = pChanFader->GetFaderLevel();
|
||||||
vecStoredFaderIsSolo[0] = pChanFader->IsSolo();
|
vecStoredFaderIsSolo[0] = pChanFader->IsSolo();
|
||||||
|
vecStoredFaderIsMute[0] = pChanFader->IsMute();
|
||||||
iTempListCnt = 1;
|
iTempListCnt = 1;
|
||||||
|
|
||||||
for ( int iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
for ( int iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
||||||
|
@ -809,6 +820,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
||||||
{
|
{
|
||||||
vecStoredFaderLevels[iTempListCnt] = viOldStoredFaderLevels[iIdx];
|
vecStoredFaderLevels[iTempListCnt] = viOldStoredFaderLevels[iIdx];
|
||||||
vecStoredFaderIsSolo[iTempListCnt] = vbOldStoredFaderIsSolo[iIdx];
|
vecStoredFaderIsSolo[iTempListCnt] = vbOldStoredFaderIsSolo[iIdx];
|
||||||
|
vecStoredFaderIsMute[iTempListCnt] = vbOldStoredFaderIsMute[iIdx];
|
||||||
|
|
||||||
iTempListCnt++;
|
iTempListCnt++;
|
||||||
}
|
}
|
||||||
|
@ -819,7 +831,8 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
||||||
|
|
||||||
bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||||
int& iStoredFaderLevel,
|
int& iStoredFaderLevel,
|
||||||
bool& bStoredFaderIsSolo )
|
bool& bStoredFaderIsSolo,
|
||||||
|
bool& bStoredFaderIsMute)
|
||||||
{
|
{
|
||||||
// only do the check if the name string is not empty
|
// only do the check if the name string is not empty
|
||||||
if ( !ChanInfo.strName.isEmpty() )
|
if ( !ChanInfo.strName.isEmpty() )
|
||||||
|
@ -831,7 +844,8 @@ bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||||
{
|
{
|
||||||
// copy stored settings values
|
// copy stored settings values
|
||||||
iStoredFaderLevel = vecStoredFaderLevels[iIdx];
|
iStoredFaderLevel = vecStoredFaderLevels[iIdx];
|
||||||
bStoredFaderIsSolo = vecStoredFaderIsSolo[iIdx] != false;
|
bStoredFaderIsSolo = vecStoredFaderIsSolo[iIdx] != 0;
|
||||||
|
bStoredFaderIsMute = vecStoredFaderIsMute[iIdx] != 0;
|
||||||
|
|
||||||
// values found and copied, return OK
|
// values found and copied, return OK
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -53,11 +53,13 @@ public:
|
||||||
void Hide() { pFrame->hide(); }
|
void Hide() { pFrame->hide(); }
|
||||||
bool IsVisible() { return plblLabel->isVisible(); }
|
bool IsVisible() { return plblLabel->isVisible(); }
|
||||||
bool IsSolo() { return pcbSolo->isChecked(); }
|
bool IsSolo() { return pcbSolo->isChecked(); }
|
||||||
|
bool IsMute() { return pcbMute->isChecked(); }
|
||||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
|
|
||||||
void UpdateSoloState ( const bool bNewOtherSoloState );
|
void UpdateSoloState ( const bool bNewOtherSoloState );
|
||||||
void SetFaderLevel ( const int iLevel );
|
void SetFaderLevel ( const int iLevel );
|
||||||
void SetFaderIsSolo ( const bool bIsSolo );
|
void SetFaderIsSolo ( const bool bIsSolo );
|
||||||
|
void SetFaderIsMute ( const bool bIsMute );
|
||||||
int GetFaderLevel() { return pFader->value(); }
|
int GetFaderLevel() { return pFader->value(); }
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
@ -109,12 +111,15 @@ public:
|
||||||
CVector<QString> vecStoredFaderTags;
|
CVector<QString> vecStoredFaderTags;
|
||||||
CVector<int> vecStoredFaderLevels;
|
CVector<int> vecStoredFaderLevels;
|
||||||
CVector<int> vecStoredFaderIsSolo;
|
CVector<int> vecStoredFaderIsSolo;
|
||||||
|
CVector<int> vecStoredFaderIsMute;
|
||||||
int iNewClientFaderLevel;
|
int iNewClientFaderLevel;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||||
int& iStoredFaderLevel,
|
int& iStoredFaderLevel,
|
||||||
bool& bStoredFaderIsSolo );
|
bool& bStoredFaderIsSolo,
|
||||||
|
bool& bStoredFaderIsMute );
|
||||||
|
|
||||||
void StoreFaderSettings ( CChannelFader* pChanFader );
|
void StoreFaderSettings ( CChannelFader* pChanFader );
|
||||||
void UpdateSoloStates();
|
void UpdateSoloStates();
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ void CChatDlg::AddChatText ( QString strChatText )
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||||
txvChatWindow, 0, QAccessible::ValueChanged
|
txvChatWindow, 0, QAccessible::ValueChanged
|
||||||
#else
|
#else
|
||||||
new QAccessibleEvent ( txvChatWindow, QAccessible::ValueChanged )
|
new QAccessibleValueChangeEvent ( txvChatWindow, strChatText )
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ CClient::CClient ( const quint16 iPortNumber,
|
||||||
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
|
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
|
||||||
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
||||||
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||||
|
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||||
iNewClientFaderLevel ( 100 ),
|
iNewClientFaderLevel ( 100 ),
|
||||||
vecWindowPosMain (), // empty array
|
vecWindowPosMain (), // empty array
|
||||||
vecWindowPosSettings (), // empty array
|
vecWindowPosSettings (), // empty array
|
||||||
|
|
|
@ -282,6 +282,7 @@ public:
|
||||||
CVector<QString> vecStoredFaderTags;
|
CVector<QString> vecStoredFaderTags;
|
||||||
CVector<int> vecStoredFaderLevels;
|
CVector<int> vecStoredFaderLevels;
|
||||||
CVector<int> vecStoredFaderIsSolo;
|
CVector<int> vecStoredFaderIsSolo;
|
||||||
|
CVector<int> vecStoredFaderIsMute;
|
||||||
int iNewClientFaderLevel;
|
int iNewClientFaderLevel;
|
||||||
|
|
||||||
// window position/state settings
|
// window position/state settings
|
||||||
|
|
|
@ -189,6 +189,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
||||||
MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags;
|
MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags;
|
||||||
MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels;
|
MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels;
|
||||||
MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo;
|
MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo;
|
||||||
|
MainMixerBoard->vecStoredFaderIsMute = pClient->vecStoredFaderIsMute;
|
||||||
MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel;
|
MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel;
|
||||||
|
|
||||||
// init status label
|
// init status label
|
||||||
|
@ -568,6 +569,7 @@ void CClientDlg::closeEvent ( QCloseEvent* Event )
|
||||||
pClient->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags;
|
pClient->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags;
|
||||||
pClient->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels;
|
pClient->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels;
|
||||||
pClient->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo;
|
pClient->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo;
|
||||||
|
pClient->vecStoredFaderIsMute = MainMixerBoard->vecStoredFaderIsMute;
|
||||||
pClient->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel;
|
pClient->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel;
|
||||||
|
|
||||||
// default implementation of this event handler routine
|
// default implementation of this event handler routine
|
||||||
|
|
|
@ -165,7 +165,7 @@ LED bar: lbr
|
||||||
#define MAX_NUM_SERVER_ADDR_ITEMS 6
|
#define MAX_NUM_SERVER_ADDR_ITEMS 6
|
||||||
|
|
||||||
// maximum number of fader settings to be stored (together with the fader tags)
|
// 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
|
// defines for LED input level meter
|
||||||
#define NUM_STEPS_INP_LEV_METER 8
|
#define NUM_STEPS_INP_LEV_METER 8
|
||||||
|
|
|
@ -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
|
// new client level
|
||||||
if ( GetNumericIniSet ( IniXMLDocument, "client", "newclientlevel",
|
if ( GetNumericIniSet ( IniXMLDocument, "client", "newclientlevel",
|
||||||
0, 100, iValue ) )
|
0, 100, iValue ) )
|
||||||
|
@ -392,7 +403,15 @@ void CSettings::Save()
|
||||||
{
|
{
|
||||||
SetFlagIniSet ( IniXMLDocument, "client",
|
SetFlagIniSet ( IniXMLDocument, "client",
|
||||||
QString ( "storedfaderissolo%1" ).arg ( iIdx ),
|
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
|
// new client level
|
||||||
|
|
Loading…
Reference in a new issue