13
0

Allow to migrate sessions with VST plugins

This commit is contained in:
Robin Gareus 2016-11-17 14:05:40 +01:00
parent cc72cff504
commit 08f94c0878

View File

@ -2401,9 +2401,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
if (prop == 0) { if (prop == 0) {
#ifdef WINDOWS_VST_SUPPORT #ifdef WINDOWS_VST_SUPPORT
/* older sessions contain VST plugins with only an "id" field. /* older sessions contain VST plugins with only an "id" field. */
*/
if (type == ARDOUR::Windows_VST) { if (type == ARDOUR::Windows_VST) {
prop = node.property ("id"); prop = node.property ("id");
} }
@ -2411,7 +2409,6 @@ PluginInsert::set_state(const XMLNode& node, int version)
#ifdef LXVST_SUPPORT #ifdef LXVST_SUPPORT
/*There shouldn't be any older sessions with linuxVST support.. but anyway..*/ /*There shouldn't be any older sessions with linuxVST support.. but anyway..*/
if (type == ARDOUR::LXVST) { if (type == ARDOUR::LXVST) {
prop = node.property ("id"); prop = node.property ("id");
} }
@ -2427,24 +2424,24 @@ PluginInsert::set_state(const XMLNode& node, int version)
boost::shared_ptr<Plugin> plugin = find_plugin (_session, prop->value(), type); boost::shared_ptr<Plugin> plugin = find_plugin (_session, prop->value(), type);
/* treat linux and windows VST plugins equivalent if they have the same uniqueID /* treat VST plugins equivalent if they have the same uniqueID
* allow to move sessions windows <> linux */ * allow to move sessions windows <> linux */
#ifdef LXVST_SUPPORT #ifdef LXVST_SUPPORT
if (plugin == 0 && type == ARDOUR::Windows_VST) { if (plugin == 0 && (type == ARDOUR::Windows_VST || type == ARDOUR::MacVST) {
type = ARDOUR::LXVST; type = ARDOUR::LXVST;
plugin = find_plugin (_session, prop->value(), type); plugin = find_plugin (_session, prop->value(), type);
} }
#endif #endif
#ifdef WINDOWS_VST_SUPPORT #ifdef WINDOWS_VST_SUPPORT
if (plugin == 0 && type == ARDOUR::LXVST) { if (plugin == 0 && (type == ARDOUR::LXVST || type == ARDOUR::MacVST)) {
type = ARDOUR::Windows_VST; type = ARDOUR::Windows_VST;
plugin = find_plugin (_session, prop->value(), type); plugin = find_plugin (_session, prop->value(), type);
} }
#endif #endif
#ifdef MACVST_SUPPORT #ifdef MACVST_SUPPORT
if (plugin == 0 && type == ARDOUR::MacVST) { if (plugin == 0 && (type == ARDOUR::Windows_VST || type == ARDOUR::LXVST)) {
type = ARDOUR::MacVST; type = ARDOUR::MacVST;
plugin = find_plugin (_session, prop->value(), type); plugin = find_plugin (_session, prop->value(), type);
} }