fix VST shell-scanner (double free), support for VST2.4
authorRobin Gareus <robin@gareus.org>
Mon, 24 Feb 2014 01:02:29 +0000 (02:02 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 24 Feb 2014 01:02:29 +0000 (02:02 +0100)
libs/ardour/session_vst.cc
libs/ardour/vst_info_file.cc

index 54843965b4badccb7bddd04937a55f60dff0e9fe..b279f520157187030d85f026062337720fe2b4c9 100644 (file)
@@ -102,7 +102,7 @@ intptr_t Session::vst_callback (
        case audioMasterVersion:
                SHOW_CALLBACK ("amc: audioMasterVersion\n");
                // vst version, currently 2 (0 for older)
-               return 2; // XXX 2400
+               return 2400;
 
        case audioMasterCurrentId:
                SHOW_CALLBACK ("amc: audioMasterCurrentId\n");
index 7b9b0855bd4157974d03c7acfc981da17c4d2c01..d5a082f0185b4c538282ce02e10d5d671c7ee965 100644 (file)
@@ -520,16 +520,6 @@ vstfx_info_from_plugin (const char *dllpath, VSTState* vstfx, vector<VSTInfo *>
                                        }
                                }
                        }
-               } else {
-                       switch(type) {
-#ifdef WINDOWS_VST_SUPPORT
-                               case 1: fst_close(vstfx); break;
-#endif
-#ifdef LXVST_SUPPORT
-                               case 2: vstfx_close (vstfx); break;
-#endif
-                               default: assert(0); break;
-                       }
                }
 #endif
        }
@@ -549,7 +539,7 @@ simple_master_callback (AEffect *, int32_t opcode, int32_t, intptr_t, void *ptr,
        const int vstfx_can_do_string_count = 2;
 
        if (opcode == audioMasterVersion) {
-               return 2;
+               return 2400;
        }
        else if (opcode == audioMasterCanDo) {
                for (int i = 0; i < vstfx_can_do_string_count; i++) {