aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/osc.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/osc.c')
-rw-r--r--backends/osc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/backends/osc.c b/backends/osc.c
index fd1bcd4..1305169 100644
--- a/backends/osc.c
+++ b/backends/osc.c
@@ -167,14 +167,8 @@ static inline channel_value osc_parameter_normalise(osc_parameter_type t, osc_pa
fprintf(stderr, "Invalid OSC type passed to interpolation routine\n");
}
- //fix overshoot
- if(v.normalised > 1.0){
- v.normalised = 1.0;
- }
- else if(v.normalised < 0.0){
- v.normalised = 0.0;
- }
-
+ //clamp to range
+ v.normalised = clamp(v.normalised, 1.0, 0.0);
return v;
}