aboutsummaryrefslogtreecommitdiffstats
path: root/src/hz_voct.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-31 18:03:25 -0400
committerDavid Robillard <d@drobilla.net>2016-07-31 18:03:25 -0400
commit4686e5199e359425fb11013ebf75dab423db3f8c (patch)
treed9913cf94779b7d72ee98de85ebf3fa87c128143 /src/hz_voct.c
parent3e3b61724b16437a3181e80fcb75cc6f6b0a97ba (diff)
Fix compilation with C++
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;
}
}