ref: c9e3a4ec8da543f3309b4ee9377253f5279d8288
parent: 89823283829ebb7845de7f13d2212e2052b27b32
author: Paul Brossier <piem@piem.org>
date: Sat Sep 5 07:50:47 EDT 2015
src/pitch/pitchyinfft.c: use fvec_weighted_copy
--- a/src/pitch/pitchyinfft.c
+++ b/src/pitch/pitchyinfft.c
@@ -107,9 +107,7 @@
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