print a warning for every VST >=2.4 plugin
authorRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2013 17:45:40 +0000 (18:45 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2013 17:45:40 +0000 (18:45 +0100)
17:29 < rgareus> las: ok. I'll make this translatable, but this warning will show up every time ardour starts (and scans for plugins) which can be annoying.
17:30 < las> rgareus: yeah, well we need to do black/whitelisting of plugins anyway so ...

libs/ardour/linux_vst_support.cc

index e141717f3e3f444ab0d4d742fd4f20f085f88b76..9d36905f489465614df4ab28a7aecb0341577f40 100644 (file)
@@ -242,9 +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, "VSTPluginMain")) == 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*/