Implemented storing pan values.
This commit is contained in:
parent
fa85d3d5a7
commit
31c3f5567d
6 changed files with 35 additions and 1 deletions
|
@ -562,6 +562,7 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
|||
QScrollArea ( parent ),
|
||||
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
|
||||
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
||||
vecStoredPanValues ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_PAN_MAX/2),
|
||||
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
iNewClientFaderLevel ( 100 ),
|
||||
|
@ -913,15 +914,18 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInf
|
|||
// the text has actually changed, search in the list of
|
||||
// stored settings if we have a matching entry
|
||||
int iStoredFaderLevel;
|
||||
int iStoredPanValue;
|
||||
bool bStoredFaderIsSolo;
|
||||
bool bStoredFaderIsMute;
|
||||
|
||||
if ( GetStoredFaderSettings ( vecChanInfo[j],
|
||||
iStoredFaderLevel,
|
||||
iStoredPanValue,
|
||||
bStoredFaderIsSolo,
|
||||
bStoredFaderIsMute ) )
|
||||
{
|
||||
vecpChanFader[i]->SetFaderLevel ( iStoredFaderLevel );
|
||||
vecpChanFader[i]->SetPanValue ( iStoredPanValue );
|
||||
vecpChanFader[i]->SetFaderIsSolo ( bStoredFaderIsSolo );
|
||||
vecpChanFader[i]->SetFaderIsMute ( bStoredFaderIsMute );
|
||||
}
|
||||
|
@ -1029,6 +1033,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
|||
!pChanFader->GetReceivedName().isEmpty() )
|
||||
{
|
||||
CVector<int> viOldStoredFaderLevels ( vecStoredFaderLevels );
|
||||
CVector<int> viOldStoredPanValues ( vecStoredPanValues );
|
||||
CVector<int> vbOldStoredFaderIsSolo ( vecStoredFaderIsSolo );
|
||||
CVector<int> vbOldStoredFaderIsMute ( vecStoredFaderIsMute );
|
||||
|
||||
|
@ -1042,6 +1047,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
|||
|
||||
// current fader level and solo state is at the top of the list
|
||||
vecStoredFaderLevels[0] = pChanFader->GetFaderLevel();
|
||||
vecStoredPanValues[0] = pChanFader->GetPanValue();
|
||||
vecStoredFaderIsSolo[0] = pChanFader->IsSolo();
|
||||
vecStoredFaderIsMute[0] = pChanFader->IsMute();
|
||||
iTempListCnt = 1;
|
||||
|
@ -1057,6 +1063,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
|||
if ( iIdx != iOldIdx )
|
||||
{
|
||||
vecStoredFaderLevels[iTempListCnt] = viOldStoredFaderLevels[iIdx];
|
||||
vecStoredPanValues[iTempListCnt] = viOldStoredPanValues[iIdx];
|
||||
vecStoredFaderIsSolo[iTempListCnt] = vbOldStoredFaderIsSolo[iIdx];
|
||||
vecStoredFaderIsMute[iTempListCnt] = vbOldStoredFaderIsMute[iIdx];
|
||||
|
||||
|
@ -1069,6 +1076,7 @@ void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader )
|
|||
|
||||
bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||
int& iStoredFaderLevel,
|
||||
int& iStoredPanValue,
|
||||
bool& bStoredFaderIsSolo,
|
||||
bool& bStoredFaderIsMute)
|
||||
{
|
||||
|
@ -1082,6 +1090,7 @@ bool CAudioMixerBoard::GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
|||
{
|
||||
// copy stored settings values
|
||||
iStoredFaderLevel = vecStoredFaderLevels[iIdx];
|
||||
iStoredPanValue = vecStoredPanValues[iIdx];
|
||||
bStoredFaderIsSolo = vecStoredFaderIsSolo[iIdx] != 0;
|
||||
bStoredFaderIsMute = vecStoredFaderIsMute[iIdx] != 0;
|
||||
|
||||
|
|
|
@ -156,13 +156,15 @@ public:
|
|||
// settings
|
||||
CVector<QString> vecStoredFaderTags;
|
||||
CVector<int> vecStoredFaderLevels;
|
||||
CVector<int> vecStoredPanValues;
|
||||
CVector<int> vecStoredFaderIsSolo;
|
||||
CVector<int> vecStoredFaderIsMute;
|
||||
int iNewClientFaderLevel;
|
||||
|
||||
protected:
|
||||
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||
bool GetStoredFaderSettings (const CChannelInfo& ChanInfo,
|
||||
int& iStoredFaderLevel,
|
||||
int& iStoredPanValue,
|
||||
bool& bStoredFaderIsSolo,
|
||||
bool& bStoredFaderIsMute );
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ CClient::CClient ( const quint16 iPortNumber,
|
|||
ChannelInfo (),
|
||||
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
|
||||
vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ),
|
||||
vecStoredPanValues ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_PAN_MAX/2 ),
|
||||
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
iNewClientFaderLevel ( 100 ),
|
||||
|
|
|
@ -282,6 +282,7 @@ public:
|
|||
CChannelCoreInfo ChannelInfo;
|
||||
CVector<QString> vecStoredFaderTags;
|
||||
CVector<int> vecStoredFaderLevels;
|
||||
CVector<int> vecStoredPanValues;
|
||||
CVector<int> vecStoredFaderIsSolo;
|
||||
CVector<int> vecStoredFaderIsMute;
|
||||
int iNewClientFaderLevel;
|
||||
|
|
|
@ -193,6 +193,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
|||
// restore fader settings
|
||||
MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags;
|
||||
MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels;
|
||||
MainMixerBoard->vecStoredPanValues = pClient->vecStoredPanValues;
|
||||
MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo;
|
||||
MainMixerBoard->vecStoredFaderIsMute = pClient->vecStoredFaderIsMute;
|
||||
MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel;
|
||||
|
@ -588,6 +589,7 @@ void CClientDlg::closeEvent ( QCloseEvent* Event )
|
|||
MainMixerBoard->HideAll();
|
||||
pClient->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags;
|
||||
pClient->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels;
|
||||
pClient->vecStoredPanValues = MainMixerBoard->vecStoredPanValues;
|
||||
pClient->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo;
|
||||
pClient->vecStoredFaderIsMute = MainMixerBoard->vecStoredFaderIsMute;
|
||||
pClient->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel;
|
||||
|
|
|
@ -77,6 +77,17 @@ void CSettings::Load()
|
|||
}
|
||||
}
|
||||
|
||||
// stored pan values
|
||||
for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
||||
{
|
||||
if ( GetNumericIniSet ( IniXMLDocument, "client",
|
||||
QString ( "storedpanvalue%1" ).arg ( iIdx ),
|
||||
0, AUD_MIX_PAN_MAX/2, iValue ) )
|
||||
{
|
||||
pClient->vecStoredPanValues[iIdx] = iValue;
|
||||
}
|
||||
}
|
||||
|
||||
// stored fader solo state
|
||||
for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
||||
{
|
||||
|
@ -455,6 +466,14 @@ void CSettings::Save()
|
|||
pClient->vecStoredFaderLevels[iIdx] );
|
||||
}
|
||||
|
||||
// stored pan values
|
||||
for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
||||
{
|
||||
SetNumericIniSet ( IniXMLDocument, "client",
|
||||
QString ( "storedpanvalue%1" ).arg ( iIdx ),
|
||||
pClient->vecStoredPanValues[iIdx] );
|
||||
}
|
||||
|
||||
// stored fader solo states
|
||||
for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue