ref: c218821f6caf921887f251371bf4ad98c28673db
parent: 0028ea752412e315d750936b4c0c7bc102ef93af
author: Paul Brossier <piem@piem.org>
date: Thu Sep 17 20:57:31 EDT 2009
src/spectral/mfcc.c: zero output before computing it
--- a/src/spectral/mfcc.c
+++ b/src/spectral/mfcc.c
@@ -97,10 +97,14 @@
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]