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:
parent
bef7b70e47
commit
8e34ec7c0e
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user