only show level meters if the server actually supports it and sends network packets with levels to the client
This commit is contained in:
parent
70c499a82a
commit
ac21104cd0
2 changed files with 24 additions and 5 deletions
|
@ -190,7 +190,12 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
|||
|
||||
void CChannelFader::SetDisplayChannelLevel ( const bool eNDCL )
|
||||
{
|
||||
plbrChannelLevel->setHidden( !eNDCL );
|
||||
plbrChannelLevel->setHidden ( !eNDCL );
|
||||
}
|
||||
|
||||
bool CChannelFader::GetDisplayChannelLevel()
|
||||
{
|
||||
return !plbrChannelLevel->isHidden();
|
||||
}
|
||||
|
||||
void CChannelFader::SetupFaderTag ( const ESkillLevel eSkillLevel )
|
||||
|
@ -678,10 +683,15 @@ void CAudioMixerBoard::SetDisplayChannelLevels ( const bool eNDCL )
|
|||
{
|
||||
bDisplayChannelLevels = eNDCL;
|
||||
|
||||
// apply preference to child GUI controls
|
||||
// only update hiding the levels immediately, showing the levels
|
||||
// is only applied if the server actually transmits levels
|
||||
if ( !bDisplayChannelLevels )
|
||||
{
|
||||
// hide all level meters
|
||||
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
|
||||
{
|
||||
vecpChanFader[i]->SetDisplayChannelLevel ( bDisplayChannelLevels );
|
||||
vecpChanFader[i]->SetDisplayChannelLevel ( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -693,6 +703,7 @@ void CAudioMixerBoard::HideAll()
|
|||
// before hiding the fader, store its level (if some conditions are fullfilled)
|
||||
StoreFaderSettings ( vecpChanFader[i] );
|
||||
|
||||
vecpChanFader[i]->SetDisplayChannelLevel ( false );
|
||||
vecpChanFader[i]->Hide();
|
||||
}
|
||||
|
||||
|
@ -922,6 +933,13 @@ void CAudioMixerBoard::SetChannelLevels ( const CVector<uint16_t>& vecChannelLev
|
|||
if ( vecpChanFader[iChId]->IsVisible() && i < iNumChannelLevels )
|
||||
{
|
||||
vecpChanFader[iChId]->SetChannelLevel ( vecChannelLevel[i++] );
|
||||
|
||||
// show level only if we successfully received levels from the
|
||||
// server (if server does not support levels, do not show levels)
|
||||
if ( bDisplayChannelLevels && !vecpChanFader[iChId]->GetDisplayChannelLevel() )
|
||||
{
|
||||
vecpChanFader[iChId]->SetDisplayChannelLevel ( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public:
|
|||
bool IsMute() { return pcbMute->isChecked(); }
|
||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||
void SetDisplayChannelLevel ( const bool eNDCL );
|
||||
bool GetDisplayChannelLevel();
|
||||
|
||||
void UpdateSoloState ( const bool bNewOtherSoloState );
|
||||
void SetFaderLevel ( const int iLevel );
|
||||
|
|
Loading…
Reference in a new issue