aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-amp.lv2/amp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/eg-amp.lv2/amp.c')
-rw-r--r--plugins/eg-amp.lv2/amp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/eg-amp.lv2/amp.c b/plugins/eg-amp.lv2/amp.c
index 7f7cacc..86f7a81 100644
--- a/plugins/eg-amp.lv2/amp.c
+++ b/plugins/eg-amp.lv2/amp.c
@@ -41,9 +41,9 @@ typedef enum {
/** Plugin instance. */
typedef struct {
// Port buffers
- float* gain;
- float* input;
- float* output;
+ const float* gain;
+ const float* input;
+ float* output;
} Amp;
/** Create a new plugin instance. */
@@ -68,10 +68,10 @@ connect_port(LV2_Handle instance,
switch ((PortIndex)port) {
case AMP_GAIN:
- amp->gain = (float*)data;
+ amp->gain = (const float*)data;
break;
case AMP_INPUT:
- amp->input = (float*)data;
+ amp->input = (const float*)data;
break;
case AMP_OUTPUT:
amp->output = (float*)data;
@@ -92,7 +92,7 @@ activate(LV2_Handle instance)
static void
run(LV2_Handle instance, uint32_t n_samples)
{
- Amp* amp = (Amp*)instance;
+ const Amp* amp = (const Amp*)instance;
const float gain = *(amp->gain);
const float* const input = amp->input;