From 4686e5199e359425fb11013ebf75dab423db3f8c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 31 Jul 2016 18:03:25 -0400 Subject: Fix compilation with C++ --- src/hz_voct.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/hz_voct.c') 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; } } -- cgit v1.2.1