aboutsummaryrefslogtreecommitdiffstats
path: root/lvz/audioeffectx.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-08 22:45:58 +0000
committerDavid Robillard <d@drobilla.net>2008-08-08 22:45:58 +0000
commite360047054117d63fb579ec9231e9dc77c99f12a (patch)
tree4a497365f6ecd30449e2c66c1fe77c816bd1fe4a /lvz/audioeffectx.h
downloadmda.lv2-e360047054117d63fb579ec9231e9dc77c99f12a.tar.gz
mda.lv2-e360047054117d63fb579ec9231e9dc77c99f12a.tar.bz2
mda.lv2-e360047054117d63fb579ec9231e9dc77c99f12a.zip
Add preliminary (library side only) LV2 port of MDA (open-sourced VST plugins).
git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1321 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lvz/audioeffectx.h')
-rw-r--r--lvz/audioeffectx.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/lvz/audioeffectx.h b/lvz/audioeffectx.h
new file mode 100644
index 0000000..f2f696b
--- /dev/null
+++ b/lvz/audioeffectx.h
@@ -0,0 +1,104 @@
+/* LVZ - A C++ interface for writing LV2 plugins.
+ * Copyright (C) 2008 Dave Robillard <http://drobilla.net>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __lvz_audioeffectx_h
+#define __lvz_audioeffectx_h
+
+#include <stdint.h>
+#include <string.h>
+
+typedef int16_t LvzInt16;
+typedef int32_t LvzInt32;
+typedef void* audioMasterCallback;
+
+class AEffGUIEditor;
+
+enum LvzPinFlags {
+ kLvzPinIsActive = 1<<0,
+ kLvzPinIsStereo = 1<<1
+};
+
+struct LvzPinProperties {
+ LvzPinProperties() : label(NULL), flags(0) {}
+ char* label;
+ int flags;
+
+};
+
+enum LvzEventTypes {
+ kLvzMidiType = 0
+};
+
+struct LvzEvent {
+ int type;
+};
+
+struct LvzMidiEvent : public LvzEvent {
+ char* midiData;
+ long deltaFrames;
+};
+
+struct LvzEvents {
+ long numEvents;
+ LvzEvent** events;
+};
+
+#define DECLARE_LVZ_DEPRECATED(x) x
+
+class AudioEffect {
+};
+
+class AudioEffectX : public AudioEffect {
+public:
+ AudioEffectX(audioMasterCallback audioMaster, int progs, int params)
+ : curProgram(0)
+ , numPrograms(progs)
+ , numInputs(0)
+ , numOutputs(0)
+ {
+ }
+
+ float getSampleRate() { return sampleRate; }
+ uint32_t getNumInputs() { return numInputs; }
+ uint32_t getNumOutputs() { return numOutputs; }
+ void setNumInputs(uint32_t num) { numInputs = num; }
+ void setNumOutputs(uint32_t num) { numOutputs = num;}
+ void setUniqueID(const char* id) {}
+ void setSampleRate(float rate) { sampleRate = rate; }
+ void canMono() {}
+ void wantEvents() {}
+ void canProcessReplacing() {}
+ void isSynth() {}
+ void suspend() {}
+ void setBlockSize(uint32_t blockSize) {}
+ void setParameter(uint32_t index, float value) {}
+
+ void process(float **inputs, float **outputs, uint32_t nframes) {}
+
+protected:
+ uint32_t curProgram;
+ uint32_t numPrograms;
+ uint32_t numInputs;
+ uint32_t numOutputs;
+ float sampleRate;
+
+ AEffGUIEditor* editor;
+};
+
+#endif // __lvz_audioeffectx_h
+