in mono mode we should not show the Pan controls

This commit is contained in:
Volker Fischer 2020-05-22 20:26:04 +02:00
parent 0d6262edc4
commit 7324a29031
5 changed files with 27 additions and 12 deletions

View file

@ -19,8 +19,6 @@
- save client settings on Linux cmdline termination signal, coded by pljones (#70)
TODO in mono mode we should not show the Pan controls

View file

@ -73,7 +73,7 @@ CChannelFader::CChannelFader ( QWidget* pNW,
// setup panning control
pPan->setRange ( 0, AUD_MIX_PAN_MAX );
pPan->setValue ( AUD_MIX_PAN_MAX / 2 );
pPan->setFixedSize ( 55, 55 );
pPan->setFixedSize ( 50, 50 );
pPan->setNotchesVisible ( true );
pPanInfoGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft );
pPanInfoGrid->addWidget ( pInfoLabel );
@ -610,6 +610,8 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
iNewClientFaderLevel ( 100 ),
bDisplayPans ( false ),
bIsPanSupported ( false ),
bNoFaderVisible ( true ),
strServerName ( "" )
{
@ -721,14 +723,22 @@ void CAudioMixerBoard::SetDisplayChannelLevels ( const bool eNDCL )
}
}
void CAudioMixerBoard::SetPanIsSupported()
void CAudioMixerBoard::SetDisplayPans ( const bool eNDP )
{
bDisplayPans = eNDP;
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
vecpChanFader[i]->SetDisplayPans ( true );
vecpChanFader[i]->SetDisplayPans ( eNDP && bIsPanSupported );
}
}
void CAudioMixerBoard::SetPanIsSupported()
{
bIsPanSupported = true;
SetDisplayPans ( bDisplayPans );
}
void CAudioMixerBoard::HideAll()
{
// make all controls invisible
@ -743,7 +753,8 @@ void CAudioMixerBoard::HideAll()
vecpChanFader[i]->Hide();
}
// set flag
// set flags
bIsPanSupported = false;
bNoFaderVisible = true;
// emit status of connected clients

View file

@ -144,6 +144,7 @@ public:
void SetServerName ( const QString& strNewServerName );
void SetGUIDesign ( const EGUIDesign eNewDesign );
void SetDisplayChannelLevels ( const bool eNDCL );
void SetDisplayPans ( const bool eNDP );
void SetPanIsSupported();
void SetRemoteFaderIsMute ( const int iChannelIdx, const bool bIsMute );
@ -192,6 +193,8 @@ protected:
CMixerBoardScrollArea* pScrollArea;
QHBoxLayout* pMainLayout;
bool bDisplayChannelLevels;
bool bDisplayPans;
bool bIsPanSupported;
bool bNoFaderVisible;
QString strServerName;

View file

@ -661,6 +661,9 @@ void CClientDlg::UpdateRevSelection()
rbtReverbSelR->setChecked ( true );
}
}
// update visibility of the pan controls in the audio mixer board (pan is not supported for mono)
MainMixerBoard->SetDisplayPans ( pClient->GetAudioChannels() != CC_MONO );
}
void CClientDlg::OnAudioPanValueChanged ( int value )

View file

@ -82,7 +82,7 @@ void CSettings::Load()
{
if ( GetNumericIniSet ( IniXMLDocument, "client",
QString ( "storedpanvalue%1" ).arg ( iIdx ),
0, AUD_MIX_PAN_MAX/2, iValue ) )
0, AUD_MIX_PAN_MAX, iValue ) )
{
pClient->vecStoredPanValues[iIdx] = iValue;
}