ref: 69d642a0a5e6dd766c22bc7fac5ed35e3e3a4549
parent: 9499eefb31014e9d6b41ed13a0d63773f3bbdd05
author: Paul Brossier <piem@piem.org>
date: Mon Apr 8 06:19:48 EDT 2013
src/pitch/pitchyin.c: use fvec_quadratic_peak_pos
--- a/src/pitch/pitchyin.c
+++ b/src/pitch/pitchyin.c
@@ -99,8 +99,7 @@
aubio_pitchyin_getcum (fvec_t * yin)
{
uint_t tau;
- smpl_t tmp;
- tmp = 0.;
+ smpl_t tmp = 0.;
yin->data[0] = 1.;
//AUBIO_DBG("%f\t",yin->data[0]);
for (tau = 1; tau < yin->length; tau++) {
@@ -150,11 +149,11 @@
period = tau - 3;
if (tau > 4 && (yin->data[period] < tol) &&
(yin->data[period] < yin->data[period + 1])) {
- out->data[0] = fvec_quadint (yin, period);
+ out->data[0] = fvec_quadratic_peak_pos (yin, period);
goto beach;
}
}
- out->data[0] = fvec_quadint (yin, fvec_min_elem (yin));
+ out->data[0] = fvec_quadratic_peak_pos (yin, fvec_min_elem (yin));
beach:
return;
}