diff options
-rw-r--r-- | src/adenv.c | 10 | ||||
-rw-r--r-- | src/adenv_lvl.c | 18 | ||||
-rw-r--r-- | src/comparison.c | 31 | ||||
-rw-r--r-- | src/dahdsr_fexp.c | 21 | ||||
-rw-r--r-- | src/dahdsr_hexp.c | 18 | ||||
-rw-r--r-- | src/fast_crossfade.c | 11 | ||||
-rw-r--r-- | src/formant_filter.c | 14 | ||||
-rw-r--r-- | src/hz_voct.c | 12 | ||||
-rw-r--r-- | src/masher.c | 11 | ||||
-rw-r--r-- | src/multiplexer.c | 12 | ||||
-rw-r--r-- | src/prob_switch.c | 12 | ||||
-rw-r--r-- | src/range_trans.c | 14 | ||||
-rw-r--r-- | src/sample_and_hold.c | 12 | ||||
-rw-r--r-- | src/signal_abs.c | 8 | ||||
-rw-r--r-- | src/slew_limiter.c | 8 | ||||
-rw-r--r-- | src/slide.c | 8 | ||||
-rw-r--r-- | src/waveguide_mesh.c | 14 |
17 files changed, 113 insertions, 121 deletions
diff --git a/src/adenv.c b/src/adenv.c index 81b54f4..3d8c95e 100644 --- a/src/adenv.c +++ b/src/adenv.c @@ -72,19 +72,19 @@ connect_port(LV2_Handle instance, switch (port) { case ADENV_GATE: - plugin->gate = data; + plugin->gate = (float*)data; break; case ADENV_TRIGGER: - plugin->trigger = data; + plugin->trigger = (float*)data; break; case ADENV_ATTACK: - plugin->attack = data; + plugin->attack = (float*)data; break; case ADENV_DECAY: - plugin->decay = data; + plugin->decay = (float*)data; break; case ADENV_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/adenv_lvl.c b/src/adenv_lvl.c index 2c57530..021e0ee 100644 --- a/src/adenv_lvl.c +++ b/src/adenv_lvl.c @@ -79,31 +79,31 @@ connect_port(LV2_Handle instance, switch (port) { case ADENVLVL_GATE: - plugin->gate = data; + plugin->gate = (float*)data; break; case ADENVLVL_TRIGGER: - plugin->trigger = data; + plugin->trigger = (float*)data; break; case ADENVLVL_START_LEVEL: - plugin->start_level = data; + plugin->start_level = (float*)data; break; case ADENVLVL_ATTACK_LEVEL: - plugin->attack_level = data; + plugin->attack_level = (float*)data; break; case ADENVLVL_DECAY_LEVEL: - plugin->decay_level = data; + plugin->decay_level = (float*)data; break; case ADENVLVL_ATTACK: - plugin->attack = data; + plugin->attack = (float*)data; break; case ADENVLVL_DECAY: - plugin->decay = data; + plugin->decay = (float*)data; break; case ADENVLVL_RESET: - plugin->reset = data; + plugin->reset = (float*)data; break; case ADENVLVL_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/comparison.c b/src/comparison.c index ea8c97d..1d0af9b 100644 --- a/src/comparison.c +++ b/src/comparison.c @@ -54,43 +54,36 @@ instantiate(const LV2_Descriptor* descriptor, const char* bundle_path, const LV2_Feature* const* features) { - Comp* plugin = malloc(sizeof(Comp)); - plugin->a_buffer = NULL; - plugin->b_buffer = NULL; - plugin->larger_buffer = NULL; - plugin->smaller_buffer = NULL; - plugin->a_larger_buffer = NULL; - plugin->equal_buffer = NULL; + Comp* plugin = (Comp*)calloc(1, sizeof(Comp)); + 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) { - Comp* plugin; - - plugin = (Comp*)instance; + Comp* plugin = (Comp*)instance; switch (port) { case COMP_A: - plugin->a_buffer = location; + plugin->a_buffer = (float*)data; break; case COMP_B: - plugin->b_buffer = location; + plugin->b_buffer = (float*)data; break; case COMP_LARGER: - plugin->larger_buffer = location; + plugin->larger_buffer = (float*)data; break; case COMP_SMALLER: - plugin->smaller_buffer = location; + plugin->smaller_buffer = (float*)data; break; case COMP_A_LARGER: - plugin->a_larger_buffer = location; + plugin->a_larger_buffer = (float*)data; break; case COMP_EQUAL: - plugin->equal_buffer = location; + plugin->equal_buffer = (float*)data; break; } } @@ -98,7 +91,7 @@ connect_port(LV2_Handle instance, static void run(LV2_Handle instance, uint32_t nframes) { - Comp* const plugin = (Comp*)instance; + Comp* const plugin = (Comp*)instance; const float* const a = plugin->a_buffer; const float* const b = plugin->b_buffer; float* const larger = plugin->larger_buffer; diff --git a/src/dahdsr_fexp.c b/src/dahdsr_fexp.c index 116316b..438647f 100644 --- a/src/dahdsr_fexp.c +++ b/src/dahdsr_fexp.c @@ -71,37 +71,38 @@ cleanup(LV2_Handle instance) static void connect_port(LV2_Handle instance, - uint32_t port, void* data) + uint32_t port, + void* data) { Dahdsr *plugin = (Dahdsr *) instance; switch (port) { case DAHDSR_GATE: - plugin->gate = data; + plugin->gate = (float*)data; break; case DAHDSR_TRIGGER: - plugin->trigger = data; + plugin->trigger = (float*)data; break; case DAHDSR_DELAY: - plugin->delay = data; + plugin->delay = (float*)data; break; case DAHDSR_ATTACK: - plugin->attack = data; + plugin->attack = (float*)data; break; case DAHDSR_HOLD: - plugin->hold = data; + plugin->hold = (float*)data; break; case DAHDSR_DECAY: - plugin->decay = data; + plugin->decay = (float*)data; break; case DAHDSR_SUSTAIN: - plugin->sustain = data; + plugin->sustain = (float*)data; break; case DAHDSR_RELEASE: - plugin->release = data; + plugin->release = (float*)data; break; case DAHDSR_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/dahdsr_hexp.c b/src/dahdsr_hexp.c index 32e9dec..4f8149b 100644 --- a/src/dahdsr_hexp.c +++ b/src/dahdsr_hexp.c @@ -80,31 +80,31 @@ connect_port(LV2_Handle instance, switch (port) { case DAHDSR_GATE: - plugin->gate = data; + plugin->gate = (float*)data; break; case DAHDSR_TRIGGER: - plugin->trigger = data; + plugin->trigger = (float*)data; break; case DAHDSR_DELAY: - plugin->delay = data; + plugin->delay = (float*)data; break; case DAHDSR_ATTACK: - plugin->attack = data; + plugin->attack = (float*)data; break; case DAHDSR_HOLD: - plugin->hold = data; + plugin->hold = (float*)data; break; case DAHDSR_DECAY: - plugin->decay = data; + plugin->decay = (float*)data; break; case DAHDSR_SUSTAIN: - plugin->sustain = data; + plugin->sustain = (float*)data; break; case DAHDSR_RELEASE: - plugin->release = data; + plugin->release = (float*)data; break; case DAHDSR_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/fast_crossfade.c b/src/fast_crossfade.c index 228efb4..076b10f 100644 --- a/src/fast_crossfade.c +++ b/src/fast_crossfade.c @@ -58,23 +58,24 @@ instantiate(const LV2_Descriptor* descriptor, /* Connect a port to a data location */ static void connect_port(LV2_Handle instance, - uint32_t port, void* location) + uint32_t port, + void* data) { XFADE* plugin; plugin = (XFADE*) instance; switch (port) { case XFADE_LEVEL: - plugin->level_buffer = location; + plugin->level_buffer = (float*)data; break; case XFADE_A: - plugin->a_buffer = location; + plugin->a_buffer = (float*)data; break; case XFADE_B: - plugin->b_buffer = location; + plugin->b_buffer = (float*)data; break; case XFADE_OUTPUT: - plugin->output_buffer = location; + plugin->output_buffer = (float*)data; break; } } diff --git a/src/formant_filter.c b/src/formant_filter.c index ac851be..50968c7 100644 --- a/src/formant_filter.c +++ b/src/formant_filter.c @@ -104,21 +104,19 @@ activate(LV2_Handle instance) /* Connect a port to a data location */ static void connect_port(LV2_Handle instance, - uint32_t port, - void* location) + uint32_t port, + void* data) { - Formant* plugin; - - plugin = (Formant*)instance; + Formant* plugin = (Formant*)instance; switch (port) { case FORMANT_VOWEL: - plugin->vowel = location; + plugin->vowel = (float*)data; break; case FORMANT_INPUT: - plugin->input = location; + plugin->input = (float*)data; break; case FORMANT_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; } } 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; } } diff --git a/src/masher.c b/src/masher.c index a0a570a..6d501c5 100644 --- a/src/masher.c +++ b/src/masher.c @@ -97,22 +97,23 @@ activate(LV2_Handle instance) /* Connect a port to a data location */ static void connect_port(LV2_Handle instance, - uint32_t port, void * location) + uint32_t port, + void * data) { Masher *plugin = (Masher *) instance; switch (port) { case MASHER_INPUT: - plugin->input = location; + plugin->input = (float*)data; break; case MASHER_GRAINPITCH: - plugin->grain_pitch = location; + plugin->grain_pitch = (float*)data; break; case MASHER_DENSITY: - plugin->density = location; + plugin->density = (float*)data; break; case MASHER_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; } } diff --git a/src/multiplexer.c b/src/multiplexer.c index 90f94fa..0561c5a 100644 --- a/src/multiplexer.c +++ b/src/multiplexer.c @@ -57,24 +57,24 @@ instantiate(const LV2_Descriptor* descriptor, /* Connect a port to a data location */ static void connect_port(LV2_Handle instance, - uint32_t port, - void* location) + uint32_t port, + void* data) { MUX* plugin; plugin = (MUX*)instance; switch (port) { case MUX_GATE: - plugin->gate_buffer = location; + plugin->gate_buffer = (float*)data; break; case MUX_OFF: - plugin->off_buffer = location; + plugin->off_buffer = (float*)data; break; case MUX_ON: - plugin->on_buffer = location; + plugin->on_buffer = (float*)data; break; case MUX_OUTPUT: - plugin->output_buffer = location; + plugin->output_buffer = (float*)data; break; } } diff --git a/src/prob_switch.c b/src/prob_switch.c index 1f97a23..ac0d4fb 100644 --- a/src/prob_switch.c +++ b/src/prob_switch.c @@ -58,24 +58,24 @@ instantiate(const LV2_Descriptor* descriptor, /* Connect a port to a data location */ static void connect_port(LV2_Handle instance, - uint32_t port, - void* location) + uint32_t port, + void* data) { ProbSwitch* plugin; plugin = (ProbSwitch*)instance; switch (port) { case PROBSWITCH_INPUT2: - plugin->input2 = location; + plugin->input2 = (float*)data; break; case PROBSWITCH_PROB: - plugin->prob = location; + plugin->prob = (float*)data; break; case PROBSWITCH_INPUT1: - plugin->input1 = location; + plugin->input1 = (float*)data; break; case PROBSWITCH_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; } } diff --git a/src/range_trans.c b/src/range_trans.c index 5c32d91..667fba5 100644 --- a/src/range_trans.c +++ b/src/range_trans.c @@ -60,29 +60,29 @@ instantiate(const LV2_Descriptor* descriptor, static void connect_port(LV2_Handle instance, uint32_t port, - void* location) + void* data) { RangeTrans* plugin; plugin = (RangeTrans*)instance; switch (port) { case RANGETRANS_IN_MIN: - plugin->in_min = location; + plugin->in_min = (float*)data; break; case RANGETRANS_IN_MAX: - plugin->in_max = location; + plugin->in_max = (float*)data; break; case RANGETRANS_OUT_MIN: - plugin->out_min = location; + plugin->out_min = (float*)data; break; case RANGETRANS_OUT_MAX: - plugin->out_max = location; + plugin->out_max = (float*)data; break; case RANGETRANS_INPUT: - plugin->input = location; + plugin->input = (float*)data; break; case RANGETRANS_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; } } diff --git a/src/sample_and_hold.c b/src/sample_and_hold.c index 2e01f5f..a72ba86 100644 --- a/src/sample_and_hold.c +++ b/src/sample_and_hold.c @@ -62,25 +62,25 @@ instantiate(const LV2_Descriptor* descriptor, static void connect_port(LV2_Handle instance, uint32_t port, - void* location) + void* data) { SH* plugin = (SH*)instance; switch (port) { case INPUT: - plugin->input_buffer = location; + plugin->input_buffer = (float*)data; break; case TRIGGER: - plugin->trigger_buffer = location; + plugin->trigger_buffer = (float*)data; break; case THRESHOLD: - plugin->threshold_buffer = location; + plugin->threshold_buffer = (float*)data; break; case CONTINUOUS: - plugin->continuous_buffer = location; + plugin->continuous_buffer = (float*)data; break; case OUTPUT: - plugin->output_buffer = location; + plugin->output_buffer = (float*)data; break; } } diff --git a/src/signal_abs.c b/src/signal_abs.c index a81b282..742f292 100644 --- a/src/signal_abs.c +++ b/src/signal_abs.c @@ -57,20 +57,20 @@ instantiate(const LV2_Descriptor* descriptor, static void connect_port(LV2_Handle instance, uint32_t port, - void* location) + void* data) { SignalAbs* plugin; plugin = (SignalAbs*)instance; switch (port) { case SIGNAL_ABS_SIGN: - plugin->sign = location; + plugin->sign = (float*)data; break; case SIGNAL_ABS_INPUT1: - plugin->input1 = location; + plugin->input1 = (float*)data; break; case SIGNAL_ABS_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; } } diff --git a/src/slew_limiter.c b/src/slew_limiter.c index c663543..cc788b5 100644 --- a/src/slew_limiter.c +++ b/src/slew_limiter.c @@ -61,16 +61,16 @@ static void connect_port(LV2_Handle instance, switch (port) { case SLIM_INPUT: - plugin->input = data; + plugin->input = (float*)data; break; case SLIM_MAXRISE: - plugin->maxrise = data; + plugin->maxrise = (float*)data; break; case SLIM_MAXFALL: - plugin->maxfall = data; + plugin->maxfall = (float*)data; break; case SLIM_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/slide.c b/src/slide.c index 125c96a..ac68143 100644 --- a/src/slide.c +++ b/src/slide.c @@ -58,16 +58,16 @@ static void connect_port(LV2_Handle instance, switch (port) { case SLIDE_INPUT: - plugin->input = data; + plugin->input = (float*)data; break; case SLIDE_RISETIME: - plugin->risetime = data; + plugin->risetime = (float*)data; break; case SLIDE_FALLTIME: - plugin->falltime = data; + plugin->falltime = (float*)data; break; case SLIDE_OUTPUT: - plugin->output = data; + plugin->output = (float*)data; break; } } diff --git a/src/waveguide_mesh.c b/src/waveguide_mesh.c index 045a478..93a7cfe 100644 --- a/src/waveguide_mesh.c +++ b/src/waveguide_mesh.c @@ -123,29 +123,29 @@ activate(LV2_Handle instance) static void connect_port(LV2_Handle instance, uint32_t port, - void* location) + void* data) { WgMesh* plugin; plugin = (WgMesh*)instance; switch (port) { case MESH_INPUT1: - plugin->input1 = location; + plugin->input1 = (float*)data; break; case MESH_OUTPUT: - plugin->output = location; + plugin->output = (float*)data; break; case MESH_TENSION: - plugin->tension = location; + plugin->tension = (float*)data; break; case MESH_POWER: - plugin->power = location; + plugin->power = (float*)data; break; case MESH_EX_X: - plugin->ex_x = location; + plugin->ex_x = (float*)data; break; case MESH_EX_Y: - plugin->ex_y = location; + plugin->ex_y = (float*)data; break; } } |