summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-22 16:30:58 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-22 16:30:58 +0000
commit8e34ec7c0e8338c67fb3e6c4274fdc7589831bf5 (patch)
tree7ea1af5fd4d70ce586f5cebe73d7efdbce27a934
parentbef7b70e470aa8e3b589fd72c5cdac2b77fa7ada (diff)
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
-rw-r--r--libs/ardour/ardour/session.h23
-rwxr-xr-xlibs/ardour/lxvst_plugin.cc4
-rw-r--r--libs/ardour/session_vst.cc7
-rw-r--r--libs/ardour/wscript7
4 files changed, 18 insertions, 23 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index b9e426c96f..5b87b5bc9b 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -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 */
diff --git a/libs/ardour/lxvst_plugin.cc b/libs/ardour/lxvst_plugin.cc
index 90c2c70b50..f14d052fd4 100755
--- a/libs/ardour/lxvst_plugin.cc
+++ b/libs/ardour/lxvst_plugin.cc
@@ -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;
diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc
index 91a845e495..9ba3864383 100644
--- a/libs/ardour/session_vst.cc
+++ b/libs/ardour/session_vst.cc
@@ -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 {
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 2ef77ceea4..6d79413a1f 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -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']