Make the windows VST callback use int32_t rather than long (to make it the same as the linux VST one); I think this is safe as the windows VST code is only built on 32-bit.

git-svn-id: svn://localhost/ardour2/branches/3.0@10754 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-21 23:45:15 +00:00
parent 1d8512210e
commit 2f7b61155e
3 changed files with 16 additions and 21 deletions

View file

@ -739,10 +739,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* VST support */ /* VST support */
static long vst_callback (AEffect* effect, static intptr_t vst_callback (AEffect* effect,
long opcode, int32_t opcode,
long index, int32_t index,
long value, intptr_t value,
void* ptr, void* ptr,
float opt); float opt);

View file

@ -40,12 +40,14 @@ static int debug_callbacks = -1;
using namespace ARDOUR; using namespace ARDOUR;
long Session::vst_callback (AEffect* effect, intptr_t Session::vst_callback (
long opcode, AEffect* effect,
long index, int32_t opcode,
long value, int32_t index,
void* ptr, intptr_t value,
float opt) void* ptr,
float opt
)
{ {
static VstTimeInfo _timeInfo; static VstTimeInfo _timeInfo;
WindowsVSTPlugin* plug; WindowsVSTPlugin* plug;
@ -58,11 +60,11 @@ long Session::vst_callback (AEffect* effect,
if (effect && effect->user) { if (effect && effect->user) {
plug = (WindowsVSTPlugin*) (effect->user); plug = (WindowsVSTPlugin*) (effect->user);
session = &plug->session(); session = &plug->session();
SHOW_CALLBACK ("am callback 0x%x, opcode = %ld, plugin = \"%s\" ", (int) pthread_self(), opcode, plug->name()); SHOW_CALLBACK ("am callback 0x%x, opcode = %d, plugin = \"%s\" ", (int) pthread_self(), opcode, plug->name());
} else { } else {
plug = 0; plug = 0;
session = 0; session = 0;
SHOW_CALLBACK ("am callback 0x%x, opcode = %ld", (int) pthread_self(), opcode); SHOW_CALLBACK ("am callback 0x%x, opcode = %d", (int) pthread_self(), opcode);
} }
switch(opcode){ switch(opcode){
@ -348,7 +350,7 @@ long Session::vst_callback (AEffect* effect,
return 0; return 0;
default: default:
SHOW_CALLBACK ("VST master dispatcher: undefed: %ld\n", opcode); SHOW_CALLBACK ("VST master dispatcher: undefed: %d\n", opcode);
break; break;
} }

View file

@ -304,13 +304,6 @@ typedef struct VstTimeInfo
} VstTimeInfo; } VstTimeInfo;
typedef intptr_t (* audioMasterCallback) (AEffect *, int32_t, int32_t, intptr_t, void *, float);
typedef long int (* audioMasterCallback)( AEffect * , long int , long int ,
long int , void * , float );
// we don't use it, may be noise
#define VSTCALLBACK
#endif #endif