summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-18 20:01:36 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-18 20:01:36 +0000
commitd2c23d82047cf465b87c502eccc87582654fe43f (patch)
treebcd6414a7ffa23bd08335415ee7c362fc0cae7ad /libs/ardour
parentd05a3f73050484868c8b4fcdf6a1df9715aba192 (diff)
Fix save/reload of pan automation.
git-svn-id: svn://localhost/ardour2/branches/3.0@7798 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/automatable.h4
-rw-r--r--libs/ardour/automatable.cc6
-rw-r--r--libs/ardour/panner.cc9
-rw-r--r--libs/ardour/processor.cc4
-rw-r--r--libs/ardour/route.cc2
5 files changed, 16 insertions, 9 deletions
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h
index 469025c693..f90f1dec48 100644
--- a/libs/ardour/ardour/automatable.h
+++ b/libs/ardour/ardour/automatable.h
@@ -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;
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index 0c28eb95e0..4de2e89b41 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -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"));
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index 3f6b23672a..5b33eaf1f5 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -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;
}
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc
index 555dff5092..86f63d5a2f 100644
--- a/libs/ardour/processor.cc
+++ b/libs/ardour/processor.cc
@@ -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) {
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 81d822e749..880db63c7d 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -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));
}
}
}