X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Flinux_vst_support.cc;h=9d36905f489465614df4ab28a7aecb0341577f40;hb=3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2;hp=99251f08e476234f7969f5d6c7489ad5dc558f2d;hpb=78c6c9c04a35caf96b2b4c5755668f9d3b91c912;p=ardour.git diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc index 99251f08e4..9d36905f48 100644 --- a/libs/ardour/linux_vst_support.cc +++ b/libs/ardour/linux_vst_support.cc @@ -242,7 +242,15 @@ vstfx_load (const char *path) /*Find the main entry point into the plugin*/ - if ((fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "main")) == 0) + fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "main"); + + if (fhandle->main_entry == 0) { + if ((fhandle->main_entry = (main_entry_t) dlsym(fhandle->dll, "VSTPluginMain")) != 0) { + PBD::warning << path << _(": is a VST >= 2.4 - this plugin may or may not function correctly with this version of Ardour.") << endmsg; + } + } + + if (fhandle->main_entry == 0) { /*If it can't be found, unload the plugin and return a 0 handle*/ @@ -379,6 +387,7 @@ void vstfx_close (VSTState* vstfx) dlclose(vstfx->handle->dll); //dlclose keeps its own reference count vstfx->handle->dll = 0; } + free(vstfx); }