From: Paul Brossier Date: Sat, 5 Sep 2015 09:50:47 +0000 (+0200) Subject: src/pitch/pitchyinfft.c: use fvec_weighted_copy X-Git-Tag: 0.4.4~300^2~373 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=c9e3a4ec8da543f3309b4ee9377253f5279d8288;p=aubio.git src/pitch/pitchyinfft.c: use fvec_weighted_copy --- 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