From ac67de78638ac96266ad7c5bffc44f1ef4fa1c46 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 13 Apr 2013 22:23:04 -0500 Subject: [PATCH] src/tempo/tempo.c: always set last_beat --- src/tempo/tempo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index 80626e98..4894212c 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -88,11 +88,12 @@ void aubio_tempo_do(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo) if (o->blockpos == FLOOR(o->out->data[i])) { tempo->data[0] = o->out->data[i] - FLOOR(o->out->data[i]); /* set tactus */ /* test for silence */ + /* if (aubio_silence_detection(input, o->silence)==1) { - //tempo->data[0] = 0; /* unset onset */ - } else { - o->last_beat = o->total_frames + (uint_t)ROUND(tempo->data[0] * o->hop_size); + tempo->data[0] = 0; // unset beat if silent } + */ + o->last_beat = o->total_frames + (uint_t)ROUND(tempo->data[0] * o->hop_size); } } o->total_frames += o->hop_size; -- 2.26.2