juce_VSTPluginFormat.cpp Warning Fixes


#1

Hi Jules,

Since I started building applications solely in x64, I’ve been getting some warnings from the VST code. Here are the changes to fix them:

//Added typecast to int:
    int getCurrentProgram()       { return (int) dispatch (effGetProgram, 0, 0, 0, 0); }
//value is now a VstIntPtr:
static VstIntPtr VSTCALLBACK audioMaster (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt)
//value is now a VstIntPtr:
static VstIntPtr handleGeneralCallback (VstInt32 opcode, VstInt32 /*index*/, VstIntPtr /*value*/, void *ptr, float /*opt*/)

#2

Thanks! (Although the audioMaster callback already looks like that, doesn’t it?)


#3

Oh woops - I thought I put that change there… Just checked the diff and I guess not!

I also noticed that you will need to do this small change too (a clean/rebuild in VS just made this warning appear):

 case audioMasterSizeWindow:
                if (AudioProcessorEditor* ed = getActiveEditor())
                    ed->setSize (index, (int) value); //Added (int)

#4

Hey Jules,

I still get another warning in the file, at line 1262 (class VSTPluginInstance). The third parameter is supposed to be of type VstIntPtr, like this:


#5

Ah right, sorry, must have missed that one. Thanks!