aboutsummaryrefslogtreecommitdiffstats
path: root/src/hz_voct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hz_voct.c')
-rw-r--r--src/hz_voct.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/hz_voct.c b/src/hz_voct.c
index 2d1409f..555a226 100644
--- a/src/hz_voct.c
+++ b/src/hz_voct.c
@@ -45,27 +45,25 @@ instantiate(const LV2_Descriptor* descriptor,
const char* bundle_path,
const LV2_Feature* const* features)
{
- HzVoct* plugin = malloc(sizeof(HzVoct));
- plugin->input_buffer = NULL;
- plugin->output_buffer = NULL;
+ HzVoct* plugin = (HzVoct*)calloc(1, sizeof(HzVoct));
return (LV2_Handle)plugin;
}
/* Connect a port to a data location */
static void
connect_port(LV2_Handle instance,
- uint32_t port,
- void* location)
+ uint32_t port,
+ void* data)
{
HzVoct* plugin;
plugin = (HzVoct*)instance;
switch (port) {
case HZVOCT_INPUT:
- plugin->input_buffer = location;
+ plugin->input_buffer = (float*)data;
break;
case HZVOCT_OUTPUT:
- plugin->output_buffer = location;
+ plugin->output_buffer = (float*)data;
break;
}
}