From 102e899c331bd2ed9902467a077164e209c918f9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 12 Aug 2008 00:20:16 +0000 Subject: VSTUI X11 port and embeddable GTK wrapper. Build mdaSpecMeter and GUI. git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1340 a436a847-0d15-0410-975c-d299462d15a1 --- lvz/audioeffectx.h | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'lvz/audioeffectx.h') diff --git a/lvz/audioeffectx.h b/lvz/audioeffectx.h index 288d1cd..a1f975a 100644 --- a/lvz/audioeffectx.h +++ b/lvz/audioeffectx.h @@ -22,10 +22,29 @@ #include #include +// Some plugins seem to use these names... +#ifndef VstInt32 +# define VstInt32 LvzInt32 +# define VstInt16 LvzInt16 +#endif +#define VstEvents LvzEvents +#define VstMidiEvent LvzMidiEvent +#define VstPinProperty LvzPinProperty + typedef int16_t LvzInt16; typedef int32_t LvzInt32; typedef int (*audioMasterCallback)(int, int ver, int, int, int, int); +class AEffEditor; + +struct VstFileSelect { + int reserved; + char* returnPath; + size_t sizeReturnPath; + char** returnMultiplePaths; + long nbReturnPath; +}; + enum LvzPinFlags { kLvzPinIsActive = 1<<0, kLvzPinIsStereo = 1<<1 @@ -59,9 +78,16 @@ struct LvzEvents { class AudioEffect { public: + AudioEffect() : editor(NULL) {} virtual ~AudioEffect() {} + + void setEditor(AEffEditor* e) { editor = e; } + virtual void masterIdle() {} +protected: + AEffEditor* editor; }; + class AudioEffectX : public AudioEffect { public: AudioEffectX(audioMasterCallback audioMaster, LvzInt32 progs, LvzInt32 params) @@ -91,10 +117,11 @@ public: virtual void getParameterName(LvzInt32 index, char *label) = 0; virtual bool getProductString(char* text) = 0; - virtual void canMono() {} - virtual void canProcessReplacing() {} - virtual void isSynth() {} - virtual void wantEvents() {} + virtual bool canHostDo(const char* act) { return false; } + virtual void canMono() {} + virtual void canProcessReplacing() {} + virtual void isSynth() {} + virtual void wantEvents() {} virtual void setBlockSize(LvzInt32 size) {} virtual void setNumInputs(LvzInt32 num) { numInputs = num; } @@ -104,6 +131,11 @@ public: virtual void setURI(const char* uri) { URI = uri; } virtual void setUniqueID(const char* id) { uniqueID = id; } virtual void suspend() {} + virtual void beginEdit(VstInt32 index) {} + virtual void endEdit(VstInt32 index) {} + + virtual bool openFileSelector (VstFileSelect* sel) { return false; } + virtual bool closeFileSelector (VstFileSelect* sel) { return false; } protected: const char* URI; -- cgit v1.2.1