summaryrefslogtreecommitdiff
path: root/libs/ardour/processor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/processor.cc')
-rw-r--r--libs/ardour/processor.cc37
1 files changed, 36 insertions, 1 deletions
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc
index c8f7a136bb..e1db982fe1 100644
--- a/libs/ardour/processor.cc
+++ b/libs/ardour/processor.cc
@@ -145,8 +145,43 @@ Processor::state (bool full_state)
}
int
-Processor::set_state (const XMLNode& node)
+Processor::set_state_2X (const XMLNode & node, int version)
{
+ XMLProperty const * prop;
+
+ XMLNodeList children = node.children ();
+
+ for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
+
+ if ((*i)->name() == X_("IO")) {
+
+ if ((prop = (*i)->property ("name")) != 0) {
+ set_name (prop->value ());
+ }
+
+ if ((prop = (*i)->property ("id")) != 0) {
+ _id = prop->value ();
+ }
+
+ if ((prop = (*i)->property ("active")) != 0) {
+ if (_active != string_is_affirmative (prop->value())) {
+ _active = !_active;
+ ActiveChanged (); /* EMIT_SIGNAL */
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+int
+Processor::set_state (const XMLNode& node, int version)
+{
+ if (version < 3000) {
+ return set_state_2X (node, version);
+ }
+
const XMLProperty *prop;
const XMLProperty *legacy_active = 0;