X-Git-Url: https://git.sesse.net/?p=pitch;a=blobdiff_plain;f=pitchdetector.cpp;h=a73fb8632579824a1e603f3a01d73c0d1b8e9d05;hp=69888642310beab15ed3ac47a198bbd73943b703;hb=fa1b9cdf79b7688a8fec21e3a13eb8d8e6505391;hpb=afe882f57eb4991f01b20c4ecba98b2cc07594a1 diff --git a/pitchdetector.cpp b/pitchdetector.cpp index 6988864..a73fb86 100644 --- a/pitchdetector.cpp +++ b/pitchdetector.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -252,7 +253,7 @@ std::pair PitchDetector::interpolate_peak(double ym1, double y0, double c = y0; double xmax = (ym1 - y1) / (2.0 * (y1 + ym1 - 2.0 * y0)); - double ymax = 20.0 * (a * xmax * xmax + b * xmax + c) - 80.0; + double ymax = 20.0 * (a * xmax * xmax + b * xmax + c) - 70.0; return std::make_pair(xmax, ymax); }