Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
Redstart
Commits
c4917735
Commit
c4917735
authored
Nov 30, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Adding signals and slots for input gain control
parent
19a75bff
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/RedstartWindow.cpp
View file @
c4917735
...
...
@@ -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
...
...
src/RedstartWindow.h
View file @
c4917735
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment