summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-10-11 17:09:39 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-10-11 17:09:39 -0600
commite6901dca30d76100641bb4b761aaf56255f0a0d0 (patch)
treea3bf663458d12ff739ed0c5e979c89cb30a3c0cc /gtk2_ardour/automation_controller.cc
parent5163393c115f5aec17873f652e033a6c3f365363 (diff)
interface range generated by internal_to_interface() may not span 0..1, so remove asserts
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index 63c6973922..6bd40a527c 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -147,16 +147,16 @@ AutomationController::create(const Evoral::Parameter& param,
bool use_knob)
{
const double lo = ac->internal_to_interface(desc.lower, true);
- const double up = ac->internal_to_interface(desc.upper, true);
const double normal = ac->internal_to_interface(desc.normal, true);
const double smallstep = fabs (ac->internal_to_interface(desc.lower + desc.smallstep, true) - lo);
const double largestep = fabs (ac->internal_to_interface(desc.lower + desc.largestep, true) - lo);
- assert (std::min(lo, up) == 0);
- assert (std::max(lo, up) == 1.0);
+ /* even though internal_to_interface() may not generate the full range
+ * 0..1, the interface range is 0..1 by definition, so just hard code
+ * that.
+ */
- Gtk::Adjustment* adjustment = manage (
- new Gtk::Adjustment (normal, std::min(lo, up), std::max(lo, up), smallstep, largestep));
+ Gtk::Adjustment* adjustment = manage (new Gtk::Adjustment (normal, 0.0, 1.0, smallstep, largestep));
assert (ac);
assert(ac->parameter() == param);