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 */
static long vst_callback (AEffect* effect,
long opcode,
long index,
long value,
static intptr_t vst_callback (AEffect* effect,
int32_t opcode,
int32_t index,
intptr_t value,
void* ptr,
float opt);

View file

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

View file

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