summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-21 12:18:57 +0200
committerRobin Gareus <robin@gareus.org>2017-06-21 13:15:34 +0200
commit31c6f66d9b75c70a4b02dfa78d5b45b357e18fe8 (patch)
tree77d3c857a971968ddcfccf4362d1a4e016a085fb /libs/ardour/route.cc
parentfd3bd352033882869d4e244f34951b13db48c6c9 (diff)
Fix duplicate Gain+Trim AutomationLists in session file.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index f3031aa15a..c9aafc400b 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -139,10 +139,12 @@ Route::init ()
/* add standard controls */
_gain_control.reset (new GainControl (_session, GainAutomation));
- add_control (_gain_control);
-
_trim_control.reset (new GainControl (_session, TrimAutomation));
- add_control (_trim_control);
+ /* While the route has-a gain-control for consistency with Stripable and VCA
+ * ownership is handed over to the Amp Processor which manages the
+ * state of the Control and AutomationList as part of its
+ * Automatable API. -- Don't call add_control () here.
+ */
_solo_control.reset (new SoloControl (_session, X_("solo"), *this, *this));
add_control (_solo_control);
@@ -2539,9 +2541,7 @@ Route::set_state (const XMLNode& node, int version)
continue;
}
- if (control_name == _gain_control->name()) {
- _gain_control->set_state (*child, version);
- } else if (control_name == _solo_control->name()) {
+ if (control_name == _solo_control->name()) {
_solo_control->set_state (*child, version);
} else if (control_name == _solo_safe_control->name()) {
_solo_safe_control->set_state (*child, version);