aboutsummaryrefslogtreecommitdiffstats
path: root/src/random.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-22 21:28:00 +0000
committerDavid Robillard <d@drobilla.net>2012-05-22 21:28:00 +0000
commit6f3d2fef5d1b2ef4ee969465585c582e4fbca8e6 (patch)
tree49ee2ddc91552ae1e9f82106528bc17248a6f8dd /src/random.c
parent8fee183109728ec2fad88d332940b93a1d882c20 (diff)
downloadblop.lv2-6f3d2fef5d1b2ef4ee969465585c582e4fbca8e6.tar.gz
blop.lv2-6f3d2fef5d1b2ef4ee969465585c582e4fbca8e6.tar.bz2
blop.lv2-6f3d2fef5d1b2ef4ee969465585c582e4fbca8e6.zip
Don't cast inputs to non-const pointers.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blip.lv2@4437 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/random.c')
-rw-r--r--src/random.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/random.c b/src/random.c
index 9aab30a..4a6f5b8 100644
--- a/src/random.c
+++ b/src/random.c
@@ -102,10 +102,10 @@ runRandom_fasa_oa(LV2_Handle instance,
Random* plugin = (Random*)instance;
/* Frequency (Hz) (array of floats of length sample_count) */
- float* frequency = plugin->frequency;
+ const float* frequency = plugin->frequency;
/* Wave smoothness (array of floats of length sample_count) */
- float* smooth = plugin->smooth;
+ const float* smooth = plugin->smooth;
/* Output (array of floats of length sample_count) */
float* output = plugin->output;
@@ -163,10 +163,10 @@ runRandom_fasc_oa(LV2_Handle instance,
Random* plugin = (Random*)instance;
/* Frequency (Hz) (array of floats of length sample_count) */
- float* frequency = plugin->frequency;
+ const float* frequency = plugin->frequency;
/* Wave smoothness (float value) */
- float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f);
+ const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f);
/* Output (array of floats of length sample_count) */
float* output = plugin->output;
@@ -220,10 +220,10 @@ runRandom_fcsa_oa(LV2_Handle instance,
Random* plugin = (Random*)instance;
/* Frequency (Hz) (float value) */
- float frequency = *(plugin->frequency);
+ const float frequency = *(plugin->frequency);
/* Wave smoothness (array of floats of length sample_count) */
- float* smooth = plugin->smooth;
+ const float* smooth = plugin->smooth;
/* Output (pointer to float value) */
float* output = plugin->output;
@@ -279,10 +279,10 @@ runRandom_fcsc_oa(LV2_Handle instance,
Random* plugin = (Random*)instance;
/* Frequency (Hz) (float value) */
- float frequency = *(plugin->frequency);
+ const float frequency = *(plugin->frequency);
/* Wave smoothness (float value) */
- float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f);
+ const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f);
/* Output (array of floats of length sample_count) */
float* output = plugin->output;