From dc73857a627c789708ccefd1eb6ba1219d2c9840 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 11 Dec 2009 19:17:35 +0100 Subject: [PATCH] src/gstaubiotempo.{c,h}: update to latest aubio branch --- src/gstaubiotempo.c | 12 +++++------- src/gstaubiotempo.h | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/gstaubiotempo.c b/src/gstaubiotempo.c index a96d8fc..9bb841c 100644 --- a/src/gstaubiotempo.c +++ b/src/gstaubiotempo.c @@ -142,10 +142,8 @@ gst_aubio_tempo_init (GstAubioTempo * filter, filter->silent = TRUE; filter->message = TRUE; - filter->type_onset = aubio_onset_kl; - filter->buf_size = 1024; - filter->hop_size = 512; + filter->hop_size = 128; filter->channels = 1; filter->last_beat = -1; @@ -153,8 +151,8 @@ gst_aubio_tempo_init (GstAubioTempo * filter, filter->ibuf = new_fvec(filter->hop_size, filter->channels); filter->out = new_fvec(2,filter->channels); - filter->t = new_aubio_tempo(filter->type_onset, - filter->buf_size, filter->hop_size, filter->channels); + filter->t = new_aubio_tempo("kl", + filter->buf_size, filter->hop_size, filter->channels, 44100); } static void @@ -241,9 +239,9 @@ gst_aubio_tempo_transform_ip (GstBaseTransform * trans, GstBuffer * buf) filter->pos); if (filter->pos == filter->hop_size - 1) { - aubio_tempo(filter->t, filter->ibuf, filter->out); + aubio_tempo_do(filter->t, filter->ibuf, filter->out); - if (filter->out->data[0][0]>=1) { + if (filter->out->data[0][0]> 0.) { gdouble now = GST_BUFFER_OFFSET (buf); // correction of inside buffer time now += (smpl_t)(j - filter->hop_size + 1); diff --git a/src/gstaubiotempo.h b/src/gstaubiotempo.h index 82072e0..1ccf6bd 100644 --- a/src/gstaubiotempo.h +++ b/src/gstaubiotempo.h @@ -68,8 +68,6 @@ struct _GstAubioTempo gdouble bpm; gdouble last_beat; - aubio_onsetdetection_type type_onset; - }; struct _GstAubioTempoClass -- 2.11.0