From: Paul Brossier Date: Sat, 28 Dec 2013 23:39:05 +0000 (-0400) Subject: examples/aubioonset.c: synth only when need be X-Git-Tag: 0.4.1~102^2~21 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=822190cd6836d85b9a3cfad4e27031f6a20ac43e;p=aubio.git examples/aubioonset.c: synth only when need be --- diff --git a/examples/aubioonset.c b/examples/aubioonset.c index 0a3094cf..814dea9c 100644 --- a/examples/aubioonset.c +++ b/examples/aubioonset.c @@ -31,9 +31,10 @@ smpl_t is_onset; void process_block(fvec_t *ibuf, fvec_t *obuf) { - fvec_zeros(obuf); aubio_onset_do (o, ibuf, onset); is_onset = fvec_get_sample(onset, 0); + if ( !usejack && ! sink_uri ) return; + fvec_zeros(obuf); if ( is_onset ) { aubio_wavetable_play ( wavetable ); } else {