changed stereo reverberation behaviour: now the channel selection radio buttons are invisible in case of stereo since they are not used in that mode anyway
This commit is contained in:
parent
7362dae229
commit
e873a70047
2 changed files with 24 additions and 47 deletions
|
@ -251,11 +251,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
||||||
SliderAudReverb->setValue ( iCurAudReverb );
|
SliderAudReverb->setValue ( iCurAudReverb );
|
||||||
SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
|
SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
|
||||||
|
|
||||||
|
// init reverb channel
|
||||||
// set radio buttons ---
|
|
||||||
// reverb channel
|
|
||||||
RevSelectionButtonGroup.addButton ( RadioButtonRevSelL );
|
|
||||||
RevSelectionButtonGroup.addButton ( RadioButtonRevSelR );
|
|
||||||
UpdateRevSelection();
|
UpdateRevSelection();
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,9 +331,11 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
||||||
this, SLOT ( OnSliderAudReverb ( int ) ) );
|
this, SLOT ( OnSliderAudReverb ( int ) ) );
|
||||||
|
|
||||||
// radio buttons
|
// radio buttons
|
||||||
QObject::connect ( &RevSelectionButtonGroup,
|
QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ),
|
||||||
SIGNAL ( buttonClicked ( QAbstractButton* ) ), this,
|
this, SLOT ( OnRevSelL() ) );
|
||||||
SLOT ( OnRevSelectionButtonGroupClicked ( QAbstractButton* ) ) );
|
|
||||||
|
QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ),
|
||||||
|
this, SLOT ( OnRevSelR() ) );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ),
|
||||||
|
@ -446,32 +444,26 @@ void CLlconClientDlg::UpdateRevSelection()
|
||||||
{
|
{
|
||||||
if ( pClient->GetUseStereo() )
|
if ( pClient->GetUseStereo() )
|
||||||
{
|
{
|
||||||
// for stereo set both channels checked and disable all settings
|
// for stereo make channel selection invisible since
|
||||||
RevSelectionButtonGroup.setExclusive ( false );
|
// reverberation effect is always applied to both channels
|
||||||
|
RadioButtonRevSelL->setVisible ( false );
|
||||||
// to be able to set both checks, exclusive has to be disabled
|
RadioButtonRevSelR->setVisible ( false );
|
||||||
RadioButtonRevSelL->setChecked ( true );
|
|
||||||
RadioButtonRevSelR->setChecked ( true );
|
|
||||||
|
|
||||||
// enable exclusive again, since this is required for mono mode
|
|
||||||
RevSelectionButtonGroup.setExclusive ( true );
|
|
||||||
|
|
||||||
// the user shall not modify the radio buttons in stereo mode
|
|
||||||
RadioButtonRevSelL->setEnabled ( false );
|
|
||||||
RadioButtonRevSelR->setEnabled ( false );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// mono case, enable all radio buttons and set to current value
|
// make radio buttons visible
|
||||||
RadioButtonRevSelL->setEnabled ( true );
|
RadioButtonRevSelL->setVisible ( true );
|
||||||
RadioButtonRevSelR->setEnabled ( true );
|
RadioButtonRevSelR->setVisible ( true );
|
||||||
|
|
||||||
// first reset and then set correct selection
|
// update value
|
||||||
RadioButtonRevSelL->setChecked ( false );
|
if ( pClient->IsReverbOnLeftChan() )
|
||||||
RadioButtonRevSelR->setChecked ( false );
|
{
|
||||||
|
RadioButtonRevSelL->setChecked ( true );
|
||||||
RadioButtonRevSelL->setChecked ( pClient->IsReverbOnLeftChan() );
|
}
|
||||||
RadioButtonRevSelR->setChecked ( !pClient->IsReverbOnLeftChan() );
|
else
|
||||||
|
{
|
||||||
|
RadioButtonRevSelR->setChecked ( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,19 +556,6 @@ void CLlconClientDlg::OnNumClientsChanged ( int iNewNumClients )
|
||||||
SetMyWindowTitle ( iNewNumClients );
|
SetMyWindowTitle ( iNewNumClients );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLlconClientDlg::OnRevSelectionButtonGroupClicked ( QAbstractButton* button )
|
|
||||||
{
|
|
||||||
if ( button == RadioButtonRevSelL )
|
|
||||||
{
|
|
||||||
pClient->SetReverbOnLeftChan ( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( button == RadioButtonRevSelR )
|
|
||||||
{
|
|
||||||
pClient->SetReverbOnLeftChan ( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLlconClientDlg::SetMyWindowTitle ( const int iNumClients )
|
void CLlconClientDlg::SetMyWindowTitle ( const int iNumClients )
|
||||||
{
|
{
|
||||||
// show number of connected clients in window title (and therefore also in
|
// show number of connected clients in window title (and therefore also in
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
#include <qslider.h>
|
#include <qslider.h>
|
||||||
#include <qradiobutton.h>
|
#include <qradiobutton.h>
|
||||||
#include <qbuttongroup.h>
|
|
||||||
#include <qmenubar.h>
|
#include <qmenubar.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
@ -96,8 +95,6 @@ protected:
|
||||||
QMenu* pViewMenu;
|
QMenu* pViewMenu;
|
||||||
QMenuBar* pMenu;
|
QMenuBar* pMenu;
|
||||||
|
|
||||||
QButtonGroup RevSelectionButtonGroup;
|
|
||||||
|
|
||||||
CClientSettingsDlg ClientSettingsDlg;
|
CClientSettingsDlg ClientSettingsDlg;
|
||||||
CChatDlg ChatDlg;
|
CChatDlg ChatDlg;
|
||||||
|
|
||||||
|
@ -109,7 +106,8 @@ public slots:
|
||||||
void OnOpenChatDialog() { ShowChatWindow(); }
|
void OnOpenChatDialog() { ShowChatWindow(); }
|
||||||
void OnSliderAudInFader ( int value );
|
void OnSliderAudInFader ( int value );
|
||||||
void OnSliderAudReverb ( int value ) { pClient->SetReverbLevel ( value ); }
|
void OnSliderAudReverb ( int value ) { pClient->SetReverbLevel ( value ); }
|
||||||
void OnRevSelectionButtonGroupClicked ( QAbstractButton* button );
|
void OnRevSelL() { pClient->SetReverbOnLeftChan ( true ); }
|
||||||
|
void OnRevSelR() { pClient->SetReverbOnLeftChan ( false ); }
|
||||||
void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo );
|
void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo );
|
||||||
void OnChangeChanGain ( int iId, double dGain )
|
void OnChangeChanGain ( int iId, double dGain )
|
||||||
{ pClient->SetRemoteChanGain ( iId, dGain ); }
|
{ pClient->SetRemoteChanGain ( iId, dGain ); }
|
||||||
|
|
Loading…
Reference in a new issue