From c9e3a4ec8da543f3309b4ee9377253f5279d8288 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 5 Sep 2015 11:50:47 +0200 Subject: [PATCH] src/pitch/pitchyinfft.c: use fvec_weighted_copy --- src/pitch/pitchyinfft.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pitch/pitchyinfft.c b/src/pitch/pitchyinfft.c index 940ae4f9..9084547b 100644 --- a/src/pitch/pitchyinfft.c +++ b/src/pitch/pitchyinfft.c @@ -107,9 +107,7 @@ aubio_pitchyinfft_do (aubio_pitchyinfft_t * p, fvec_t * input, fvec_t * output) fvec_t *yin = p->yinfft; smpl_t tmp = 0., sum = 0.; // window the input - for (l = 0; l < input->length; l++) { - p->winput->data[l] = p->win->data[l] * input->data[l]; - } + fvec_weighted_copy(input, p->win, p->winput); // get the real / imag parts of its fft aubio_fft_do_complex (p->fft, p->winput, fftout); // get the squared magnitude spectrum, applying some weight -- 2.11.0