From 4772ada37bef92a628f76f3bde65ddd95c601a1e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Aug 2008 00:22:20 +0000 Subject: Data generation. Pretty/consistent plugin symbol names. git-svn-id: http://svn.drobilla.net/lad/mda-lv2@1322 a436a847-0d15-0410-975c-d299462d15a1 --- lvz/wrapper.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'lvz/wrapper.cpp') 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 #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" -- cgit v1.2.1