summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-09-20 20:29:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-09-20 20:29:47 +0000
commitd4433b9ab384196bb5b8876890863d7939339ee2 (patch)
tree669f503a04696c7869a14d5c5f6239024ba43e76 /gtk2_ardour/plugin_ui.cc
parente09e0035a62ce9f8876b6204682bbb3db474d477 (diff)
(native) Linux VST support from LinuxDSP
git-svn-id: svn://localhost/ardour2/branches/3.0@10101 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r--gtk2_ardour/plugin_ui.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index beb070c150..f6a97a1cf1 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -50,6 +50,10 @@
#include "ardour/vst_plugin.h"
#include "vst_pluginui.h"
#endif
+#ifdef LXVST_SUPPORT
+#include "ardour/lxvst_plugin.h"
+#include "lxvst_plugin_ui.h"
+#endif
#ifdef LV2_SUPPORT
#include "ardour/lv2_plugin.h"
#include "lv2_plugin_ui.h"
@@ -98,6 +102,10 @@ PluginUIWindow::PluginUIWindow (
case ARDOUR::VST:
have_gui = create_vst_editor (insert);
break;
+
+ case ARDOUR::LXVST:
+ have_gui = create_lxvst_editor (insert);
+ break;
case ARDOUR::AudioUnit:
have_gui = create_audiounit_editor (insert);
@@ -275,6 +283,36 @@ PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert>)
}
bool
+#ifdef LXVST_SUPPORT
+PluginUIWindow::create_lxvst_editor(boost::shared_ptr<PluginInsert> insert)
+#else
+PluginUIWindow::create_lxvst_editor(boost::shared_ptr<PluginInsert>)
+#endif
+{
+#ifndef LXVST_SUPPORT
+ return false;
+#else
+
+ boost::shared_ptr<LXVSTPlugin> lxvp;
+
+ if ((lxvp = boost::dynamic_pointer_cast<LXVSTPlugin> (insert->plugin())) == 0) {
+ error << _("unknown type of editor-supplying plugin (note: no linuxVST support in this version of ardour)")
+ << endmsg;
+ throw failed_constructor ();
+ } else {
+ LXVSTPluginUI* lxvpu = new LXVSTPluginUI (insert, lxvp);
+
+ _pluginui = lxvpu;
+ _pluginui->KeyboardFocused.connect (sigc::mem_fun (*this, &PluginUIWindow::keyboard_focused));
+ add (*lxvpu);
+ lxvpu->package (*this);
+ }
+
+ return true;
+#endif
+}
+
+bool
#ifdef GTKOSX
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert> insert)
#else