Use same VST callback for both Linux and Windows VSTs.

git-svn-id: svn://localhost/ardour2/branches/3.0@10775 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-22 16:30:58 +00:00
parent bef7b70e47
commit 8e34ec7c0e
4 changed files with 18 additions and 23 deletions

View File

@ -740,22 +740,15 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* VST support */
static intptr_t vst_callback (AEffect* effect,
int32_t opcode,
int32_t index,
intptr_t value,
void* ptr,
float opt);
static intptr_t vst_callback (
AEffect* effect,
int32_t opcode,
int32_t index,
intptr_t value,
void* ptr,
float opt
);
/*Native linuxVST support*/
static intptr_t lxvst_callback (AEffect* effect,
int32_t opcode,
int32_t index,
intptr_t value,
void* ptr,
float opt);
static PBD::Signal0<void> SendFeedback;
/* Speakers */

View File

@ -32,7 +32,7 @@ LXVSTPlugin::LXVSTPlugin (AudioEngine& e, Session& session, VSTHandle* h)
{
/* Instantiate the plugin and return a VSTState* */
if ((_state = vstfx_instantiate (_handle, Session::lxvst_callback, this)) == 0) {
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
@ -44,7 +44,7 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other)
{
_handle = other._handle;
if ((_state = vstfx_instantiate (_handle, Session::lxvst_callback, this)) == 0) {
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
_plugin = _state->plugin;

View File

@ -20,12 +20,11 @@
#include <stdbool.h>
#include <cstdio>
#include <fst.h>
#include "ardour/session.h"
#include "ardour/tempo.h"
#include "ardour/windows_vst_plugin.h"
#include "ardour/vestige/aeffectx.h"
#include "ardour/vst_types.h"
#include "i18n.h"
@ -50,7 +49,7 @@ intptr_t Session::vst_callback (
)
{
static VstTimeInfo _timeInfo;
WindowsVSTPlugin* plug;
VSTPlugin* plug;
Session* session;
if (debug_callbacks < 0) {
@ -58,7 +57,7 @@ intptr_t Session::vst_callback (
}
if (effect && effect->user) {
plug = (WindowsVSTPlugin*) (effect->user);
plug = (VSTPlugin *) (effect->user);
session = &plug->session();
SHOW_CALLBACK ("am callback 0x%x, opcode = %d, plugin = \"%s\" ", (int) pthread_self(), opcode, plug->name());
} else {

View File

@ -386,14 +386,17 @@ def build(bld):
obj.uselib += ['SUIL']
if bld.is_defined('WINDOWS_VST_SUPPORT'):
obj.source += [ 'windows_vst_plugin.cc', 'session_vst.cc' ]
obj.source += [ 'windows_vst_plugin.cc']
obj.includes += [ '../fst' ]
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
if bld.is_defined('LXVST_SUPPORT'):
obj.source += [ 'lxvst_plugin.cc', 'session_lxvst.cc', 'vstfx.cc', 'vstfxinfofile.cc' ]
obj.source += [ 'lxvst_plugin.cc', 'vstfx.cc', 'vstfxinfofile.cc' ]
obj.defines += [ 'LXVST_SUPPORT' ]
if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
obj.source += [ 'session_vst.cc' ]
if bld.is_defined('HAVE_COREAUDIO'):
obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
obj.use += ['libappleutility']