diff options
author | David Robillard <d@drobilla.net> | 2014-12-04 00:29:28 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-04 00:30:47 -0500 |
commit | 24727e65befc310f24196d11a56ec7b269977c16 (patch) | |
tree | e399a174cff1c328b4e7ebd71778cfcb81fc3383 /libs/ardour/amp.cc | |
parent | 9b770c7aff5ad38d5363b232b85018a622596877 (diff) |
Make gain controls step by roughly 1.0/0.1 dB.
Shoot for roughly 30 steps for all controls.
Always keep sensible step information in ParameterDescriptor and just convert
for the UI.
This is a little weird, but it's less weird than it was before, and works.
Diffstat (limited to 'libs/ardour/amp.cc')
-rw-r--r-- | libs/ardour/amp.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index 0cf7049c47..8ee42f3bbf 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -27,6 +27,7 @@ #include "ardour/audio_buffer.h" #include "ardour/buffer_set.h" #include "ardour/midi_buffer.h" +#include "ardour/rc_configuration.h" #include "ardour/session.h" #include "i18n.h" @@ -35,9 +36,6 @@ using namespace ARDOUR; using namespace PBD; using std::min; -/* gain range of -inf to +6dB, default 0dB */ -const float Amp::max_gain_coefficient = 1.99526231f; - Amp::Amp (Session& s) : Processor(s, "Amp") , _apply_gain(true) @@ -403,7 +401,7 @@ Amp::set_state (const XMLNode& node, int version) void Amp::GainControl::set_value (double val) { - AutomationControl::set_value (min (val, (double) max_gain_coefficient)); + AutomationControl::set_value (min (val, (double) Config->get_max_gain())); _amp->session().set_dirty (); } |