From 31c6f66d9b75c70a4b02dfa78d5b45b357e18fe8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 21 Jun 2017 12:18:57 +0200 Subject: [PATCH] Fix duplicate Gain+Trim AutomationLists in session file. --- libs/ardour/route.cc | 12 ++++++------ 1 file 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);