refactor(fmod): move all original files into fmod directory
This commit is contained in:
parent
50fb3c6b1c
commit
35569faecc
544 changed files with 0 additions and 0 deletions
197
fmod/lib/vst/AEffect.h
Executable file
197
fmod/lib/vst/AEffect.h
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
//-------------------------------------------------------------------------------------------------------
|
||||
// VST Plug-Ins SDK
|
||||
// Version 1.0
|
||||
// © 2003, Steinberg Media Technologies, All Rights Reserved
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __AEffect__
|
||||
#define __AEffect__
|
||||
|
||||
/* to create an Audio Effect for power pc's, create a
|
||||
code resource
|
||||
file type: 'aPcs'
|
||||
resource type: 'aEff'
|
||||
ppc header: none (raw pef)
|
||||
|
||||
for windows, it's a .dll
|
||||
|
||||
the only symbol searched for is:
|
||||
AEffect *main(float (*audioMaster)(AEffect *effect, long opcode, long index,
|
||||
long value, void *ptr, float opt));
|
||||
*/
|
||||
|
||||
#if CARBON
|
||||
#if PRAGMA_STRUCT_ALIGN || __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
#else
|
||||
#if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
#endif
|
||||
#if defined __BORLANDC__
|
||||
#pragma -a8
|
||||
#elif defined(WIN32) || defined(__FLAT__) || defined CBUILDER
|
||||
#pragma pack(push)
|
||||
#pragma pack(8)
|
||||
#define VSTCALLBACK __cdecl
|
||||
#else
|
||||
#define VSTCALLBACK
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// Misc. Definition
|
||||
//-------------------------------------------------
|
||||
|
||||
typedef struct AEffect AEffect;
|
||||
typedef long (VSTCALLBACK *audioMasterCallback)(AEffect *effect, long opcode, long index,
|
||||
long value, void *ptr, float opt);
|
||||
|
||||
// prototype for plug-in main
|
||||
// AEffect *main(audioMasterCallback audioMaster);
|
||||
|
||||
// Four Character Constant
|
||||
#define CCONST(a, b, c, d) \
|
||||
((((long)a) << 24) | (((long)b) << 16) | (((long)c) << 8) | (((long)d) << 0))
|
||||
|
||||
// Magic Number
|
||||
#define kEffectMagic CCONST ('V', 's', 't', 'P')
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// AEffect Structure
|
||||
//-------------------------------------------------
|
||||
struct AEffect
|
||||
{
|
||||
long magic; // must be kEffectMagic ('VstP')
|
||||
|
||||
long (VSTCALLBACK *dispatcher)(AEffect *effect, long opCode, long index, long value,
|
||||
void *ptr, float opt);
|
||||
|
||||
void (VSTCALLBACK *process)(AEffect *effect, float **inputs, float **outputs, long sampleframes);
|
||||
|
||||
void (VSTCALLBACK *setParameter)(AEffect *effect, long index, float parameter);
|
||||
float (VSTCALLBACK *getParameter)(AEffect *effect, long index);
|
||||
|
||||
long numPrograms; // number of Programs
|
||||
long numParams; // all programs are assumed to have numParams parameters
|
||||
long numInputs; // number of Audio Inputs
|
||||
long numOutputs; // number of Audio Outputs
|
||||
|
||||
long flags; // see constants (Flags Bits)
|
||||
|
||||
long resvd1; // reserved for Host, must be 0 (Dont use it)
|
||||
long resvd2; // reserved for Host, must be 0 (Dont use it)
|
||||
|
||||
long initialDelay; // for algorithms which need input in the first place
|
||||
|
||||
long realQualities; // number of realtime qualities (0: realtime)
|
||||
long offQualities; // number of offline qualities (0: realtime only)
|
||||
float ioRatio; // input samplerate to output samplerate ratio, not used yet
|
||||
|
||||
void *object; // for class access (see AudioEffect.hpp), MUST be 0 else!
|
||||
void *user; // user access
|
||||
|
||||
long uniqueID; // pls choose 4 character as unique as possible. (register it at Steinberg Web)
|
||||
// this is used to identify an effect for save+load
|
||||
long version; // (example 1100 for version 1.1.0.0)
|
||||
|
||||
void (VSTCALLBACK *processReplacing)(AEffect *effect, float **inputs, float **outputs, long sampleframes);
|
||||
|
||||
char future[60]; // pls zero
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Flags Bits
|
||||
//-------------------------------------------------
|
||||
|
||||
#define effFlagsHasEditor 1 // if set, is expected to react to editor messages
|
||||
#define effFlagsHasClip 2 // return > 1. in getVu() if clipped
|
||||
#define effFlagsHasVu 4 // return vu value in getVu(); > 1. means clipped
|
||||
#define effFlagsCanMono 8 // if numInputs == 2, makes sense to be used for mono in
|
||||
#define effFlagsCanReplacing 16 // supports in place output (processReplacing() exsists)
|
||||
#define effFlagsProgramChunks 32 // program data are handled in formatless chunks
|
||||
|
||||
//-------------------------------------------------
|
||||
// Dispatcher OpCodes
|
||||
//-------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
effOpen = 0, // initialise
|
||||
effClose, // exit, release all memory and other resources!
|
||||
|
||||
effSetProgram, // program no in <value>
|
||||
effGetProgram, // return current program no.
|
||||
effSetProgramName, // user changed program name (max 24 char + 0) to as passed in string
|
||||
effGetProgramName, // stuff program name (max 24 char + 0) into string
|
||||
|
||||
effGetParamLabel, // stuff parameter <index> label (max 8 char + 0) into string
|
||||
// (examples: sec, dB, type)
|
||||
effGetParamDisplay, // stuff parameter <index> textual representation into string
|
||||
// (examples: 0.5, -3, PLATE)
|
||||
effGetParamName, // stuff parameter <index> label (max 8 char + 0) into string
|
||||
// (examples: Time, Gain, RoomType)
|
||||
effGetVu, // called if (flags & (effFlagsHasClip | effFlagsHasVu))
|
||||
|
||||
// system
|
||||
effSetSampleRate, // in opt (float value in Hz; for example 44100.0Hz)
|
||||
effSetBlockSize, // in value (this is the maximun size of an audio block,
|
||||
// pls check sampleframes in process call)
|
||||
effMainsChanged, // the user has switched the 'power on' button to
|
||||
// value (0 off, else on). This only switches audio
|
||||
// processing; you should flush delay buffers etc.
|
||||
|
||||
// editor
|
||||
effEditGetRect, // stuff rect (top, left, bottom, right) into ptr
|
||||
effEditOpen, // system dependant Window pointer in ptr
|
||||
effEditClose, // no arguments
|
||||
effEditDraw, // draw method, ptr points to rect (MAC Only)
|
||||
effEditMouse, // index: x, value: y (MAC Only)
|
||||
effEditKey, // system keycode in value
|
||||
effEditIdle, // no arguments. Be gentle!
|
||||
effEditTop, // window has topped, no arguments
|
||||
effEditSleep, // window goes to background
|
||||
|
||||
effIdentify, // returns 'NvEf'
|
||||
effGetChunk, // host requests pointer to chunk into (void**)ptr, byteSize returned
|
||||
effSetChunk, // plug-in receives saved chunk, byteSize passed
|
||||
|
||||
effNumOpcodes
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// AudioMaster OpCodes
|
||||
//-------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
audioMasterAutomate = 0, // index, value, returns 0
|
||||
audioMasterVersion, // VST Version supported (for example 2200 for VST 2.2)
|
||||
audioMasterCurrentId, // Returns the unique id of a plug that's currently
|
||||
// loading
|
||||
audioMasterIdle, // Call application idle routine (this will
|
||||
// call effEditIdle for all open editors too)
|
||||
audioMasterPinConnected // Inquire if an input or output is beeing connected;
|
||||
// index enumerates input or output counting from zero,
|
||||
// value is 0 for input and != 0 otherwise. note: the
|
||||
// return value is 0 for <true> such that older versions
|
||||
// will always return true.
|
||||
};
|
||||
|
||||
#if CARBON
|
||||
#if PRAGMA_STRUCT_ALIGN || __MWERKS__
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
#else
|
||||
#if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
|
||||
#pragma options align=reset
|
||||
#elif defined(WIN32) || defined(__FLAT__)
|
||||
#pragma pack(pop)
|
||||
#elif defined __BORLANDC__
|
||||
#pragma -a-
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // __AEffect__
|
||||
131
fmod/lib/vst/AudioEffect.hpp
Executable file
131
fmod/lib/vst/AudioEffect.hpp
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
//-------------------------------------------------------------------------------------------------------
|
||||
// VST Plug-Ins SDK
|
||||
// Version 1.0
|
||||
// © 2003, Steinberg Media Technologies, All Rights Reserved
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __AudioEffect__
|
||||
#define __AudioEffect__
|
||||
|
||||
#ifndef __AEffect__
|
||||
#include "AEffect.h" // "c" interface
|
||||
#endif
|
||||
|
||||
class AEffEditor;
|
||||
class AudioEffect;
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Needs to be defined by the audio effect and is
|
||||
// called to create the audio effect object instance.
|
||||
AudioEffect* createEffectInstance (audioMasterCallback audioMaster);
|
||||
|
||||
long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
|
||||
float getParameterClass (long index);
|
||||
void setParameterClass (long index, float value);
|
||||
void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
|
||||
void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
class AudioEffect
|
||||
{
|
||||
friend class AEffEditor;
|
||||
friend long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
|
||||
friend float getParameterClass (AEffect *e, long index);
|
||||
friend void setParameterClass (AEffect *e, long index, float value);
|
||||
friend void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
|
||||
friend void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
|
||||
|
||||
public:
|
||||
AudioEffect (audioMasterCallback audioMaster, long numPrograms, long numParams);
|
||||
virtual ~AudioEffect ();
|
||||
|
||||
virtual void setParameter (long index, float value) { index = index; value = value; }
|
||||
virtual float getParameter (long index) { index = index; return 0; }
|
||||
virtual void setParameterAutomated (long index, float value);
|
||||
|
||||
AEffect *getAeffect () { return &cEffect; } // Returns the AEffect Structure
|
||||
|
||||
void setEditor (AEffEditor *editor)
|
||||
{ this->editor = editor;
|
||||
if (editor) cEffect.flags |= effFlagsHasEditor;
|
||||
else cEffect.flags &= ~effFlagsHasEditor; } // Should be called if you want to define your own editor
|
||||
|
||||
//---Called from audio master (Host -> Plug)---------------
|
||||
virtual void process (float **inputs, float **outputs, long sampleFrames) = 0;
|
||||
virtual void processReplacing (float **inputs, float **outputs, long sampleFrames)
|
||||
{ inputs = inputs; outputs = outputs; sampleFrames = sampleFrames; }
|
||||
|
||||
virtual long dispatcher (long opCode, long index, long value, void *ptr, float opt); // Opcodes dispatcher
|
||||
|
||||
virtual void open () {} // Called when Plugin is initialized
|
||||
virtual void close () {} // Called when Plugin will be released
|
||||
|
||||
//---Program----------------------------
|
||||
virtual long getProgram () { return curProgram; }
|
||||
virtual void setProgram (long program) { curProgram = program; }// Don't forget to set curProgram
|
||||
virtual void setProgramName (char *name) { *name = 0; } // All following refer to curProgram
|
||||
virtual void getProgramName (char *name) { *name = 0; }
|
||||
|
||||
virtual void getParameterLabel (long index, char *label) { index = index; *label = 0; } // example: "dB"
|
||||
virtual void getParameterDisplay (long index, char *text) { index = index; *text = 0; } // example: "6.01"
|
||||
virtual void getParameterName (long index, char *text) { index = index; *text = 0; } // example: "Volume"
|
||||
|
||||
virtual float getVu () { return 0; }
|
||||
|
||||
virtual long getChunk (void** data, bool isPreset = false) { return 0; } // Returns the Size in bytes of the chunk (Plugin allocates the data array)
|
||||
virtual long setChunk (void* data, long byteSize, bool isPreset = false) { return 0; }
|
||||
|
||||
virtual void setSampleRate (float sampleRate) { this->sampleRate = sampleRate; }
|
||||
virtual void setBlockSize (long blockSize) { this->blockSize = blockSize; }
|
||||
|
||||
virtual void suspend () {} // Called when Plugin is switched to Off
|
||||
virtual void resume () {} // Called when Plugin is switched to On
|
||||
|
||||
//---Setup---------------------------
|
||||
virtual void setUniqueID (long iD) { cEffect.uniqueID = iD; } // must call this!
|
||||
virtual void setNumInputs (long inputs) { cEffect.numInputs = inputs; }
|
||||
virtual void setNumOutputs (long outputs) { cEffect.numOutputs = outputs; }
|
||||
|
||||
virtual void hasVu (bool state = true);
|
||||
virtual void hasClip (bool state = true);
|
||||
virtual void canMono (bool state = true);
|
||||
virtual void canProcessReplacing (bool state = true); // Tells that the processReplacing () could be used
|
||||
virtual void programsAreChunks (bool state = true);
|
||||
virtual void setRealtimeQualities (long qualities);
|
||||
virtual void setOfflineQualities (long qualities);
|
||||
virtual void setInitialDelay (long delay); // Uses to report the Plugin's latency (Group Delay)
|
||||
|
||||
//---Inquiry-------------------------
|
||||
virtual float getSampleRate () { return sampleRate; }
|
||||
virtual long getBlockSize () { return blockSize; }
|
||||
|
||||
//---Host communication--------------
|
||||
virtual long getMasterVersion ();
|
||||
virtual long getCurrentUniqueId ();
|
||||
virtual void masterIdle ();
|
||||
virtual bool isInputConnected (long input);
|
||||
virtual bool isOutputConnected (long output);
|
||||
|
||||
//---Tools---------------------------
|
||||
virtual void dB2string (float value, char *text);
|
||||
virtual void Hz2string (float samples, char *text);
|
||||
virtual void ms2string (float samples, char *text);
|
||||
virtual void float2string (float value, char *string);
|
||||
virtual void long2string (long value, char *text);
|
||||
|
||||
protected:
|
||||
//---Members-------------------------
|
||||
float sampleRate;
|
||||
AEffEditor *editor;
|
||||
audioMasterCallback audioMaster;
|
||||
long numPrograms;
|
||||
long numParams;
|
||||
long curProgram;
|
||||
long blockSize;
|
||||
AEffect cEffect;
|
||||
};
|
||||
|
||||
#endif // __AudioEffect__
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
1004
fmod/lib/vst/aeffectx.h
Executable file
1004
fmod/lib/vst/aeffectx.h
Executable file
File diff suppressed because it is too large
Load diff
295
fmod/lib/vst/audioeffectx.h
Executable file
295
fmod/lib/vst/audioeffectx.h
Executable file
|
|
@ -0,0 +1,295 @@
|
|||
//-------------------------------------------------------------------------------------------------------
|
||||
// VST Plug-Ins SDK
|
||||
// Version 2.3 Extension
|
||||
// © 2003, Steinberg Media Technologies, All Rights Reserved
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef __audioeffectx__
|
||||
#define __audioeffectx__
|
||||
|
||||
#ifndef __AudioEffect__
|
||||
#include "AudioEffect.hpp" // Version 1.0 base class AudioEffect
|
||||
#endif
|
||||
|
||||
#ifndef __aeffectx__
|
||||
#include "aeffectx.h" // Version 2.0 'C' extensions and structures
|
||||
#endif
|
||||
|
||||
#define VST_2_1_EXTENSIONS 1 // Version 2.1 extensions
|
||||
#define VST_2_2_EXTENSIONS 1 // Version 2.2 extensions
|
||||
#define VST_2_3_EXTENSIONS 1 // Version 2.3 extensions
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// AudioEffectX extends AudioEffect with new features. So you should derive
|
||||
// your Plugin from AudioEffectX
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
class AudioEffectX : public AudioEffect
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
AudioEffectX (audioMasterCallback audioMaster, long numPrograms, long numParams);
|
||||
|
||||
// Destructor
|
||||
virtual ~AudioEffectX ();
|
||||
|
||||
// Dispatcher
|
||||
virtual long dispatcher (long opCode, long index, long value, void *ptr, float opt);
|
||||
|
||||
virtual AEffEditor* getEditor () { return editor; } // Returns the attached editor
|
||||
|
||||
// 'Plug -> Host' are methods which go from Plugin to Host, and are usually not overridden
|
||||
// 'Host -> Plug' are methods which you may override to implement the according functionality (to Host)
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Events + Time
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual void wantEvents (long filter = 1); // Filter is currently ignored, midi channel data only (default)
|
||||
virtual VstTimeInfo* getTimeInfo (long filter); // Returns const VstTimeInfo* (or 0 if not supported)
|
||||
// filter should contain a mask indicating which fields are requested
|
||||
// (see valid masks in aeffectx.h), as some items may require extensive conversions
|
||||
virtual long tempoAt (long pos); // Returns tempo (in bpm * 10000) at sample frame location <pos>
|
||||
bool sendVstEventsToHost (VstEvents* events); // Returns true when success
|
||||
|
||||
// Host -> Plug
|
||||
virtual long processEvents (VstEvents* events) { return 0; }// 0 means 'wants no more'...else returns 1!
|
||||
// VstEvents and VstMidiEvents are declared in aeffectx.h
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Parameters and Programs
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual long getNumAutomatableParameters (); // Returns the number of automatable Parameters (should be <= than numParams)
|
||||
virtual long getParameterQuantization (); // Returns the integer value for +1.0 representation,
|
||||
// or 1 if full single float precision is maintained
|
||||
// in automation. parameter index in <value> (-1: all, any)
|
||||
// Host -> Plug
|
||||
virtual bool canParameterBeAutomated (long index) { return true; }
|
||||
virtual bool string2parameter (long index, char* text) { return false; } // Note: implies setParameter. text==0 is to be
|
||||
// expected to check the capability (returns true).
|
||||
virtual float getChannelParameter (long channel, long index) { return 0.f; }
|
||||
virtual long getNumCategories () { return 1L; }
|
||||
virtual bool getProgramNameIndexed (long category, long index, char* text) { return false; }
|
||||
virtual bool copyProgram (long destination) { return false; }
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Connections, Configuration
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual bool ioChanged (); // Tell Host numInputs and/or numOutputs and/or initialDelay and/or numParameters has changed
|
||||
virtual bool needIdle (); // Plugin needs idle calls (outside its editor window), will call fxIdle ()
|
||||
virtual bool sizeWindow (long width, long height);
|
||||
|
||||
virtual double updateSampleRate (); // Returns sample rate from Host (may issue setSampleRate() )
|
||||
virtual long updateBlockSize (); // Same for block size
|
||||
virtual long getInputLatency (); // Returns input Latency
|
||||
virtual long getOutputLatency (); // Returns output Latency
|
||||
virtual AEffect* getPreviousPlug (long input); // Input can be -1 in which case the first found is returned
|
||||
virtual AEffect* getNextPlug (long output); // Output can be -1 in which case the first found is returned
|
||||
|
||||
// Host -> Plug
|
||||
virtual void inputConnected (long index, bool state) {} // Input at <index> has been (dis-)connected,
|
||||
virtual void outputConnected (long index, bool state) {} // Same as input; state == true: connected
|
||||
virtual bool getInputProperties (long index, VstPinProperties* properties) { return false; }
|
||||
virtual bool getOutputProperties (long index, VstPinProperties* properties) { return false; }
|
||||
|
||||
virtual VstPlugCategory getPlugCategory ()
|
||||
{ if (cEffect.flags & effFlagsIsSynth) return kPlugCategSynth; return kPlugCategUnknown; } // See aeffects.h for Category
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Realtime
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual long willProcessReplacing (); // Returns 0: not implemented, 1: replacing, 2: accumulating
|
||||
virtual long getCurrentProcessLevel (); // Returns 0: not supported,
|
||||
// 1: currently in user thread (gui)
|
||||
// 2: currently in audio thread or irq (where process is called)
|
||||
// 3: currently in 'sequencer' thread or irq (midi, timer etc)
|
||||
// 4: currently offline processing and thus in user thread
|
||||
// other: not defined, but probably pre-empting user thread.
|
||||
virtual long getAutomationState (); // Returns 0: not supported, 1: off, 2:read, 3:write, 4:read/write
|
||||
virtual void wantAsyncOperation (bool state = true); // Notify Host that we want to operate asynchronously.
|
||||
// process () will return immediately; Host will poll getCurrentPosition
|
||||
// to see if data are available in time.
|
||||
virtual void hasExternalBuffer (bool state = true); // For external DSP, may have their own output buffer (32 bit float)
|
||||
// Host then requests this via effGetDestinationBuffer
|
||||
|
||||
// Host -> Plug
|
||||
virtual long reportCurrentPosition () { return 0; } // For external DSP, see wantAsyncOperation ()
|
||||
virtual float* reportDestinationBuffer () { return 0; } // For external DSP (dma option)
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Offline
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual bool offlineRead (VstOfflineTask* offline, VstOfflineOption option, bool readSource = true);
|
||||
virtual bool offlineWrite (VstOfflineTask* offline, VstOfflineOption option);
|
||||
virtual bool offlineStart (VstAudioFile* ptr, long numAudioFiles, long numNewAudioFiles);
|
||||
virtual long offlineGetCurrentPass ();
|
||||
virtual long offlineGetCurrentMetaPass ();
|
||||
|
||||
// Host -> Plug
|
||||
virtual bool offlineNotify (VstAudioFile* ptr, long numAudioFiles, bool start) { return false; }
|
||||
virtual bool offlinePrepare (VstOfflineTask* offline, long count) { return false; }
|
||||
virtual bool offlineRun (VstOfflineTask* offline, long count) { return false; }
|
||||
|
||||
virtual long offlineGetNumPasses () { return 0; }
|
||||
virtual long offlineGetNumMetaPasses () { return 0; }
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Other
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Plug -> Host
|
||||
virtual void setOutputSamplerate (float samplerate);
|
||||
virtual VstSpeakerArrangement* getInputSpeakerArrangement ();
|
||||
virtual VstSpeakerArrangement* getOutputSpeakerArrangement ();
|
||||
|
||||
virtual bool getHostVendorString (char* text); // Fills <text> with a string identifying the vendor (max 64 char)
|
||||
virtual bool getHostProductString (char* text); // Fills <text> with a string with product name (max 64 char)
|
||||
virtual long getHostVendorVersion (); // Returns vendor-specific version
|
||||
virtual long hostVendorSpecific (long lArg1, long lArg2, void* ptrArg, float floatArg); // No specific definition
|
||||
virtual long canHostDo (char* text); // See 'hostCanDos' in audioeffectx.cpp
|
||||
// returns 0: don't know (default), 1: yes, -1: no
|
||||
|
||||
virtual void isSynth (bool state = true); // Will call wantEvents if true
|
||||
virtual void noTail (bool state = true); // true: tells Host we produce no output when silence comes in
|
||||
// enables Host to omit process() when no data are present on any one input.
|
||||
|
||||
virtual long getHostLanguage (); // Returns VstHostLanguage (see aeffectx.h)
|
||||
virtual void* openWindow (VstWindow*); // Create new window
|
||||
virtual bool closeWindow (VstWindow*); // Close a newly created window
|
||||
virtual void* getDirectory (); // Get the Plugin's directory, FSSpec on MAC, else char*
|
||||
virtual bool updateDisplay (); // Something has changed, update display like program list, parameter list
|
||||
// returns true if supported
|
||||
|
||||
// Host -> Plug
|
||||
virtual bool processVariableIo (VstVariableIo* varIo) { return false; } // If called with varIo == NULL, returning true indicates that this call is supported by the Plugin
|
||||
virtual bool setSpeakerArrangement (VstSpeakerArrangement* pluginInput, VstSpeakerArrangement* pluginOutput) { return false; }
|
||||
virtual bool getSpeakerArrangement (VstSpeakerArrangement** pluginInput, VstSpeakerArrangement** pluginOutput) { *pluginInput = 0; *pluginOutput = 0; return false; }
|
||||
virtual void setBlockSizeAndSampleRate (long blockSize, float sampleRate)
|
||||
{ this->blockSize = blockSize; this->sampleRate = sampleRate; }
|
||||
virtual bool setBypass (bool onOff) { return false; } // For 'soft-bypass; process () still called
|
||||
|
||||
virtual bool getEffectName (char* name) { return false; } // Name max 32 char
|
||||
virtual bool getErrorText (char* text) { return false; } // Text max 256 char
|
||||
virtual bool getVendorString (char* text) { return false; } // Fill text with a string identifying the vendor (max 64 char)
|
||||
virtual bool getProductString (char* text) { return false; }// Fill text with a string identifying the product name (max 64 char) // fills <ptr> with a string with product name (max 64 char)
|
||||
virtual long getVendorVersion () { return 0; } // Return vendor-specific version
|
||||
virtual long vendorSpecific (long lArg, long lArg2, void* ptrArg, float floatArg) { return 0; }
|
||||
// No definition, vendor specific handling
|
||||
virtual long canDo (char* text) { return 0; } // See 'plugCanDos' in audioeffectx.cpp
|
||||
// returns 0: don't know (default), 1: yes, -1: no
|
||||
virtual void* getIcon () { return 0; } // Not yet defined
|
||||
virtual bool setViewPosition (long x, long y) { return false; }
|
||||
virtual long getGetTailSize () { return 0; }
|
||||
virtual long fxIdle () { return 0; } // Called when NeedIdle () was called
|
||||
virtual bool getParameterProperties (long index, VstParameterProperties* p) { return false; }
|
||||
virtual bool keysRequired () { return false; } // Version 1 Plugins will return true
|
||||
|
||||
#if VST_2_3_EXTENSIONS
|
||||
virtual long getVstVersion () { return 2300; } // Returns the current VST Version
|
||||
#elif VST_2_2_EXTENSIONS
|
||||
virtual long getVstVersion () { return 2200; }
|
||||
#elif VST_2_1_EXTENSIONS
|
||||
virtual long getVstVersion () { return 2100; }
|
||||
#else
|
||||
virtual long getVstVersion () { return 2; }
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------
|
||||
#if VST_2_1_EXTENSIONS
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
// Midi Program Names, are always defined per channel, valid channels are 0 - 15
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Host -> Plug
|
||||
virtual long getMidiProgramName (long channel, MidiProgramName* midiProgramName) { return 0; }
|
||||
// Struct will be filled with information for 'thisProgramIndex'.
|
||||
// returns number of used programIndexes.
|
||||
// If 0 is returned, no MidiProgramNames supported.
|
||||
virtual long getCurrentMidiProgram (long channel, MidiProgramName* currentProgram) { return -1; }
|
||||
// Struct will be filled with information for the current program.
|
||||
// Returns the programIndex of the current program. -1 means not supported.
|
||||
virtual long getMidiProgramCategory (long channel, MidiProgramCategory* category) { return 0; }
|
||||
// Struct will be filled with information for 'thisCategoryIndex'.
|
||||
// returns number of used categoryIndexes.
|
||||
// if 0 is returned, no MidiProgramCategories supported/used.
|
||||
virtual bool hasMidiProgramsChanged (long channel) { return false; }
|
||||
// Returns true if the MidiProgramNames, MidiKeyNames or
|
||||
// MidiControllerNames had changed on this channel.
|
||||
virtual bool getMidiKeyName (long channel, MidiKeyName* keyName) { return false; }
|
||||
// Struct will be filled with information for 'thisProgramIndex' and 'thisKeyNumber'
|
||||
// if keyName is "" the standard name of the key will be displayed.
|
||||
// if false is returned, no MidiKeyNames defined for 'thisProgramIndex'.
|
||||
|
||||
virtual bool beginSetProgram () { return false; } // Called before a program is loaded
|
||||
virtual bool endSetProgram () { return false; } // Called after...
|
||||
|
||||
// Plug -> Host
|
||||
virtual bool beginEdit (long index); // To be called before a setParameterAutomated with mouse move (one per Mouse Down)
|
||||
virtual bool endEdit (long index); // To be called after a setParameterAutomated (on Mouse Up)
|
||||
|
||||
virtual bool openFileSelector (VstFileSelect *ptr); // Open a Host File selector (see aeffectx.h for VstFileSelect definition)
|
||||
|
||||
#endif // VST_2_1_EXTENSIONS
|
||||
|
||||
//---------------------------------------------------------
|
||||
#if VST_2_2_EXTENSIONS
|
||||
|
||||
bool closeFileSelector (VstFileSelect *ptr); // Close the Host File selector which was opened by openFileSelector
|
||||
bool getChunkFile (void* nativePath); // Returns in platform format the path of the current chunk (could be called in setChunk ()) (FSSpec on MAC else char*)
|
||||
|
||||
#endif // VST_2_2_EXTENSIONS
|
||||
|
||||
//---------------------------------------------------------
|
||||
#if VST_2_3_EXTENSIONS
|
||||
|
||||
// Host -> Plug
|
||||
virtual long setTotalSampleToProcess (long value) { return value; } // Called in offline (non RealTime) Process before process is called, indicates how many sample will be processed
|
||||
|
||||
virtual long getNextShellPlugin (char* name) { return 0; }
|
||||
// Tthis opcode is only called, if Plugin is of type kPlugCategShell.
|
||||
// should return the next plugin's uniqueID.
|
||||
// name points to a char buffer of size 64, which is to be filled
|
||||
// with the name of the plugin including the terminating zero.
|
||||
virtual long startProcess () { return 0; } // Called one time before the start of process call
|
||||
virtual long stopProcess () { return 0; } // Called after the stop of process call
|
||||
|
||||
virtual bool setPanLaw (long type, float val) { return false; } // Set the Panning Law used by the Host
|
||||
|
||||
virtual long beginLoadBank (VstPatchChunkInfo* ptr) { return 0; }
|
||||
// Called before a Bank is loaded.
|
||||
// returns -1 if the Bank cannot be loaded, returns 1 if it can be loaded else 0 (for compatibility)
|
||||
virtual long beginLoadProgram (VstPatchChunkInfo* ptr) { return 0; }
|
||||
// Called before a Program is loaded. (called before beginSetProgram)
|
||||
// returns -1 if the Program cannot be loaded, returns 1 if it can be loaded else 0 (for compatibility)
|
||||
|
||||
// Tools
|
||||
virtual bool allocateArrangement (VstSpeakerArrangement** arrangement, long nbChannels);
|
||||
// Allocate memory for a VstSpeakerArrangement containing the given
|
||||
// number of channels
|
||||
virtual bool deallocateArrangement (VstSpeakerArrangement** arrangement);
|
||||
// Delete/free memory for a speaker arrangement
|
||||
virtual bool copySpeaker (VstSpeakerProperties* to, VstSpeakerProperties* from);
|
||||
// Feed the "to" speaker properties with the same values than "from"'s ones.
|
||||
// It is assumed here that "to" exists yet, ie this function won't
|
||||
// allocate memory for the speaker (this will prevent from having
|
||||
// a difference between an Arrangement's number of channels and
|
||||
// its actual speakers...)
|
||||
virtual bool matchArrangement (VstSpeakerArrangement** to, VstSpeakerArrangement* from);
|
||||
// "to" is deleted, then created and initialized with the same values as "from" ones ("from" must exist).
|
||||
#endif // VST_2_3_EXTENSIONS
|
||||
};
|
||||
|
||||
#endif //__audioeffectx__
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
Loading…
Add table
Add a link
Reference in a new issue