aboutsummaryrefslogtreecommitdiffstats
path: root/src/adsr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/adsr.c')
-rw-r--r--src/adsr.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/adsr.c b/src/adsr.c
index 8c2c041..a84469f 100644
--- a/src/adsr.c
+++ b/src/adsr.c
@@ -38,19 +38,19 @@ typedef enum {
} ADSRState;
typedef struct {
- float* signal;
- float* trigger;
- float* attack;
- float* decay;
- float* sustain;
- float* release;
- float* output;
- float srate;
- float inv_srate;
- float from_level;
- float level;
- ADSRState state;
- uint32_t samples;
+ const float* signal;
+ const float* trigger;
+ const float* attack;
+ const float* decay;
+ const float* sustain;
+ const float* release;
+ float* output;
+ float srate;
+ float inv_srate;
+ float from_level;
+ float level;
+ ADSRState state;
+ uint32_t samples;
} Adsr;
static void
@@ -68,22 +68,22 @@ connect_port(LV2_Handle instance,
switch (port) {
case ADSR_SIGNAL:
- plugin->signal = (float*)data;
+ plugin->signal = (const float*)data;
break;
case ADSR_TRIGGER:
- plugin->trigger = (float*)data;
+ plugin->trigger = (const float*)data;
break;
case ADSR_ATTACK:
- plugin->attack = (float*)data;
+ plugin->attack = (const float*)data;
break;
case ADSR_DECAY:
- plugin->decay = (float*)data;
+ plugin->decay = (const float*)data;
break;
case ADSR_SUSTAIN:
- plugin->sustain = (float*)data;
+ plugin->sustain = (const float*)data;
break;
case ADSR_RELEASE:
- plugin->release = (float*)data;
+ plugin->release = (const float*)data;
break;
case ADSR_OUTPUT:
plugin->output = (float*)data;