src/tempo/tempo.c: always set last_beat develop
authorPaul Brossier <piem@piem.org>
Sun, 14 Apr 2013 03:23:04 +0000 (22:23 -0500)
committerPaul Brossier <piem@piem.org>
Sun, 14 Apr 2013 03:23:04 +0000 (22:23 -0500)
src/tempo/tempo.c

index 80626e98da04deef0932bbf02207358218441256..4894212c87a24dbbe36dde4a6f5263027138bacf 100644 (file)
@@ -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;