From 3444a46f4b058f5c0066320914c56bd1b417d06f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Aug 2012 03:28:57 +0000 Subject: Make sum, product, and difference plugins vectorizable. Improve const correctness. git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4652 a436a847-0d15-0410-975c-d299462d15a1 --- src/triangle.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/triangle.c') diff --git a/src/triangle.c b/src/triangle.c index 1189b06..fb03f7b 100644 --- a/src/triangle.c +++ b/src/triangle.c @@ -28,16 +28,16 @@ #define TRIANGLE_OUTPUT 2 typedef struct { - float* frequency; - float* slope; - float* output; - float phase; - float min_slope; - float max_slope; - uint32_t frequency_is_cv; - uint32_t slope_is_cv; - Wavedata wdat; - URIs uris; + const float* frequency; + const float* slope; + float* output; + float phase; + float min_slope; + float max_slope; + uint32_t frequency_is_cv; + uint32_t slope_is_cv; + Wavedata wdat; + URIs uris; } Triangle; static void @@ -49,10 +49,10 @@ connect_port(LV2_Handle instance, switch (port) { case TRIANGLE_FREQUENCY: - plugin->frequency = (float*)data; + plugin->frequency = (const float*)data; break; case TRIANGLE_SLOPE: - plugin->slope = (float*)data; + plugin->slope = (const float*)data; break; case TRIANGLE_OUTPUT: plugin->output = (float*)data; -- cgit v1.2.1