diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-28 21:21:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-28 21:21:16 +0100 |
commit | dd2c6e7cf19a34e6dcf0565b5b9b33172e2ad25b (patch) | |
tree | d60dfbe2da7e6288abb619b0710974e869ae4eee /libs/ardour/send.cc | |
parent | 300063c8b96968293f79d41d124b2efd971e7dc7 (diff) |
Convert v5 send state-state
Diffstat (limited to 'libs/ardour/send.cc')
-rw-r--r-- | libs/ardour/send.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index 0acc1d0b34..ce0cb2a5bf 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -305,6 +305,26 @@ Send::set_state (const XMLNode& node, int version) } if (version <= 6000) { + XMLNode const* nn = &node; + +#ifdef MIXBUS + /* This was also broken in mixbus 6.0 */ + if (version <= 6000) +#else + /* version 5: Gain Control was owned by the Amp */ + if (version < 6000) +#endif + { + XMLNode* processor = node.child ("Processor"); + if (processor) { + nn = processor; + if ((gain_node = nn->child (Controllable::xml_node_name.c_str ())) != 0) { + _gain_control->set_state (*gain_node, version); + _gain_control->set_flags (Controllable::Flag ((int)_gain_control->flags() | Controllable::InlineControl)); + } + } + } + /* convert GainAutomation to BusSendLevel * * (early Ardour 6.0-pre0 and Mixbus 6.0 used "BusSendLevel" @@ -317,9 +337,11 @@ Send::set_state (const XMLNode& node, int version) * -> Automatable::set_automation_xml_state() */ XMLNodeList nlist; - XMLNode* automation = node.child ("Automation"); + XMLNode* automation = nn->child ("Automation"); if (automation) { nlist = automation->children(); + } else if (0 != (automation = node.child ("Automation"))) { + nlist = automation->children(); } for (XMLNodeIterator i = nlist.begin(); i != nlist.end(); ++i) { if ((*i)->name() != "AutomationList") { |