From 822190cd6836d85b9a3cfad4e27031f6a20ac43e Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 28 Dec 2013 19:39:05 -0400 Subject: [PATCH] examples/aubioonset.c: synth only when need be --- examples/aubioonset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.11.0