diff options
Diffstat (limited to 'libs/fst')
-rw-r--r-- | libs/fst/fst.h | 7 | ||||
-rw-r--r-- | libs/fst/fstinfofile.c | 22 | ||||
-rw-r--r-- | libs/fst/vsti.c | 10 |
3 files changed, 21 insertions, 18 deletions
diff --git a/libs/fst/fst.h b/libs/fst/fst.h index 15ba72d66f..f4482ec377 100644 --- a/libs/fst/fst.h +++ b/libs/fst/fst.h @@ -6,6 +6,7 @@ #include <pthread.h> #include "ardour/vst_types.h" +#include "ardour/vestige/aeffectx.h" /** * Display FST error message. @@ -27,8 +28,6 @@ void fst_set_error_function (void (*func)(const char *)); void fst_error (const char *fmt, ...); -#include <vestige/aeffectx.h> - typedef struct _FST FST; typedef struct _FSTHandle FSTHandle; typedef struct _FSTInfo FSTInfo; @@ -55,7 +54,7 @@ struct _FSTInfo char **ParamLabels; }; -typedef struct AEffect * (*main_entry_t)(audioMasterCallback); +typedef AEffect * (*main_entry_t)(audioMasterCallback); struct _FSTHandle { @@ -70,7 +69,7 @@ struct _FSTHandle struct _FST { - struct AEffect* plugin; + AEffect* plugin; void* window; /* win32 HWND */ int xid; /* X11 XWindow */ FSTHandle* handle; diff --git a/libs/fst/fstinfofile.c b/libs/fst/fstinfofile.c index 63f0c35cc2..d848d3ae34 100644 --- a/libs/fst/fstinfofile.c +++ b/libs/fst/fstinfofile.c @@ -145,8 +145,10 @@ static int fst_info_file_is_valid( char *dllpath ) { return TRUE; } -static int fst_can_midi( FST *fst ) { - struct AEffect *plugin = fst->plugin; +static int +fst_can_midi (FST *fst) +{ + AEffect* plugin = fst->plugin; int vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, NULL, 0.0f); if (vst_version >= 2) { @@ -160,11 +162,13 @@ static int fst_can_midi( FST *fst ) { return FALSE; } -static FSTInfo *fst_info_from_plugin( FST *fst ) { - FSTInfo *info = (FSTInfo *) malloc( sizeof( FSTInfo ) ); - struct AEffect *plugin; - int i; - char creator[65]; +static FSTInfo * +fst_info_from_plugin (FST* fst) +{ + FSTInfo* info = (FSTInfo *) malloc( sizeof( FSTInfo ) ); + AEffect* plugin; + int i; + char creator[65]; if( ! fst ) { fst_error( "fst is NULL\n" ); @@ -184,7 +188,7 @@ static FSTInfo *fst_info_from_plugin( FST *fst ) { info->creator = strdup (creator); } - info->UniqueID = *((int32_t *) &plugin->unused_id); + info->UniqueID = *((int32_t *) &plugin->uniqueID); info->Category = strdup( "None" ); // FIXME: info->numInputs = plugin->numInputs; @@ -213,7 +217,7 @@ static FSTInfo *fst_info_from_plugin( FST *fst ) { // most simple one :) could be sufficient.... static intptr_t -simple_master_callback (struct AEffect *fx, int32_t opcode, int32_t index, intptr_t value, void *ptr, float opt) +simple_master_callback (AEffect *fx, int32_t opcode, int32_t index, intptr_t value, void *ptr, float opt) { if (opcode == audioMasterVersion) { return 2; diff --git a/libs/fst/vsti.c b/libs/fst/vsti.c index 6a64f9c5e4..a9f5076775 100644 --- a/libs/fst/vsti.c +++ b/libs/fst/vsti.c @@ -30,9 +30,9 @@ #include <fcntl.h> #include <stdbool.h> #include <jackvst.h> -#include <vestige/aeffectx.h> #include <pthread.h> #include <sched.h> +#include "ardour/vestige/aeffectx.h" snd_seq_t * create_sequencer (const char* client_name, bool isinput) @@ -66,17 +66,17 @@ create_sequencer (const char* client_name, bool isinput) static void queue_midi (JackVST *jvst, int val1, int val2, int val3) { - struct VstMidiEvent *pevent; + VstMidiEvent *pevent; jack_ringbuffer_data_t vec[2]; jack_ringbuffer_get_write_vector (jvst->event_queue, vec); - if (vec[0].len < sizeof (struct VstMidiEvent)) { + if (vec[0].len < sizeof (VstMidiEvent)) { fst_error ("event queue has no write space"); return; } - pevent = (struct VstMidiEvent *) vec[0].buf; + pevent = (VstMidiEvent *) vec[0].buf; // printf("note: %d\n",note); @@ -97,7 +97,7 @@ queue_midi (JackVST *jvst, int val1, int val2, int val3) //printf("Sending: %x %x %x\n",val1,val2,val3); - jack_ringbuffer_write_advance (jvst->event_queue, sizeof (struct VstMidiEvent)); + jack_ringbuffer_write_advance (jvst->event_queue, sizeof (VstMidiEvent)); } void *midireceiver(void *arg) |