From ccdc51bb00d5a489d79de68b073c0c277378052c Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 10 Mar 2017 20:34:38 +0100 Subject: [PATCH] examples/aubiotrack.c: avoid saturation in when using --mix-input --- examples/aubiotrack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/aubiotrack.c b/examples/aubiotrack.c index 36267cf6..ba047d37 100644 --- a/examples/aubiotrack.c +++ b/examples/aubiotrack.c @@ -46,10 +46,12 @@ void process_block(fvec_t * ibuf, fvec_t *obuf) { } else { aubio_wavetable_stop ( wavetable ); } - if (mix_input) + if (mix_input) { aubio_wavetable_do (wavetable, ibuf, obuf); - else + fvec_clamp(obuf, 1.); + } else { aubio_wavetable_do (wavetable, obuf, obuf); + } } void process_print (void) { -- 2.11.0