From c218821f6caf921887f251371bf4ad98c28673db Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 18 Sep 2009 00:57:31 +0200 Subject: [PATCH] src/spectral/mfcc.c: zero output before computing it --- src/spectral/mfcc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/spectral/mfcc.c b/src/spectral/mfcc.c index 60f998aa..b7dca023 100644 --- a/src/spectral/mfcc.c +++ b/src/spectral/mfcc.c @@ -97,10 +97,14 @@ void aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out) { uint_t i, j; + /* compute filterbank */ aubio_filterbank_do (mf->fb, in, mf->in_dct); - /* extract real part of fft grain */ + /* zeros output */ + fvec_zeros(out); + + /* compute discrete cosine transform */ for (i = 0; i < mf->n_filters; i++) { for (j = 0; j < mf->n_coefs; j++) { out->data[0][j] += mf->in_dct->data[0][i] -- 2.26.2