summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-12-11 16:21:23 +0100
committerRobin Gareus <robin@gareus.org>2019-12-11 16:25:08 +0100
commit0a5837ec7111e446f168e6a5cc245b4b62fc7a9e (patch)
treeb8830f0410889e2a76449f75a25a823173304d48 /libs/ardour/route.cc
parentdd18be15fbe9ad6a594f37b0d3a8183c0601babb (diff)
Fix loading plugin state from sessions
While loading a session XML state, set_state must use `Stateful::loading_state_version`. When later copying processor state, `Stateful::current_state_version` is correct.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 3bc66f1a30..1f56ddc5e9 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2691,7 +2691,7 @@ Route::set_state (const XMLNode& node, int version)
_initial_io_setup = false;
- set_processor_state (processor_state);
+ set_processor_state (processor_state, version);
// this looks up the internal instrument in processors
reset_instrument_info();
@@ -2988,7 +2988,7 @@ Route::set_processor_state_2X (XMLNodeList const & nList, int version)
}
void
-Route::set_processor_state (const XMLNode& node)
+Route::set_processor_state (const XMLNode& node, int version)
{
const XMLNodeList &nlist = node.children();
XMLNodeConstIterator niter;
@@ -3037,7 +3037,7 @@ Route::set_processor_state (const XMLNode& node)
_disk_writer->set_state (**niter, Stateful::current_state_version);
new_order.push_back (_disk_writer);
} else {
- set_processor_state (**niter, prop, new_order, must_configure);
+ set_processor_state (**niter, version, prop, new_order, must_configure);
}
}
@@ -3096,14 +3096,14 @@ Route::set_processor_state (const XMLNode& node)
}
bool
-Route::set_processor_state (XMLNode const & node, XMLProperty const* prop, ProcessorList& new_order, bool& must_configure)
+Route::set_processor_state (XMLNode const& node, int version, XMLProperty const* prop, ProcessorList& new_order, bool& must_configure)
{
ProcessorList::iterator o;
for (o = _processors.begin(); o != _processors.end(); ++o) {
XMLProperty const * id_prop = node.property(X_("id"));
if (id_prop && (*o)->id() == id_prop->value()) {
- (*o)->set_state (node, Stateful::current_state_version);
+ (*o)->set_state (node, version);
new_order.push_back (*o);
break;
}
@@ -3149,7 +3149,7 @@ Route::set_processor_state (XMLNode const & node, XMLProperty const* prop, Proce
return false;
}
- if (processor->set_state (node, Stateful::current_state_version) != 0) {
+ if (processor->set_state (node, version) != 0) {
/* This processor could not be configured. Turn it into a UnknownProcessor */
processor.reset (new UnknownProcessor (_session, node));
}