summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-25 18:40:43 +0200
committerRobin Gareus <robin@gareus.org>2017-04-25 18:40:43 +0200
commitd8c926979e5e189e09d5328059dee56d2b84a851 (patch)
treef7eae68f1bb5cf0fb1e22a28abe2bafba2b2128f /libs/ardour/plugin_insert.cc
parent54e374f27253c4a714fd4a640f9def1f2aa21d79 (diff)
Assume VST chunks are portable (Mac, Linux, Windows VST)
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index cad4890494..c20464be89 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -2487,6 +2487,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
}
boost::shared_ptr<Plugin> plugin = find_plugin (_session, prop->value(), type);
+ bool any_vst = false;
/* treat VST plugins equivalent if they have the same uniqueID
* allow to move sessions windows <> linux */
@@ -2494,6 +2495,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
if (plugin == 0 && (type == ARDOUR::Windows_VST || type == ARDOUR::MacVST)) {
type = ARDOUR::LXVST;
plugin = find_plugin (_session, prop->value(), type);
+ if (plugin) { any_vst = true; }
}
#endif
@@ -2501,6 +2503,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
if (plugin == 0 && (type == ARDOUR::LXVST || type == ARDOUR::MacVST)) {
type = ARDOUR::Windows_VST;
plugin = find_plugin (_session, prop->value(), type);
+ if (plugin) { any_vst = true; }
}
#endif
@@ -2508,6 +2511,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
if (plugin == 0 && (type == ARDOUR::Windows_VST || type == ARDOUR::LXVST)) {
type = ARDOUR::MacVST;
plugin = find_plugin (_session, prop->value(), type);
+ if (plugin) { any_vst = true; }
}
#endif
@@ -2575,7 +2579,9 @@ PluginInsert::set_state(const XMLNode& node, int version)
and set all plugins to the same state.
*/
- if ((*niter)->name() == plugin->state_node_name()) {
+ if ( ((*niter)->name() == plugin->state_node_name())
+ || (any_vst && ((*niter)->name() == "lxvst" || (*niter)->name() == "windows-vst" || (*niter)->name() == "mac-vst"))
+ ) {
for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
/* Plugin state can include external files which are named after the ID.