1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-21 13:40:24 +02:00

Update scorealign to SVN r227.

This commit is contained in:
lllucius
2013-11-01 15:59:33 +00:00
parent ce00d5b507
commit e3bea17f16
49 changed files with 1768 additions and 10312 deletions

View File

@@ -478,8 +478,13 @@ void Scorealign::presmooth()
{
int n = ROUND(presmooth_time / actual_frame_period_1);
n = (n + 3) & ~3; // round up to multiple of 4
if (n < 4) {
SA_V(printf("presmooth time %g rounded to zero %gs frame periods.\n",
presmooth_time, actual_frame_period_1););
return;
}
int i = 0;
while (i < pathlen - 1 && pathx[i] + n <= last_x) {
while (i < pathlen - n && pathx[i] + n <= last_x) {
/* line goes from i to i+n-1 */
int x1 = pathx[i];
int xmid = x1 + n/2;
@@ -495,6 +500,10 @@ void Scorealign::presmooth()
break;
}
}
// this should not happen, but this guarantees that we found
// y2 and it is within the path:
if (j >= pathlen) break;
Regression regr;
/* see if line fits the data */
int k = i;