diff options
author | David Robillard <d@drobilla.net> | 2008-08-09 00:22:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-09 00:22:20 +0000 |
commit | 4772ada37bef92a628f76f3bde65ddd95c601a1e (patch) | |
tree | 023a7a6e646b18a1e78642177363d5d5aaf9afeb /lvz/wrapper.cpp | |
parent | e360047054117d63fb579ec9231e9dc77c99f12a (diff) | |
download | mda.lv2-4772ada37bef92a628f76f3bde65ddd95c601a1e.tar.gz mda.lv2-4772ada37bef92a628f76f3bde65ddd95c601a1e.tar.bz2 mda.lv2-4772ada37bef92a628f76f3bde65ddd95c601a1e.zip |
Data generation.
Pretty/consistent plugin symbol names.
git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1322 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lvz/wrapper.cpp')
-rw-r--r-- | lvz/wrapper.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/lvz/wrapper.cpp b/lvz/wrapper.cpp index 5916b13..14f73a9 100644 --- a/lvz/wrapper.cpp +++ b/lvz/wrapper.cpp @@ -16,13 +16,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef PLUGIN_URI -#error "This file requires PLUGIN_URI to be defined" -#endif - #ifndef PLUGIN_CLASS #error "This file requires PLUGIN_CLASS to be defined" #endif +#ifndef PLUGIN_URI_PREFIX +#error "This file requires PLUGIN_URI_PREFIX to be defined" +#endif +#ifndef PLUGIN_URI_SUFFIX +#error "This file requires PLUGIN_URI_SUFFIX to be defined" +#endif #include <stdlib.h> #include "audioeffectx.h" @@ -60,6 +62,7 @@ mda_instantiate(const LV2_Descriptor* descriptor, const LV2_Feature*const* features) { PLUGIN_CLASS* effect = new PLUGIN_CLASS(NULL); + effect->setURI(PLUGIN_URI_PREFIX PLUGIN_URI_SUFFIX); effect->setSampleRate(rate); MDAPlugin* plugin = (MDAPlugin*)malloc(sizeof(MDAPlugin)); @@ -87,7 +90,7 @@ init_descriptor() { mda_descriptor = (LV2_Descriptor*)malloc(sizeof(LV2_Descriptor)); - mda_descriptor->URI = PLUGIN_URI; + mda_descriptor->URI = PLUGIN_URI_PREFIX PLUGIN_URI_SUFFIX; mda_descriptor->activate = NULL; mda_descriptor->cleanup = mda_cleanup; mda_descriptor->connect_port = mda_connect_port; @@ -112,4 +115,15 @@ lv2_descriptor(uint32_t index) } } + +LV2_SYMBOL_EXPORT +AudioEffectX* +lvz_new_audioeffectx() +{ + PLUGIN_CLASS* effect = new PLUGIN_CLASS(NULL); + effect->setURI(PLUGIN_URI_PREFIX PLUGIN_URI_SUFFIX); + return effect; +} + + } // extern "C" |