Adding signals and slots for input gain control

parent 19a75bff
......@@ -35,6 +35,7 @@
#include <ITAAsioInterface.h>
#include <ITAPortaudioInterface.h>
#include <ITAException.h>
#include <ITANumericUtils.h>
RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, bool bSkipConfig, QWidget* pParent )
......@@ -74,7 +75,13 @@ RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, bool bSkipC
if( !bSkipConfig )
LoadConfiguration();
ui->listView_redstart_session_list;
// Signals & slots
connect( ui->doubleSpinBox_input_gain, SIGNAL( valueChanged( double ) ), this, SLOT( CoreChangeInputSignalDecibel( double ) ) );
connect( this, SIGNAL( InputSignalChangedDecibel( double ) ), ui->doubleSpinBox_input_gain, SLOT( setValue( double ) ) );
connect( ui->dial_core_control_input_gain, SIGNAL( valueChanged( int ) ), this, SLOT( CoreChangeInputSignalDecibel( int ) ) );
connect( this, SIGNAL( InputSignalChangedDecibel( int ) ), ui->dial_core_control_input_gain, SLOT( setValue( int ) ) );
//connect( &m_qRenderTimer, SIGNAL( timeout() ), this, SLOT( Render() ) );
if( ui->checkBox_redstart_network_connect_as_client->isChecked() )
ui->groupBox_redstart_audio_iface->setEnabled( false );
......@@ -82,7 +89,6 @@ RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, bool bSkipC
if( ( ui->checkBox_redstart_auto_start->isChecked() || bAutoStart ) && !bFailSafeMode )
on_pushButton_start_stop_clicked();
//connect( &m_qRenderTimer, SIGNAL( timeout() ), this, SLOT( Render() ) );
}
RedstartWindow::~RedstartWindow()
......@@ -154,7 +160,6 @@ void RedstartWindow::LoadConfiguration()
if( ui->listView_redstart_session_list->GetCurrentSessionID().isEmpty() == false )
ui->treeView_session_details->SetStruct( ui->listView_redstart_session_list->GetCurrentConfig() );
}
void RedstartWindow::StoreConfiguration()
......@@ -817,7 +822,7 @@ void RedstartWindow::on_actionSession_wizard_triggered()
}
}
void RedstartWindow::on_actionDuplicate_session_triggered()
void RedstartWindow::on_actionDuplicate_current_session_triggered()
{
RedstartSessionWizardDialog d( this );
......@@ -851,6 +856,33 @@ void RedstartWindow::on_actionDuplicate_session_triggered()
}
}
void RedstartWindow::CoreChangeInputSignalDecibel( int iLevelDB )
{
emit InputSignalChangedDecibel( iLevelDB );
emit InputSignalChangedDecibel( ( double ) iLevelDB );
}
void RedstartWindow::CoreChangeInputSignalDecibel( double dLevelDB )
{
emit InputSignalChangedDecibel( dLevelDB );
emit InputSignalChangedDecibel( ( int ) dLevelDB );
if( m_pVAInterface )
{
const double dGain = db20_to_ratio( dLevelDB );
m_pVAInterface->SetInputGain( dGain );
}
}
/*
void RedstartWindow::InputSignalChangedDecibel( double dLevelDB )
{
ui->doubleSpinBox_input_gain->setValue( dLevelDB );
int iGain = db20_to_ratio( dLevelDB ) * ( ui->dial_core_control_input_gain->maximum() - ui->dial_core_control_input_gain->minimum() );
ui->dial_core_control_input_gain->setValue( iGain );
}
*/
void RedstartWindow::on_actionRunSimpleExample_triggered()
{
try
......
......@@ -150,7 +150,14 @@ private slots:
void on_actionRemove_triggered();
void on_actionEdit_session_triggered();
void on_actionSession_wizard_triggered();
void on_actionDuplicate_session_triggered();
void on_actionDuplicate_current_session_triggered();
void CoreChangeInputSignalDecibel( int );
void CoreChangeInputSignalDecibel( double );
signals:
void InputSignalChangedDecibel( int );
void InputSignalChangedDecibel( double );
private:
void PostCoreStart();
......
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