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