diff options
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/buffer_set.h | 6 | ||||
-rwxr-xr-x | libs/ardour/ardour/lxvst_plugin.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 3 | ||||
-rwxr-xr-x | libs/ardour/ardour/vestige/aeffectx.h | 249 | ||||
-rwxr-xr-x | libs/ardour/ardour/vstfx.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/windows_vst_plugin.h | 5 | ||||
-rw-r--r-- | libs/ardour/buffer_set.cc | 6 | ||||
-rw-r--r-- | libs/ardour/session_vst.cc | 2 | ||||
-rwxr-xr-x | libs/ardour/vstfxinfofile.cc | 7 | ||||
-rw-r--r-- | libs/ardour/windows_vst_plugin.cc | 2 |
10 files changed, 141 insertions, 146 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 5b0234de46..b64cdb7b60 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -31,8 +31,10 @@ #if defined VST_SUPPORT || defined LXVST_SUPPORT #include "evoral/MIDIEvent.hpp" -struct VstEvents; -struct VstMidiEvent; +struct _VstEvents; +typedef struct _VstEvents VstEvents; +struct _VstMidiEvent; +typedef struct _VstMidiEvent VstMidiEvent; #endif namespace ARDOUR { diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 108437b6a3..db0d5cd953 100755 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -34,7 +34,8 @@ struct _VSTFXHandle; struct _VSTFX; typedef struct _VSTFXHandle VSTFXHandle; typedef struct _VSTFX VSTFX; -class AEffect; +struct _AEffect; +typedef struct _AEffect AEffect; namespace ARDOUR { class AudioEngine; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d302c310c8..b9e426c96f 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -64,7 +64,8 @@ class XMLTree; class XMLNode; -class AEffect; +struct _AEffect; +typedef struct _AEffect AEffect; namespace MIDI { class Port; diff --git a/libs/ardour/ardour/vestige/aeffectx.h b/libs/ardour/ardour/vestige/aeffectx.h index 14ecb5ea6e..29fdb9a145 100755 --- a/libs/ardour/ardour/vestige/aeffectx.h +++ b/libs/ardour/ardour/vestige/aeffectx.h @@ -30,99 +30,106 @@ ( ( (int) c ) << 8 ) | \ ( ( (int) d ) << 0 ) ) -const int audioMasterAutomate = 0; -const int audioMasterVersion = 1; -const int audioMasterCurrentId = 2; -const int audioMasterIdle = 3; -const int audioMasterPinConnected = 4; +#define audioMasterAutomate 0 +#define audioMasterVersion 1 +#define audioMasterCurrentId 2 +#define audioMasterIdle 3 +#define audioMasterPinConnected 4 // unsupported? 5 -const int audioMasterWantMidi = 6; -const int audioMasterGetTime = 7; -const int audioMasterProcessEvents = 8; -const int audioMasterSetTime = 9; -const int audioMasterTempoAt = 10; -const int audioMasterGetNumAutomatableParameters = 11; -const int audioMasterGetParameterQuantization = 12; -const int audioMasterIOChanged = 13; -const int audioMasterNeedIdle = 14; -const int audioMasterSizeWindow = 15; -const int audioMasterGetSampleRate = 16; -const int audioMasterGetBlockSize = 17; -const int audioMasterGetInputLatency = 18; -const int audioMasterGetOutputLatency = 19; -const int audioMasterGetPreviousPlug = 20; -const int audioMasterGetNextPlug = 21; -const int audioMasterWillReplaceOrAccumulate = 22; -const int audioMasterGetCurrentProcessLevel = 23; -const int audioMasterGetAutomationState = 24; -const int audioMasterOfflineStart = 25; -const int audioMasterOfflineRead = 26; -const int audioMasterOfflineWrite = 27; -const int audioMasterOfflineGetCurrentPass = 28; -const int audioMasterOfflineGetCurrentMetaPass = 29; -const int audioMasterSetOutputSampleRate = 30; +#define audioMasterWantMidi 6 +#define audioMasterGetTime 7 +#define audioMasterProcessEvents 8 +#define audioMasterSetTime 9 +#define audioMasterTempoAt 10 +#define audioMasterGetNumAutomatableParameters 11 +#define audioMasterGetParameterQuantization 12 +#define audioMasterIOChanged 13 +#define audioMasterNeedIdle 14 +#define audioMasterSizeWindow 15 +#define audioMasterGetSampleRate 16 +#define audioMasterGetBlockSize 17 +#define audioMasterGetInputLatency 18 +#define audioMasterGetOutputLatency 19 +#define audioMasterGetPreviousPlug 20 +#define audioMasterGetNextPlug 21 +#define audioMasterWillReplaceOrAccumulate 22 +#define audioMasterGetCurrentProcessLevel 23 +#define audioMasterGetAutomationState 24 +#define audioMasterOfflineStart 25 +#define audioMasterOfflineRead 26 +#define audioMasterOfflineWrite 27 +#define audioMasterOfflineGetCurrentPass 28 +#define audioMasterOfflineGetCurrentMetaPass 29 +#define audioMasterSetOutputSampleRate 30 // unsupported? 31 -const int audioMasterGetSpeakerArrangement = 31; // deprecated in 2.4? -const int audioMasterGetVendorString = 32; -const int audioMasterGetProductString = 33; -const int audioMasterGetVendorVersion = 34; -const int audioMasterVendorSpecific = 35; -const int audioMasterSetIcon = 36; -const int audioMasterCanDo = 37; -const int audioMasterGetLanguage = 38; -const int audioMasterOpenWindow = 39; -const int audioMasterCloseWindow = 40; -const int audioMasterGetDirectory = 41; -const int audioMasterUpdateDisplay = 42; -const int audioMasterBeginEdit = 43; -const int audioMasterEndEdit = 44; -const int audioMasterOpenFileSelector = 45; -const int audioMasterCloseFileSelector = 46; // currently unused -const int audioMasterEditFile = 47; // currently unused -const int audioMasterGetChunkFile = 48; // currently unused -const int audioMasterGetInputSpeakerArrangement = 49; // currently unused - -const int effFlagsHasEditor = 1; -const int effFlagsCanReplacing = 1 << 4; // very likely -const int effFlagsIsSynth = 1 << 8; // currently unused - -const int effOpen = 0; -const int effClose = 1; // currently unused -const int effSetProgram = 2; // currently unused -const int effGetProgram = 3; // currently unused -const int effGetProgramName = 5; // currently unused -const int effGetParamName = 8; // currently unused -const int effSetSampleRate = 10; -const int effSetBlockSize = 11; -const int effMainsChanged = 12; -const int effEditGetRect = 13; -const int effEditOpen = 14; -const int effEditClose = 15; -const int effEditIdle = 19; -const int effEditTop = 20; -const int effProcessEvents = 25; -const int effGetEffectName = 45; -const int effGetParameterProperties = 47; // missing -const int effGetVendorString = 47; -const int effGetProductString = 48; -const int effGetVendorVersion = 49; -const int effCanDo = 51; // currently unused -const int effGetVstVersion = 58; // currently unused - -const int kEffectMagic = CCONST( 'V', 's', 't', 'P' ); -const int kVstLangEnglish = 1; -const int kVstMidiType = 1; -const int kVstParameterUsesFloatStep = 1 << 2; -const int kVstTempoValid = 1 << 10; -const int kVstTransportPlaying = 1 << 1; - - -class RemoteVstPlugin; - - -class VstMidiEvent +#define audioMasterGetSpeakerArrangement 31 // deprecated in 2.4? +#define audioMasterGetVendorString 32 +#define audioMasterGetProductString 33 +#define audioMasterGetVendorVersion 34 +#define audioMasterVendorSpecific 35 +#define audioMasterSetIcon 36 +#define audioMasterCanDo 37 +#define audioMasterGetLanguage 38 +#define audioMasterOpenWindow 39 +#define audioMasterCloseWindow 40 +#define audioMasterGetDirectory 41 +#define audioMasterUpdateDisplay 42 +#define audioMasterBeginEdit 43 +#define audioMasterEndEdit 44 +#define audioMasterOpenFileSelector 45 +#define audioMasterCloseFileSelector 46 // currently unused +#define audioMasterEditFile 47 // currently unused +#define audioMasterGetChunkFile 48 // currently unused +#define audioMasterGetInputSpeakerArrangement 49 // currently unused + +#define effFlagsHasEditor 1 +#define effFlagsCanReplacing (1 << 4) // very likely +#define effFlagsIsSynth (1 << 8) // currently unused + +#define effOpen 0 +#define effClose 1 // currently unused +#define effSetProgram 2 // currently unused +#define effGetProgram 3 // currently unused +#define effGetProgramName 5 // currently unused +#define effGetParamName 8 // currently unused +#define effSetSampleRate 10 +#define effSetBlockSize 11 +#define effMainsChanged 12 +#define effEditGetRect 13 +#define effEditOpen 14 +#define effEditClose 15 +#define effEditIdle 19 +#define effEditTop 20 +#define effProcessEvents 25 +#define effGetEffectName 45 +#define effGetParameterProperties 47 // missing +#define effGetVendorString 47 +#define effGetProductString 48 +#define effGetVendorVersion 49 +#define effCanDo 51 // currently unused +#define effGetVstVersion 58 // currently unused + +#define kEffectMagic (CCONST( 'V', 's', 't', 'P' )) +#define kVstLangEnglish 1 +#define kVstMidiType 1 +#define kVstParameterUsesFloatStep (1 << 2) +#define kVstTempoValid (1 << 10) +#define kVstTransportPlaying (1 << 1) + + +struct RemoteVstPlugin; + +#define kVstNanosValid (1 << 8) +#define kVstPpqPosValid (1 << 9) +#define kVstTempoValid (1 << 10) +#define kVstBarsValid (1 << 11) +#define kVstCyclePosValid (1 << 12) +#define kVstTimeSigValid (1 << 13) +#define kVstSmpteValid (1 << 14) +#define kVstClockValid (1 << 15) + +struct _VstMidiEvent { -public: // 00 int type; // 04 @@ -145,40 +152,34 @@ public: char reserved1; // 1f? char reserved2; +}; -} ; - - +typedef struct _VstMidiEvent VstMidiEvent; -class VstEvent +struct _VstEvent { - char dump[sizeof( VstMidiEvent )]; + char dump[sizeof (VstMidiEvent)]; -} ; +}; +typedef struct _VstEvent VstEvent; - - -class VstEvents +struct _VstEvents { -public: // 00 int numEvents; // 04 void *reserved; // 08 VstEvent * events[]; +}; -} ; - - - +typedef struct _VstEvents VstEvents; // Not finished, neither really used -class VstParameterProperties +struct _VstParameterProperties { -public: float stepFloat; char label[64]; int flags; @@ -189,26 +190,23 @@ public: int category; char categoryLabel[24]; char empty[128]; +}; -} ; - +typedef struct _VstParameterProperties VstParameterProperties; - - -class AEffect +struct _AEffect { -public: // Never use virtual functions!!! // 00-03 int magic; // dispatcher 04-07 - intptr_t (* dispatcher)( AEffect * , int , int , intptr_t, void * , float ); + intptr_t (* dispatcher) (struct _AEffect *, int, int, intptr_t, void *, float); // process, quite sure 08-0b - void (* process)( AEffect * , float * * , float * * , int ); + void (* process) (struct _AEffect *, float **, float **, int); // setParameter 0c-0f - void (* setParameter)( AEffect * , int , float ); + void (* setParameter) (struct _AEffect *, int, float); // getParameter 10-13 - float (* getParameter)( AEffect * , int ); + float (* getParameter) (struct _AEffect *, int); // programs 14-17 int numPrograms; // Params 18-1b @@ -235,16 +233,13 @@ public: // Don't know 4c-4f char unknown1[4]; // processReplacing 50-53 - void (* processReplacing)( AEffect * , float * * , float * * , int ); - -} ; + void (* processReplacing) (struct _AEffect *, float **, float **, int); +}; +typedef struct _AEffect AEffect; - - -class VstTimeInfo +struct _VstTimeInfo { -public: // 00 double samplePos; // 08 @@ -263,12 +258,10 @@ public: char empty3[4 + 4 + 4]; // 54 int flags; +}; -} ; - - - -typedef intptr_t (* audioMasterCallback)( AEffect * , int32_t, int32_t, intptr_t, void * , float ); +typedef struct _VstTimeInfo VstTimeInfo; +typedef intptr_t (* audioMasterCallback) (AEffect *, int32_t, int32_t, intptr_t, void *, float); #endif diff --git a/libs/ardour/ardour/vstfx.h b/libs/ardour/ardour/vstfx.h index 33cac1d1ca..7ddc5c39ec 100755 --- a/libs/ardour/ardour/vstfx.h +++ b/libs/ardour/ardour/vstfx.h @@ -51,7 +51,7 @@ struct _VSTFXInfo /*The AEffect which contains the info about a plugin instance*/ -typedef struct AEffect * (*main_entry_t)(audioMasterCallback); +typedef AEffect * (*main_entry_t) (audioMasterCallback); /*A handle used to identify a plugin to vstfx*/ @@ -73,7 +73,7 @@ struct _VSTFXHandle struct _VSTFX { - struct AEffect* plugin; + AEffect* plugin; int window; /* The plugin's parent X11 XWindow */ int plugin_ui_window; /*The ID of the plugin UI window created by the plugin*/ int xid; /* X11 XWindow */ diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h index 5e6d906184..e4b23fc46e 100644 --- a/libs/ardour/ardour/windows_vst_plugin.h +++ b/libs/ardour/ardour/windows_vst_plugin.h @@ -31,10 +31,11 @@ #include "ardour/plugin.h" struct _FSTHandle; -struct _FST; typedef struct _FSTHandle FSTHandle; +struct _FST; typedef struct _FST FST; -class AEffect; +struct _AEffect; +typedef struct _AEffect AEffect; namespace ARDOUR { class AudioEngine; diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc index b57047dfee..4fc335a080 100644 --- a/libs/ardour/buffer_set.cc +++ b/libs/ardour/buffer_set.cc @@ -37,11 +37,7 @@ #include "ardour/lv2_plugin.h" #include "ardour/lv2_event_buffer.h" #endif -#ifdef WINDOWS_VST_SUPPORT -#include "vestige/aeffectx.h" -#endif - -#ifdef LXVST_SUPPORT +#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT #include "ardour/vestige/aeffectx.h" #endif diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index 3e3a6d36d2..f5d6c7c10a 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -21,11 +21,11 @@ #include <cstdio> #include <fst.h> -#include <fst/vestige/aeffectx.h> #include "ardour/session.h" #include "ardour/tempo.h" #include "ardour/windows_vst_plugin.h" +#include "ardour/vestige/aeffectx.h" #include "i18n.h" diff --git a/libs/ardour/vstfxinfofile.cc b/libs/ardour/vstfxinfofile.cc index f98361fa18..9c613c654f 100755 --- a/libs/ardour/vstfxinfofile.cc +++ b/libs/ardour/vstfxinfofile.cc @@ -257,7 +257,7 @@ static FILE* vstfx_infofile_for_write (char* dllpath) static int vstfx_can_midi(VSTFX *vstfx) { - struct AEffect *plugin = vstfx->plugin; + AEffect *plugin = vstfx->plugin; int vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, 0, 0.0f); @@ -276,7 +276,7 @@ static VSTFXInfo* vstfx_info_from_plugin(VSTFX *vstfx) VSTFXInfo* info = (VSTFXInfo*) malloc(sizeof(VSTFXInfo)); - struct AEffect *plugin; + AEffect *plugin; int i; /*We need to init the creator because some plugins @@ -346,7 +346,8 @@ static VSTFXInfo* vstfx_info_from_plugin(VSTFX *vstfx) /* A simple 'dummy' audiomaster callback which should be ok, we will only be instantiating the plugin in order to get its info*/ -static intptr_t simple_master_callback(struct AEffect *, int32_t opcode, int32_t, intptr_t, void *, float) +static intptr_t +simple_master_callback (AEffect *, int32_t opcode, int32_t, intptr_t, void *, float) { if (opcode == audioMasterVersion) return 2; diff --git a/libs/ardour/windows_vst_plugin.cc b/libs/ardour/windows_vst_plugin.cc index 8e94fd6b3a..73aa839ac6 100644 --- a/libs/ardour/windows_vst_plugin.cc +++ b/libs/ardour/windows_vst_plugin.cc @@ -619,7 +619,7 @@ WindowsVSTPlugin::unique_id() const { char buf[32]; - snprintf (buf, sizeof (buf), "%d", *((int32_t*) &_plugin->unused_id)); + snprintf (buf, sizeof (buf), "%d", *((int32_t*) &_plugin->uniqueID)); return string (buf); } |