summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gain_meter.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2015-03-25 16:47:25 -0500
committerRobin Gareus <robin@gareus.org>2015-04-22 00:22:43 +0200
commit46f97e8d92241c94d12d81ea182a9172df98e61e (patch)
treef757e7014aa6260b7d927b35bcf1fd221e2d40e4 /gtk2_ardour/gain_meter.cc
parent187ddb3bad70088f901ed1ea5e1402519fd393b4 (diff)
Initial Gain Coefficient tweaks
1) Disambiguate 1.0 to GAIN_COEFF_UNITY, and 0.0 to GAIN_COEFF_ZERO 2) Add GAIN_COEFF_SMALL which replaces SMALL_SIGNAL (-140dB) 3) GAIN_COEFF_SMALL can used to avoid interpolating towards -inf on a db scale 4) GAIN_COEFF_SMALL is used to detect very small (denormal?) gains and memset to zero
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r--gtk2_ardour/gain_meter.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 3af9641070..99e21a05fc 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -265,11 +265,11 @@ GainMeterBase::setup_gain_adjustment ()
if (_amp->output_streams().n_midi() <= _amp->output_streams().n_audio()) {
_data_type = DataType::AUDIO;
- gain_adjustment.set_lower (0.0);
- gain_adjustment.set_upper (1.0);
+ gain_adjustment.set_lower (GAIN_COEFF_ZERO);
+ gain_adjustment.set_upper (GAIN_COEFF_UNITY);
gain_adjustment.set_step_increment (dB_coeff_step(Config->get_max_gain()) / 10.0);
gain_adjustment.set_page_increment (dB_coeff_step(Config->get_max_gain()));
- gain_slider->set_default_value (gain_to_slider_position (1));
+ gain_slider->set_default_value (gain_to_slider_position (GAIN_COEFF_UNITY));
} else {
_data_type = DataType::MIDI;
gain_adjustment.set_lower (0.0);
@@ -544,7 +544,7 @@ GainMeterBase::gain_adjusted ()
void
GainMeterBase::effective_gain_display ()
{
- float value = 0.0;
+ float value = GAIN_COEFF_ZERO;
switch (_data_type) {
case DataType::AUDIO: