[SCM] calf/master: + LV2 GUI: create the instantiation 'if' ladder automatically, like in DSSI GUI code
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:58 UTC 2013
The following commit has been merged in the master branch:
commit 89f6846054ac12ad9a3bbaf0ef174b5057f8e10c
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Oct 30 21:33:32 2008 +0000
+ LV2 GUI: create the instantiation 'if' ladder automatically, like in DSSI GUI code
diff --git a/src/lv2gui.cpp b/src/lv2gui.cpp
index 6d7d848..11c532e 100644
--- a/src/lv2gui.cpp
+++ b/src/lv2gui.cpp
@@ -141,26 +141,9 @@ struct plugin_proxy: public plugin_proxy_base, public line_graph_iface
plugin_proxy_base *create_plugin_proxy(const char *effect_name)
{
- if (!strcmp(effect_name, "Reverb"))
- return new plugin_proxy<reverb_audio_module>();
- else if (!strcmp(effect_name, "Flanger"))
- return new plugin_proxy<flanger_audio_module>();
- else if (!strcmp(effect_name, "Filter"))
- return new plugin_proxy<filter_audio_module>();
- else if (!strcmp(effect_name, "Monosynth"))
- return new plugin_proxy<monosynth_audio_module>();
- else if (!strcmp(effect_name, "VintageDelay"))
- return new plugin_proxy<vintage_delay_audio_module>();
- else if (!strcmp(effect_name, "Organ"))
- return new plugin_proxy<organ_audio_module>();
- else if (!strcmp(effect_name, "RotarySpeaker"))
- return new plugin_proxy<rotary_speaker_audio_module>();
- else if (!strcmp(effect_name, "MultiChorus"))
- return new plugin_proxy<multichorus_audio_module>();
-#ifdef ENABLE_EXPERIMENTAL
-#endif
- else
- return NULL;
+ #define PER_MODULE_ITEM(name, isSynth, jackname) if (!strcmp(effect_name, name##_audio_module::plugin_info.label)) return new plugin_proxy<name##_audio_module>();
+ #include <calf/modulelist.h>
+ return NULL;
}
LV2UI_Handle gui_instantiate(const struct _LV2UI_Descriptor* descriptor,
@@ -172,6 +155,8 @@ LV2UI_Handle gui_instantiate(const struct _LV2UI_Descriptor* descriptor,
const LV2_Feature* const* features)
{
plugin_proxy_base *proxy = create_plugin_proxy(plugin_uri + sizeof("http://calf.sourceforge.net/plugins/") - 1);
+ if (!proxy)
+ return NULL;
scope_assign<bool> _a_(proxy->send, false);
proxy->setup(write_function, controller);
// dummy window
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list