Skip to content

Commit

Permalink
BeatUtils: Rename constant to kMaxOutliersCount for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Sep 8, 2021
1 parent ef72d53 commit c788690
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/track/beatutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ constexpr double kMaxSecsPhaseError = 0.025;
// This is set to avoid to use a constant region during an offset shift.
// That happens for instance when the beat instrument changes.
constexpr double kMaxSecsPhaseErrorSum = 0.1;
constexpr int kMaxOutlierCount = 1;
constexpr int kMaxOutliersCount = 1;
constexpr int kMinRegionBeatCount = 16;

} // namespace
Expand Down Expand Up @@ -96,7 +96,7 @@ QVector<BeatUtils::ConstRegion> BeatUtils::retrieveConstRegions(
phaseErrorSum += phaseError;
if (fabs(phaseError) > maxPhaseError) {
outliersCount++;
if (outliersCount > kMaxOutlierCount ||
if (outliersCount > kMaxOutliersCount ||
i == leftIndex + 1) { // the first beat must not be an outlier.
// region is not const.
break;
Expand Down

0 comments on commit c788690

Please sign in to comment.