Fix save/reload of pan automation.
git-svn-id: svn://localhost/ardour2/branches/3.0@7798 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d05a3f7305
commit
d2c23d8204
@ -93,8 +93,8 @@ public:
|
||||
|
||||
typedef Evoral::ControlSet::Controls Controls;
|
||||
|
||||
int set_automation_state (const XMLNode&, Evoral::Parameter default_param);
|
||||
XMLNode& get_automation_state();
|
||||
int set_automation_xml_state (const XMLNode&, Evoral::Parameter default_param);
|
||||
XMLNode& get_automation_xml_state();
|
||||
|
||||
protected:
|
||||
Session& _a_session;
|
||||
|
@ -224,7 +224,7 @@ Automatable::mark_automation_visible (Evoral::Parameter what, bool yn)
|
||||
* pass that type and it will be used for the untyped AutomationList found.
|
||||
*/
|
||||
int
|
||||
Automatable::set_automation_state (const XMLNode& node, Evoral::Parameter legacy_param)
|
||||
Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter legacy_param)
|
||||
{
|
||||
Glib::Mutex::Lock lm (control_lock());
|
||||
|
||||
@ -272,7 +272,7 @@ Automatable::set_automation_state (const XMLNode& node, Evoral::Parameter legacy
|
||||
}
|
||||
|
||||
} else {
|
||||
error << "Expected AutomationList node, got '" << (*niter)->name() << endmsg;
|
||||
error << "Expected AutomationList node, got '" << (*niter)->name() << "'" << endmsg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ Automatable::set_automation_state (const XMLNode& node, Evoral::Parameter legacy
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
Automatable::get_automation_state ()
|
||||
Automatable::get_automation_xml_state ()
|
||||
{
|
||||
Glib::Mutex::Lock lm (control_lock());
|
||||
XMLNode* node = new XMLNode (X_("Automation"));
|
||||
|
@ -183,7 +183,7 @@ StreamPanner::set_state (const XMLNode& node, int /*version*/)
|
||||
if ((prop = node.property (X_("mono")))) {
|
||||
set_mono (string_is_affirmative (prop->value()));
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1153,6 +1153,7 @@ Panner::state (bool full)
|
||||
node->add_child_nocopy ((*i)->state (full));
|
||||
}
|
||||
|
||||
node->add_child_nocopy (get_automation_xml_state ());
|
||||
|
||||
return *node;
|
||||
}
|
||||
@ -1259,6 +1260,12 @@ Panner::set_state (const XMLNode& node, int version)
|
||||
automation_path = Glib::build_filename(_session.automation_dir(), prop->value ());
|
||||
}
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() == X_("Automation")) {
|
||||
set_automation_xml_state (**niter, Evoral::Parameter (PanAutomation));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ Processor::state (bool full_state)
|
||||
}
|
||||
|
||||
if (full_state) {
|
||||
XMLNode& automation = Automatable::get_automation_state();
|
||||
XMLNode& automation = Automatable::get_automation_xml_state();
|
||||
if (!automation.children().empty()
|
||||
|| !automation.properties().empty()
|
||||
|| !_visible_controls.empty()) {
|
||||
@ -197,7 +197,7 @@ Processor::set_state (const XMLNode& node, int version)
|
||||
if ((prop = (*niter)->property ("path")) != 0) {
|
||||
old_set_automation_state (*(*niter));
|
||||
} else {
|
||||
set_automation_state (*(*niter), Evoral::Parameter(PluginAutomation));
|
||||
set_automation_xml_state (*(*niter), Evoral::Parameter(PluginAutomation));
|
||||
}
|
||||
|
||||
if ((prop = (*niter)->property ("visible")) != 0) {
|
||||
|
@ -2163,7 +2163,7 @@ Route::_set_state_2X (const XMLNode& node, int version)
|
||||
_main_outs->panner()->set_state(*io_child, version);
|
||||
} else if (io_child->name() == X_("Automation")) {
|
||||
/* IO's automation is for the fader */
|
||||
_amp->set_automation_state (*io_child, Evoral::Parameter (GainAutomation));
|
||||
_amp->set_automation_xml_state (*io_child, Evoral::Parameter (GainAutomation));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user