From: Paul Brossier Date: Fri, 10 Mar 2017 19:34:38 +0000 (+0100) Subject: examples/aubiotrack.c: avoid saturation in when using --mix-input X-Git-Tag: 0.4.5~20^2~28 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=ccdc51bb00d5a489d79de68b073c0c277378052c;p=aubio.git examples/aubiotrack.c: avoid saturation in when using --mix-input --- 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) {