From: Paul Brossier Date: Sat, 28 Dec 2013 23:39:45 +0000 (-0400) Subject: examples/aubiopitch.c: synth only when need be X-Git-Tag: 0.4.1~102^2~20 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=f4adefaaf66eb7ea216476dd584b65452230fcfb;p=aubio.git examples/aubiopitch.c: synth only when need be --- diff --git a/examples/aubiopitch.c b/examples/aubiopitch.c index 5c046f91..f960b495 100644 --- a/examples/aubiopitch.c +++ b/examples/aubiopitch.c @@ -30,12 +30,12 @@ fvec_t *pitch; void process_block(fvec_t * ibuf, fvec_t * obuf) { - fvec_zeros(obuf); aubio_pitch_do (o, ibuf, pitch); + if ( !usejack && ! sink_uri ) return; + fvec_zeros(obuf); smpl_t freq = fvec_get_sample(pitch, 0); aubio_wavetable_set_amp ( wavetable, aubio_level_lin (ibuf) ); aubio_wavetable_set_freq ( wavetable, freq ); - if (mix_input) aubio_wavetable_do (wavetable, ibuf, obuf); else