summaryrefslogtreecommitdiff
path: root/libs/ardour/lxvst_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-02-23 21:11:53 +0100
committerRobin Gareus <robin@gareus.org>2014-02-23 21:11:53 +0100
commit2e0c98c48903c67fcef7abd77a7c53f3f2d41e2f (patch)
tree5385a3ce65c4dcc1080d5ff91b5da6fcb934d876 /libs/ardour/lxvst_plugin.cc
parentfac93f7a82833b094c36164d733bb3c352a7223e (diff)
remaining bits for VST-shell plugin support ..and more VST rework
Diffstat (limited to 'libs/ardour/lxvst_plugin.cc')
-rw-r--r--libs/ardour/lxvst_plugin.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/ardour/lxvst_plugin.cc b/libs/ardour/lxvst_plugin.cc
index 6e30e0c443..c3074d65ad 100644
--- a/libs/ardour/lxvst_plugin.cc
+++ b/libs/ardour/lxvst_plugin.cc
@@ -27,14 +27,16 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
-LXVSTPlugin::LXVSTPlugin (AudioEngine& e, Session& session, VSTHandle* h)
+LXVSTPlugin::LXVSTPlugin (AudioEngine& e, Session& session, VSTHandle* h, int unique_id)
: VSTPlugin (e, session, h)
{
/* Instantiate the plugin and return a VSTState* */
+ Session::vst_current_loading_id = unique_id;
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
+ Session::vst_current_loading_id = 0;
set_plugin (_state->plugin);
}
@@ -44,9 +46,12 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other)
{
_handle = other._handle;
+ Session::vst_current_loading_id = PBD::atoi(other.unique_id());
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
+ Session::vst_current_loading_id = 0;
+
_plugin = _state->plugin;
// Plugin::setup_controls ();
@@ -72,7 +77,7 @@ LXVSTPluginInfo::load (Session& session)
error << string_compose(_("LXVST: cannot load module from \"%1\""), path) << endmsg;
}
else {
- plugin.reset (new LXVSTPlugin (session.engine(), session, handle));
+ plugin.reset (new LXVSTPlugin (session.engine(), session, handle, PBD::atoi(unique_id)));
}
}
else {