From 5f0ad5072a4f6e05f22492a5a9b6a9ae12ed5e07 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 26 Mar 2017 15:39:27 +0200 Subject: [PATCH] src/synth/wavetable.c: always clamp wavetable --- examples/aubioonset.c | 1 - examples/aubiotrack.c | 1 - src/synth/wavetable.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/aubioonset.c b/examples/aubioonset.c index 680471c2..d88fe04e 100644 --- a/examples/aubioonset.c +++ b/examples/aubioonset.c @@ -45,7 +45,6 @@ void process_block(fvec_t *ibuf, fvec_t *obuf) } if (mix_input) { aubio_wavetable_do (wavetable, ibuf, obuf); - fvec_clamp(obuf, 1.); } else { aubio_wavetable_do (wavetable, obuf, obuf); } diff --git a/examples/aubiotrack.c b/examples/aubiotrack.c index ba047d37..d4a1de73 100644 --- a/examples/aubiotrack.c +++ b/examples/aubiotrack.c @@ -48,7 +48,6 @@ void process_block(fvec_t * ibuf, fvec_t *obuf) { } if (mix_input) { aubio_wavetable_do (wavetable, ibuf, obuf); - fvec_clamp(obuf, 1.); } else { aubio_wavetable_do (wavetable, obuf, obuf); } diff --git a/src/synth/wavetable.c b/src/synth/wavetable.c index 8dacde38..ea085687 100644 --- a/src/synth/wavetable.c +++ b/src/synth/wavetable.c @@ -103,6 +103,7 @@ void aubio_wavetable_do ( aubio_wavetable_t * s, const fvec_t * input, fvec_t * for (i = 0; i < output->length; i++) { output->data[i] += input->data[i]; } + fvec_clamp(obuf, 1.); } } -- 2.11.0