summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-11-13 16:31:15 +0100
committerRobin Gareus <robin@gareus.org>2016-11-13 16:35:06 +0100
commit8b93fb02f38148c25c91ed41a4f12735be38dbf0 (patch)
tree3c10f8bc025cc8ec5489bd289b5eb27c9c6e5079 /libs/ardour/plugin_insert.cc
parent43bd7f5db18e2bf4c7de0bcf7f614399576712ab (diff)
Mac VST-2.x support
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 2283f99e4b..d3bbbf0c0d 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -50,6 +50,10 @@
#include "ardour/lxvst_plugin.h"
#endif
+#ifdef MACVST_SUPPORT
+#include "ardour/mac_vst_plugin.h"
+#endif
+
#ifdef AUDIOUNIT_SUPPORT
#include "ardour/audio_unit.h"
#endif
@@ -1242,6 +1246,9 @@ PluginInsert::plugin_factory (boost::shared_ptr<Plugin> other)
#ifdef LXVST_SUPPORT
boost::shared_ptr<LXVSTPlugin> lxvp;
#endif
+#ifdef MACVST_SUPPORT
+ boost::shared_ptr<MacVSTPlugin> mvp;
+#endif
#ifdef AUDIOUNIT_SUPPORT
boost::shared_ptr<AUPlugin> ap;
#endif
@@ -1262,6 +1269,10 @@ PluginInsert::plugin_factory (boost::shared_ptr<Plugin> other)
} else if ((lxvp = boost::dynamic_pointer_cast<LXVSTPlugin> (other)) != 0) {
return boost::shared_ptr<Plugin> (new LXVSTPlugin (*lxvp));
#endif
+#ifdef MACVST_SUPPORT
+ } else if ((mvp = boost::dynamic_pointer_cast<MacVSTPlugin> (other)) != 0) {
+ return boost::shared_ptr<Plugin> (new MacVSTPlugin (*mvp));
+#endif
#ifdef AUDIOUNIT_SUPPORT
} else if ((ap = boost::dynamic_pointer_cast<AUPlugin> (other)) != 0) {
return boost::shared_ptr<Plugin> (new AUPlugin (*ap));
@@ -2373,6 +2384,8 @@ PluginInsert::set_state(const XMLNode& node, int version)
type = ARDOUR::Windows_VST;
} else if (prop->value() == X_("lxvst")) {
type = ARDOUR::LXVST;
+ } else if (prop->value() == X_("mac-vst")) {
+ type = ARDOUR::MacVST;
} else if (prop->value() == X_("audiounit")) {
type = ARDOUR::AudioUnit;
} else if (prop->value() == X_("luaproc")) {
@@ -2403,6 +2416,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
prop = node.property ("id");
}
#endif
+
/* recheck */
if (prop == 0) {
@@ -2429,6 +2443,13 @@ PluginInsert::set_state(const XMLNode& node, int version)
}
#endif
+#ifdef MACVST_SUPPORT
+ if (plugin == 0 && type == ARDOUR::MacVST) {
+ type = ARDOUR::MacVST;
+ plugin = find_plugin (_session, prop->value(), type);
+ }
+#endif
+
if (plugin == 0 && type == ARDOUR::Lua) {
/* unique ID (sha1 of script) was not found,
* load the plugin from the serialized version in the
@@ -2937,7 +2958,7 @@ PluginInsert::add_plugin (boost::shared_ptr<Plugin> plugin)
}
}
}
-#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
+#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT)
boost::shared_ptr<VSTPlugin> vst = boost::dynamic_pointer_cast<VSTPlugin> (plugin);
if (vst) {
vst->set_insert (this, _plugins.size ());