Skip to content

Commit

Permalink
BeatFactory: Round beatgrid frame positions in makePreferredBeats()
Browse files Browse the repository at this point in the history
Due to our internal beatgrid storage format, fractional beat positions
are not allowed.

Fixes https://github.com/mixxxdj/mixxx/pull/4258/files#r702285221.

Alternative to #4261.
  • Loading branch information
Holzhaus committed Sep 4, 2021
1 parent 4059a0c commit 311fb24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/track/beatfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ mixxx::BeatsPointer BeatFactory::makePreferredBeats(
constantRegions, sampleRate, &firstBeat);
firstBeat = BeatUtils::adjustPhase(firstBeat, constBPM, sampleRate, beats);
auto pGrid = mixxx::BeatGrid::makeBeatGrid(
sampleRate, constBPM, firstBeat, subVersion);
sampleRate, constBPM, firstBeat.toNearestFrameBoundary(), subVersion);
return pGrid;
} else if (version == BEAT_MAP_VERSION) {
QVector<mixxx::audio::FramePos> ironedBeats = BeatUtils::getBeats(constantRegions);
Expand Down

0 comments on commit 311fb24

Please sign in to comment.