From 69d642a0a5e6dd766c22bc7fac5ed35e3e3a4549 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 8 Apr 2013 10:19:48 -0500 Subject: [PATCH] src/pitch/pitchyin.c: use fvec_quadratic_peak_pos --- src/pitch/pitchyin.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pitch/pitchyin.c b/src/pitch/pitchyin.c index 578c8e62..725d1d1a 100644 --- a/src/pitch/pitchyin.c +++ b/src/pitch/pitchyin.c @@ -99,8 +99,7 @@ void 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 @@ aubio_pitchyin_do (aubio_pitchyin_t * o, fvec_t * input, fvec_t * out) 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; } -- 2.26.2