projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8982328
)
src/pitch/pitchyinfft.c: use fvec_weighted_copy
author
Paul Brossier
<piem@piem.org>
Sat, 5 Sep 2015 09:50:47 +0000
(11:50 +0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 5 Sep 2015 09:50:47 +0000
(11:50 +0200)
src/pitch/pitchyinfft.c
patch
|
blob
|
history
diff --git
a/src/pitch/pitchyinfft.c
b/src/pitch/pitchyinfft.c
index
940ae4f
..
9084547
100644
(file)
--- 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
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
// 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