diff options
author | David Robillard <d@drobilla.net> | 2011-03-15 19:54:57 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-15 19:54:57 +0000 |
commit | d5c5cf7f2e5d81d55095ce83ceae67c4539b26d0 (patch) | |
tree | eb9dfa423068bcc6d5d2f53bec3ec019406fd997 /lvz | |
parent | 02da0683b09a65b491962b44ca46d9a9ea69b6c8 (diff) | |
download | mda.lv2-d5c5cf7f2e5d81d55095ce83ceae67c4539b26d0.tar.gz mda.lv2-d5c5cf7f2e5d81d55095ce83ceae67c4539b26d0.tar.bz2 mda.lv2-d5c5cf7f2e5d81d55095ce83ceae67c4539b26d0.zip |
Tidy.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/mdala.lv2@3092 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lvz')
-rw-r--r-- | lvz/wrapper.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/lvz/wrapper.cpp b/lvz/wrapper.cpp index 7fafffd..0ac2edd 100644 --- a/lvz/wrapper.cpp +++ b/lvz/wrapper.cpp @@ -46,14 +46,12 @@ typedef struct { float** outputs; } LVZPlugin; - static void lvz_cleanup(LV2_Handle instance) { free(instance); } - static void lvz_connect_port(LV2_Handle instance, uint32_t port, void* data) { @@ -73,14 +71,12 @@ lvz_connect_port(LV2_Handle instance, uint32_t port, void* data) } } - static int master_callback(int, int ver, int, int, int, int) { return 0; } - static LV2_Handle lvz_instantiate(const LV2_Descriptor* descriptor, double rate, @@ -91,37 +87,39 @@ lvz_instantiate(const LV2_Descriptor* descriptor, effect->setURI(URI_PREFIX PLUGIN_URI_SUFFIX); effect->setSampleRate(rate); - uint32_t num_params = effect->getNumParameters(); - uint32_t num_inputs = effect->getNumInputs(); + uint32_t num_params = effect->getNumParameters(); + uint32_t num_inputs = effect->getNumInputs(); uint32_t num_outputs = effect->getNumOutputs(); LVZPlugin* plugin = (LVZPlugin*)malloc(sizeof(LVZPlugin)); plugin->effect = effect; if (num_params > 0) { - plugin->controls = (float*)malloc(sizeof(float) * num_params); + plugin->controls = (float*)malloc(sizeof(float) * num_params); plugin->control_buffers = (float**)malloc(sizeof(float*) * num_params); for (uint32_t i = 0; i < num_params; ++i) { plugin->controls[i] = effect->getParameter(i); plugin->control_buffers[i] = NULL; } } else { - plugin->controls = NULL; + plugin->controls = NULL; plugin->control_buffers = NULL; } if (num_inputs > 0) { plugin->inputs = (float**)malloc(sizeof(float*) * num_inputs); - for (uint32_t i = 0; i < num_inputs; ++i) + for (uint32_t i = 0; i < num_inputs; ++i) { plugin->inputs[i] = NULL; + } } else { plugin->inputs = NULL; } if (num_outputs > 0) { plugin->outputs = (float**)malloc(sizeof(float*) * num_outputs); - for (uint32_t i = 0; i < num_outputs; ++i) + for (uint32_t i = 0; i < num_outputs; ++i) { plugin->outputs[i] = NULL; + } } else { plugin->outputs = NULL; } @@ -129,7 +127,6 @@ lvz_instantiate(const LV2_Descriptor* descriptor, return (LV2_Handle)plugin; } - static void lvz_run(LV2_Handle instance, uint32_t sample_count) { @@ -146,7 +143,6 @@ lvz_run(LV2_Handle instance, uint32_t sample_count) plugin->effect->processReplacing(plugin->inputs, plugin->outputs, sample_count); } - static const AudioEffectX* lvz_get_audioeffectx(LV2_Handle instance) { @@ -154,14 +150,12 @@ lvz_get_audioeffectx(LV2_Handle instance) return plugin->effect; } - static const void* lvz_extension_data(const char* uri) { return NULL; } - static void lvz_deactivate(LV2_Handle instance) { @@ -169,7 +163,6 @@ lvz_deactivate(LV2_Handle instance) plugin->effect->suspend(); } - /* Library */ static LV2_Descriptor descriptor; @@ -199,7 +192,7 @@ lv2_descriptor(uint32_t index) } } - +/** Entry point for LVZ gendata */ LV2_SYMBOL_EXPORT AudioEffectX* lvz_new_audioeffectx() @@ -209,6 +202,4 @@ lvz_new_audioeffectx() return effect; } - } // extern "C" - |