Adding all aura modes

parent 1e961b1d
......@@ -148,6 +148,30 @@ void RedstartWindow::ConnectSignalsAndSlots()
connect( this, SIGNAL( GlobalAuralizationModeChanged( int ) ), this, SLOT( CoreChangeGlobalAuralizationMode( int ) ) );
connect( this, SIGNAL( AuralizationModeDSChanged( bool ) ), ui->checkBox_am_ds, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_ds, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeDS( int ) ) );
connect( this, SIGNAL( AuralizationModeERChanged( bool ) ), ui->checkBox_am_er, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_er, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeER( int ) ) );
connect( this, SIGNAL( AuralizationModeDDChanged( bool ) ), ui->checkBox_am_dd, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_dd, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeDD( int ) ) );
connect( this, SIGNAL( AuralizationModeDIRChanged( bool ) ), ui->checkBox_am_dir, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_dir, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeDIR( int ) ) );
connect( this, SIGNAL( AuralizationModeDPChanged( bool ) ), ui->checkBox_am_dp, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_dp, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeDP( int ) ) );
connect( this, SIGNAL( AuralizationModeSLChanged( bool ) ), ui->checkBox_am_sl, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_sl, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeSL( int ) ) );
connect( this, SIGNAL( AuralizationModeDIFChanged( bool ) ), ui->checkBox_am_dif, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_dif, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeDIF( int ) ) );
connect( this, SIGNAL( AuralizationModeSCChanged( bool ) ), ui->checkBox_am_sca, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_sca, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeSC( int ) ) );
connect( this, SIGNAL( AuralizationModeNFChanged( bool ) ), ui->checkBox_am_nf, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_nf, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeNF( int ) ) );
connect( this, SIGNAL( AuralizationModeTVChanged( bool ) ), ui->checkBox_am_tv, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_tv, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeTV( int ) ) );
connect( this, SIGNAL( AuralizationModeMAChanged( bool ) ), ui->checkBox_am_ma, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_ma, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeMA( int ) ) );
connect( this, SIGNAL( AuralizationModeABChanged( bool ) ), ui->checkBox_am_ab, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_ab, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeAB( int ) ) );
connect( this, SIGNAL( AuralizationModeTRChanged( bool ) ), ui->checkBox_am_tr, SLOT( setChecked( bool ) ) );
connect( ui->checkBox_am_tr, SIGNAL( stateChanged( int ) ), this, SLOT( CoreChangeAuralizationModeTR( int ) ) );
connect( ui->comboBox_core_settings_log_level, SIGNAL( currentIndexChanged( int ) ), this, SLOT( CoreChangeLogLevel( int ) ) );
......@@ -1037,29 +1061,128 @@ void RedstartWindow::CoreChangeOutputIsMuted( int iMuted )
m_pVAInterface->SetOutputMuted( ( bool ) iMuted );
}
void RedstartWindow::CoreChangeAuralizationModeDS( int iState )
void RedstartWindow::CoreChangeAuralizationMode( bool bActivateMode, int iMode )
{
emit AuralizationModeDSChanged( ( bool ) iState );
if( !m_pVAInterface )
return;
int iAM = m_pVAInterface->GetGlobalAuralizationMode();
if( iState > 0 )
iAM |= IVAInterface::VA_AURAMODE_DIRECT_SOUND;
if( bActivateMode == true )
iAM |= iMode;
else
iAM &= ~IVAInterface::VA_AURAMODE_DIRECT_SOUND;
iAM &= ~iMode;
m_pVAInterface->SetGlobalAuralizationMode( iAM );
}
void RedstartWindow::CoreChangeAuralizationModeDS( int iState )
{
emit AuralizationModeDSChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_DIRECT_SOUND );
}
void RedstartWindow::CoreChangeAuralizationModeAB( int iState )
{
emit AuralizationModeABChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_ABSORPTION );
}
void RedstartWindow::CoreChangeAuralizationModeDIF( int iState )
{
emit AuralizationModeDIFChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_DIFFRACTION );
}
void RedstartWindow::CoreChangeAuralizationModeDD( int iState )
{
emit AuralizationModeDDChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_DIFFUSE_DECAY );
}
void RedstartWindow::CoreChangeAuralizationModeDP( int iState )
{
emit AuralizationModeDPChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_DOPPLER );
}
void RedstartWindow::CoreChangeAuralizationModeER( int iState )
{
emit AuralizationModeERChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_EARLY_REFLECTIONS );
}
void RedstartWindow::CoreChangeAuralizationModeMA( int iState )
{
emit AuralizationModeMAChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_MEDIUM_ABSORPTION );
}
void RedstartWindow::CoreChangeAuralizationModeNF( int iState )
{
emit AuralizationModeNFChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_NEARFIELD );
}
void RedstartWindow::CoreChangeAuralizationModeSC( int iState )
{
emit AuralizationModeSCChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_SCATTERING );
}
void RedstartWindow::CoreChangeAuralizationModeDIR( int iState )
{
emit AuralizationModeDIRChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_SOURCE_DIRECTIVITY );
}
void RedstartWindow::CoreChangeAuralizationModeSL( int iState )
{
emit AuralizationModeSLChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_SPREADING_LOSS );
}
void RedstartWindow::CoreChangeAuralizationModeTV( int iState )
{
emit AuralizationModeTVChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_TEMP_VAR );
}
void RedstartWindow::CoreChangeAuralizationModeTR( int iState )
{
emit AuralizationModeTRChanged( ( bool ) iState );
CoreChangeAuralizationMode( ( iState > 0 ), IVAInterface::VA_AURAMODE_TRANSMISSION );
}
void RedstartWindow::CoreChangeGlobalAuralizationMode( int iAM )
{
// Only emit update when not matching UI state - in that case toggle
if( ( iAM & IVAInterface::VA_AURAMODE_DIRECT_SOUND ) ^ ui->checkBox_am_ds->isChecked() )
if( ( ( iAM & IVAInterface::VA_AURAMODE_DIRECT_SOUND ) > 0 ) != ui->checkBox_am_ds->isChecked() )
emit AuralizationModeDSChanged( !ui->checkBox_am_ds->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_ABSORPTION ) > 0 ) != ui->checkBox_am_ab->isChecked() )
emit AuralizationModeABChanged( !ui->checkBox_am_ab->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_DIFFRACTION ) > 0 ) != ui->checkBox_am_dif->isChecked() )
emit AuralizationModeDIFChanged( !ui->checkBox_am_dif->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_DIFFUSE_DECAY ) > 0 ) != ui->checkBox_am_dd->isChecked() )
emit AuralizationModeDDChanged( !ui->checkBox_am_dd->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_DOPPLER ) > 0 ) != ui->checkBox_am_dp->isChecked() )
emit AuralizationModeDPChanged( !ui->checkBox_am_dp->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_EARLY_REFLECTIONS ) > 0 ) != ui->checkBox_am_er->isChecked() )
emit AuralizationModeERChanged( !ui->checkBox_am_er->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_MEDIUM_ABSORPTION ) > 0 ) != ui->checkBox_am_ma->isChecked() )
emit AuralizationModeMAChanged( !ui->checkBox_am_ma->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_NEARFIELD ) > 0 ) != ui->checkBox_am_nf->isChecked() )
emit AuralizationModeNFChanged( !ui->checkBox_am_nf->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_SCATTERING ) > 0 ) && !ui->checkBox_am_sca->isChecked() )
emit AuralizationModeSCChanged( !ui->checkBox_am_sca->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_SOURCE_DIRECTIVITY ) > 0 ) != ui->checkBox_am_dir->isChecked() )
emit AuralizationModeDIRChanged( !ui->checkBox_am_dir->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_SPREADING_LOSS ) > 0 ) != ui->checkBox_am_sl->isChecked() )
emit AuralizationModeSLChanged( !ui->checkBox_am_sl->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_TEMP_VAR ) > 0 ) != ui->checkBox_am_tv->isChecked() )
emit AuralizationModeTVChanged( !ui->checkBox_am_tv->isChecked() );
if( ( ( iAM & IVAInterface::VA_AURAMODE_TRANSMISSION ) > 0 ) != ui->checkBox_am_tr->isChecked() )
emit AuralizationModeTRChanged( !ui->checkBox_am_tr->isChecked() );
}
void RedstartWindow::CoreChangeLogLevel( int iLogLevel )
......
......@@ -163,6 +163,18 @@ public:
void CoreChangeOutputIsMuted( int );
void CoreChangeAuralizationModeDS( int );
void CoreChangeAuralizationModeER( int );
void CoreChangeAuralizationModeDD( int );
void CoreChangeAuralizationModeDIR( int );
void CoreChangeAuralizationModeDP( int );
void CoreChangeAuralizationModeSL( int );
void CoreChangeAuralizationModeDIF( int );
void CoreChangeAuralizationModeSC( int );;
void CoreChangeAuralizationModeNF( int );
void CoreChangeAuralizationModeTV( int );
void CoreChangeAuralizationModeMA( int );
void CoreChangeAuralizationModeAB( int );
void CoreChangeAuralizationModeTR( int );
void CoreChangeGlobalAuralizationMode( int );
void CoreChangeLogLevel( int );
......@@ -178,6 +190,18 @@ signals:
void OutputIsMutedChanged( bool );
void AuralizationModeDSChanged( bool );
void AuralizationModeERChanged( bool );
void AuralizationModeDDChanged( bool );
void AuralizationModeDIRChanged( bool );
void AuralizationModeDPChanged( bool );
void AuralizationModeSLChanged( bool );
void AuralizationModeDIFChanged( bool );
void AuralizationModeSCChanged( bool );
void AuralizationModeNFChanged( bool );
void AuralizationModeTVChanged( bool );
void AuralizationModeMAChanged( bool );
void AuralizationModeABChanged( bool );
void AuralizationModeTRChanged( bool );
void GlobalAuralizationModeChanged( int );
private:
......@@ -217,7 +241,7 @@ private:
void HandleVAEvent( const CVAEvent* );
void UpdateMeasures( const std::vector< float >& vfInputRMSs, const std::vector< float >& vfInputPeaks, const std::vector< float >& vfOutputRMSs, const std::vector< float >& vfOutputPeaks );
void CoreChangeAuralizationMode( bool, int );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment