diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-28 20:31:25 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-28 20:31:25 -0400 |
commit | 63b02a265a6d5e821198b5e3fcc1f6ba6d83a129 (patch) | |
tree | 0119b14bd45492dab27c670c0b21d163bef4899d /libs/ardour/linux_vst_support.cc | |
parent | db34831b183d511d76ea1f29606e1933e5ad4caf (diff) |
Revert "fix LXVST support for plugins that make audioMaster callbacks from
within effOpen (e.g. glitch)"
This patch broke just about all other LVXST plugins. Glitch is doing something
wrong, or there is more magic about VST that we have yet to understand.
This reverts commit 56bc98f78bd3b1e5ba5c6ce902b2805d40a6cc53.
Diffstat (limited to 'libs/ardour/linux_vst_support.cc')
-rw-r--r-- | libs/ardour/linux_vst_support.cc | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc index 9106d69009..99251f08e4 100644 --- a/libs/ardour/linux_vst_support.cc +++ b/libs/ardour/linux_vst_support.cc @@ -34,8 +34,6 @@ #include <glibmm/fileutils.h> #include "ardour/linux_vst_support.h" -#include "ardour/vst_plugin.h" - #include "pbd/basename.h" #include "pbd/error.h" @@ -295,43 +293,36 @@ vstfx_unload (VSTHandle* fhandle) return 0; } -/** - Instantiates a VST plugin and also set _state of its plugin argument - */ +/*This instantiates a plugin*/ -VSTState* -vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void *ptr) +VSTState * +vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr) { VSTState* vstfx = vstfx_new (); - ARDOUR::VSTPlugin* plugin = reinterpret_cast<ARDOUR::VSTPlugin*> (ptr); - if (fhandle == 0) { + if(fhandle == 0) + { vstfx_error( "** ERROR ** VSTFX : The handle was 0\n" ); return 0; } - if ((vstfx->plugin = fhandle->main_entry (amc)) == 0) { + if ((vstfx->plugin = fhandle->main_entry (amc)) == 0) + { vstfx_error ("** ERROR ** VSTFX : %s could not be instantiated :(\n", fhandle->name); free (vstfx); return 0; } vstfx->handle = fhandle; - vstfx->plugin->user = plugin; + vstfx->plugin->user = userptr; - if (vstfx->plugin->magic != kEffectMagic) { + if (vstfx->plugin->magic != kEffectMagic) + { vstfx_error ("** ERROR ** VSTFX : %s is not a VST plugin\n", fhandle->name); free (vstfx); return 0; } - - /* need to set this here because some plugins make audioMaster - * callbacks from within effOpen, and _state must be set for - * that to work. - */ - plugin->set_state (vstfx); - vstfx->plugin->dispatcher (vstfx->plugin, effOpen, 0, 0, 0, 0); /*May or May not need to 'switch the plugin on' here - unlikely |