summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-21 22:46:20 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-21 22:46:20 +0000
commitbae2dcd4bf57d2ce54f266f4048df7f641866a69 (patch)
treefdf2ec3d9bc0f4e0ee437753bbc0f95e016574f6
parent6de0f8a8a8348b502344bbd3a50b8c54f4d7afaf (diff)
Share VSTKey struct beween linux and windows VST.
git-svn-id: svn://localhost/ardour2/branches/3.0@10750 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rwxr-xr-xgtk2_ardour/vstfxwin.cc2
-rw-r--r--gtk2_ardour/windows_vst_plugin_ui.cc2
-rwxr-xr-xlibs/ardour/ardour/vstfx.h17
-rw-r--r--libs/fst/fst.h13
4 files changed, 8 insertions, 26 deletions
diff --git a/gtk2_ardour/vstfxwin.cc b/gtk2_ardour/vstfxwin.cc
index abdde722ee..65ff7912e9 100755
--- a/gtk2_ardour/vstfxwin.cc
+++ b/gtk2_ardour/vstfxwin.cc
@@ -17,7 +17,7 @@
#include <signal.h>
#include <glib.h>
-#include <ardour/vstfx.h>
+#include "ardour/vstfx.h"
#include <X11/X.h>
#include <X11/Xlib.h>
diff --git a/gtk2_ardour/windows_vst_plugin_ui.cc b/gtk2_ardour/windows_vst_plugin_ui.cc
index e76458051b..dbd61b3268 100644
--- a/gtk2_ardour/windows_vst_plugin_ui.cc
+++ b/gtk2_ardour/windows_vst_plugin_ui.cc
@@ -143,7 +143,7 @@ WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
FST* fst = vst->fst ();
pthread_mutex_lock (&fst->lock);
- if (fst->n_pending_keys == (sizeof (fst->pending_keys) * sizeof (FSTKey))) {
+ if (fst->n_pending_keys == (sizeof (fst->pending_keys) * sizeof (VSTKey))) {
/* buffer full */
return;
}
diff --git a/libs/ardour/ardour/vstfx.h b/libs/ardour/ardour/vstfx.h
index 1f0a85364a..decfd571de 100755
--- a/libs/ardour/ardour/vstfx.h
+++ b/libs/ardour/ardour/vstfx.h
@@ -6,6 +6,8 @@
#include <pthread.h>
#include <stdio.h>
+#include "ardour/vst_types.h"
+
/******************************************************************************************/
/*VSTFX - an engine to manage native linux VST plugins - derived from FST for Windows VSTs*/
/******************************************************************************************/
@@ -25,7 +27,6 @@ void vstfx_error (const char *fmt, ...);
typedef struct _VSTFX VSTFX;
typedef struct _VSTFXHandle VSTFXHandle;
typedef struct _VSTFXInfo VSTFXInfo;
-typedef struct _VSTFXKey VSTFXKey;
/*Struct to contain the info about a plugin*/
@@ -69,18 +70,6 @@ struct _VSTFXHandle
int plugincnt;
};
-/*No key forwarding enabled in vstfx at the moment - maybe
- not required*/
-
-struct _VSTFXKey
-{
- /** virtual-key code, or 0 if this _VSTFXKey is a `character' key */
- int special;
- /** `character' key, or 0 if this _VSTFXKey is a virtual-key */
- int character;
-};
-
-
/*Structure used to describe the instance of VSTFX responsible for
a particular plugin instance. These are connected together in a
@@ -119,7 +108,7 @@ struct _VSTFX
float *want_params;
float *set_params;
- VSTFXKey pending_keys[16];
+ VSTKey pending_keys[16];
int dispatcher_wantcall;
int dispatcher_opcode;
diff --git a/libs/fst/fst.h b/libs/fst/fst.h
index 6cf057d2fa..86a43ba8d8 100644
--- a/libs/fst/fst.h
+++ b/libs/fst/fst.h
@@ -5,6 +5,8 @@
#include <signal.h>
#include <pthread.h>
+#include "ardour/vst_types.h"
+
/**
* Display FST error message.
*
@@ -34,7 +36,6 @@ void fst_error (const char *fmt, ...);
typedef struct _FST FST;
typedef struct _FSTHandle FSTHandle;
typedef struct _FSTInfo FSTInfo;
-typedef struct _FSTKey FSTKey;
struct _FSTInfo
{
@@ -71,14 +72,6 @@ struct _FSTHandle
int plugincnt;
};
-struct _FSTKey
-{
- /** virtual-key code, or 0 if this _FSTKey is a `character' key */
- int special;
- /** `character' key, or 0 if this _FSTKey is a virtual-key */
- int character;
-};
-
struct _FST
{
struct AEffect* plugin;
@@ -101,7 +94,7 @@ struct _FST
float *want_params;
float *set_params;
- FSTKey pending_keys[16];
+ VSTKey pending_keys[16];
int n_pending_keys;
int dispatcher_wantcall;