mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-24 23:13:42 +02:00
Update scorealign to SVN r227.
This commit is contained in:
@@ -196,7 +196,6 @@ double Curvefit::distance_xy(double x, double y)
|
||||
printf("FATAL INTERNAL ERROR IN distance_xy: neither x nor y is "
|
||||
"an integer\n");
|
||||
assert(false);
|
||||
return 100.0; // to make the compiler happy
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,6 +219,7 @@ double Curvefit::compute_dist(int i)
|
||||
for (int y = (int) y1; y < y2; y++) {
|
||||
double x = interpolate(y1, x1, y2, x2, y);
|
||||
sum += distance_xy(x, y);
|
||||
// printf("dist %g %d = %g\n", x, y, distance_xy(x, y));
|
||||
}
|
||||
}
|
||||
// normalize using line length: sum/n is average distance. Multiply
|
||||
@@ -231,7 +231,7 @@ double Curvefit::compute_dist(int i)
|
||||
double rslt = sqrt(dx*dx + dy*dy) * sum / n;
|
||||
// printf("compute_dist %d: x1 %g y1 %g x2 %g y2 %g sum %g rslt %g\n",
|
||||
// i, x1, y1, x2, y2, sum, rslt);
|
||||
if (rslt < 0 || rslt > 20 * n) { // DEBUGGING
|
||||
if (rslt < 0 || rslt > 24 * n) { // DEBUGGING
|
||||
printf("internal error");
|
||||
}
|
||||
return rslt;
|
||||
|
||||
Reference in New Issue
Block a user