summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-10-15 00:57:55 +0000
committerCarl Hetherington <carl@carlh.net>2009-10-15 00:57:55 +0000
commit79f91c7a205d981d2b8cc15e32a6da02d8423065 (patch)
treef27dd8319522be8321720ef3560c2207dd56b158 /libs/ardour/plugin_insert.cc
parent09efd82c6aea973e3eb9497ef2b09256bf5ddde4 (diff)
Part 1 of loading 2.X sessions; some things work, some things don't, hacks a-plenty.
LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE, MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION. So don't do that unless you make a backup of the session file first. git-svn-id: svn://localhost/ardour2/branches/3.0@5786 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 1fff176713..14ea464555 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -81,12 +81,12 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug)
ProcessorCreated (this); /* EMIT SIGNAL */
}
-PluginInsert::PluginInsert (Session& s, const XMLNode& node)
+PluginInsert::PluginInsert (Session& s, const XMLNode& node, int version)
: Processor (s, "unnamed plugin insert"),
_signal_analysis_collected_nframes(0),
_signal_analysis_collect_nframes_max(0)
{
- if (set_state (node)) {
+ if (set_state (node, version)) {
throw failed_constructor();
}
@@ -716,7 +716,7 @@ PluginInsert::state (bool full)
}
int
-PluginInsert::set_state(const XMLNode& node)
+PluginInsert::set_state(const XMLNode& node, int version)
{
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
@@ -730,6 +730,7 @@ PluginInsert::set_state(const XMLNode& node)
}
if (prop->value() == X_("ladspa") || prop->value() == X_("Ladspa")) { /* handle old school sessions */
+ cout << "- LADSPA\n";
type = ARDOUR::LADSPA;
} else if (prop->value() == X_("lv2")) {
type = ARDOUR::LV2;
@@ -743,6 +744,7 @@ PluginInsert::set_state(const XMLNode& node)
}
prop = node.property ("unique-id");
+ cout << "- ID " << prop->value() << "\n";
if (prop == 0) {
error << _("Plugin has no unique ID field") << endmsg;
return -1;
@@ -777,7 +779,7 @@ PluginInsert::set_state(const XMLNode& node)
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == plugin->state_node_name()) {
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
- (*i)->set_state (**niter);
+ (*i)->set_state (**niter, version);
}
break;
}
@@ -792,8 +794,8 @@ PluginInsert::set_state(const XMLNode& node)
break;
}
}
-
- Processor::set_state (*insert_node);
+
+ Processor::set_state (*insert_node, version);
/* look for port automation node */