From: Robin Gareus Date: Thu, 23 Feb 2017 17:33:10 +0000 (+0100) Subject: Constrain VCA slave value to controllable range X-Git-Tag: 5.7~43 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=e8cebac6a36a45a59cd70f3a0c68a2311366f784;hp=5d8a3ea2f04ac284c08e3a3bd3ec865f1378073d;p=ardour.git Constrain VCA slave value to controllable range This prevents overshoot e.g. when writing automation (and related oddities) --- diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index dbcce27f22..a1b9d8064d 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -108,6 +108,7 @@ SlavableAutomationControl::actually_set_value (double value, PBD::Controllable:: value = 0.0; } else { value /= masters_value; + value = std::max (lower(), std::min(upper(), value)); } } }