diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-21 01:36:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-21 01:36:20 +0000 |
commit | 500aaa0deeb386df94fddc4474aa6de43331becb (patch) | |
tree | 50728fe9dc4b22305af816cb1ff80e5c2cc22255 /libs/ardour | |
parent | 4a81c71e970ad91a6e0628e0ffd510d585c938b5 (diff) |
an entire freakin' day working on 1 working function, VolumeController::adjust() ... probably not done, but better ... gain control that occurs via this function occurs in discrete, fixed dB steps
git-svn-id: svn://localhost/ardour2/branches/3.0@9752 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/monitor_processor.cc | 7 | ||||
-rw-r--r-- | libs/ardour/utils.cc | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/libs/ardour/monitor_processor.cc b/libs/ardour/monitor_processor.cc index 835bfde70f..d12db38c27 100644 --- a/libs/ardour/monitor_processor.cc +++ b/libs/ardour/monitor_processor.cc @@ -36,11 +36,12 @@ MonitorProcessor::MonitorProcessor (Session& s) , _mono_ptr (new MPControl<bool> (false, _("monitor mono"), Controllable::Toggle)) , _dim_level_ptr (new MPControl<volatile gain_t> /* default is -12dB, range is -20dB to 0dB */ - (0.251188635826, _("monitor dim level"), Controllable::Flag (0), 0.100000001490, 1.0)) + (dB_to_coefficient(-12.0), _("monitor dim level"), Controllable::Flag (0), + dB_to_coefficient(-20.0), dB_to_coefficient (0.0))) , _solo_boost_level_ptr (new MPControl<volatile gain_t> /* default is 0dB, range is 0dB to +20dB */ - (1.0, _("monitor solo boost level"), Controllable::Flag (0), 1.0, 10.0)) - + (dB_to_coefficient(0.0), _("monitor solo boost level"), Controllable::Flag (0), + dB_to_coefficient(0.0), dB_to_coefficient(10.0))) , _dim_all_control (_dim_all_ptr) , _cut_all_control (_cut_all_ptr) , _mono_control (_mono_ptr) diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 4175322bb6..e1cd35398b 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -674,14 +674,12 @@ how_many_dsp_threads () double gain_to_slider_position_with_max (double g, double max_gain) { - /* max gain is ignored for now */ - return gain_to_slider_position (g); + return gain_to_slider_position (g * 2.0/max_gain); } double slider_position_to_gain_with_max (double g, double max_gain) { - /* max gain is ignored for now */ - return slider_position_to_gain (g); + return slider_position_to_gain (g * max_gain/2.0); } extern "C" { |