diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-19 17:00:57 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:12:07 +0200 |
commit | ea1f27162bab78aace9885c8483420b4a6b39eed (patch) | |
tree | f2a1d14cd8de05d4ec4696925360f18cac7b14df /libs/ardour/utils.cc | |
parent | 567c0a8f5321f70f13e8e0c4c78725ce4521608b (diff) |
Fix/update maximum gain computation
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r-- | libs/ardour/utils.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 18f9d247d8..f73f206d29 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -47,6 +47,7 @@ #include <glibmm/fileutils.h> #include "pbd/cpus.h" +#include "pbd/control_math.h" #include "pbd/error.h" #include "pbd/stacktrace.h" #include "pbd/xml++.h" @@ -709,13 +710,13 @@ ARDOUR::how_many_dsp_threads () double ARDOUR::gain_to_slider_position_with_max (double g, double max_gain) { - return gain_to_slider_position (g * 2.0/max_gain); + return gain_to_position (g * 2.0 / max_gain); } double ARDOUR::slider_position_to_gain_with_max (double g, double max_gain) { - return slider_position_to_gain (g * max_gain/2.0); + return position_to_gain (g) * max_gain / 2.0; } extern "C" { |