diff options
Diffstat (limited to 'lvz')
-rw-r--r-- | lvz/AEffEditor.hpp | 2 | ||||
-rw-r--r-- | lvz/audioeffectx.h | 5 | ||||
-rw-r--r-- | lvz/gui_wrapper.cpp | 21 |
3 files changed, 8 insertions, 20 deletions
diff --git a/lvz/AEffEditor.hpp b/lvz/AEffEditor.hpp index 2d5152c..239c9d0 100644 --- a/lvz/AEffEditor.hpp +++ b/lvz/AEffEditor.hpp @@ -11,7 +11,7 @@ public: , pluginURI("NULL") {} - virtual bool open(void* ptr) { return true; } + virtual long open(void* ptr) { return true; } virtual void idle() {} diff --git a/lvz/audioeffectx.h b/lvz/audioeffectx.h index a1f975a..162d24b 100644 --- a/lvz/audioeffectx.h +++ b/lvz/audioeffectx.h @@ -80,6 +80,9 @@ class AudioEffect { public: AudioEffect() : editor(NULL) {} virtual ~AudioEffect() {} + + virtual void setParameter(LvzInt32 index, float value) = 0; + virtual float getParameter(LvzInt32 index) = 0; void setEditor(AEffEditor* e) { editor = e; } virtual void masterIdle() {} @@ -112,8 +115,6 @@ public: virtual LvzInt32 getNumOutputs() { return numOutputs; } virtual LvzInt32 getNumParameters() { return numParams; } - virtual void setParameter(LvzInt32 index, float value) = 0; - virtual float getParameter(LvzInt32 index) = 0; virtual void getParameterName(LvzInt32 index, char *label) = 0; virtual bool getProductString(char* text) = 0; diff --git a/lvz/gui_wrapper.cpp b/lvz/gui_wrapper.cpp index cd8dc24..96d4f28 100644 --- a/lvz/gui_wrapper.cpp +++ b/lvz/gui_wrapper.cpp @@ -76,24 +76,12 @@ mda_ui_instantiate(const struct _LV2UI_Descriptor* descriptor, LV2UI_Widget* widget, const LV2_Feature* const* features) { - /* Some extensions need to be defined for this to work. Hosts must: - * 1) Pass a pointer to the plugin (VST is crap and has no UI separation) - * 2) Call idle on the UI periodically (VST is crap and uses polling) - * - * Thoughts: - * - * 1) This wrapper could be written explicitly in GTK and just get at - * the idle handler that way. Less burden on the host... - * - * 2) A better idea is to have a 'get plugin extension data' feature - * the UI (or anything else) can use to ask for any URI-identified - * piece of extension data (failing in this case if plugin is remote) - */ - + VSTGUI::setBundlePath(bundle_path); + MDAPluginUI* ui = (MDAPluginUI*)malloc(sizeof(MDAPluginUI)); ui->effect = NULL; - typedef struct { const void* (*extension_data)(const char* uri); } LV2_ExtensionData; + typedef struct { const void* (*extension_data)(const char* uri); } LV2_DataAccess; typedef const void* (*extension_data_func)(const char* uri); typedef const AudioEffectX* (*get_effect_func)(LV2_Handle instance); @@ -108,7 +96,7 @@ mda_ui_instantiate(const struct _LV2UI_Descriptor* descriptor, if (!strcmp(feature->URI, "http://lv2plug.in/ns/ext/instance-access")) { instance = (LV2_Handle)feature->data; } else if (!strcmp(feature->URI, "http://lv2plug.in/ns/ext/data-access")) { - LV2_ExtensionData* ext_data = (LV2_ExtensionData*)feature->data; + LV2_DataAccess* ext_data = (LV2_DataAccess*)feature->data; extension_data_func func = (extension_data_func)feature->data; get_effect = (get_effect_func)ext_data->extension_data( "http://drobilla.net/ns/dev/vstgui"); @@ -124,7 +112,6 @@ mda_ui_instantiate(const struct _LV2UI_Descriptor* descriptor, } ui->ui = new UI_CLASS(ui->effect); - ui->ui->setBundlePath(bundle_path); ui->stolen = false; ui->socket = GTK_SOCKET(gtk_socket_new()); |