add support for VST>=2.4
authorRobin Gareus <robin@gareus.org>
Thu, 20 Feb 2014 01:29:58 +0000 (02:29 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 22 Feb 2014 02:11:47 +0000 (03:11 +0100)
libs/fst/vstwin.c

index 67ae03986ee3202c17cf8af63b4e4d5c2c04af55..3cb22adafafef54489981e68092818382ce26062 100644 (file)
@@ -566,7 +566,16 @@ fst_load (const char *path)
                return NULL;
        }
 
-       if ((fhandle->main_entry = (main_entry_t) GetProcAddress (fhandle->dll, "main")) == NULL) {
+       fhandle->main_entry = (main_entry_t) GetProcAddress (fhandle->dll, "main");
+
+       if (fhandle->main_entry == 0) {
+         if (fhandle->main_entry = (main_entry_t) GetProcAddress (fhandle->dll, "VSTPluginMain") != 0) {
+                       fprintf(stderr, "VST >= 2.4 plugin '%s'\n", path);
+                       //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) {
                fst_unload (fhandle);
                return NULL;
        }