From 311fb247d0fe245ff62d79f9389954e45c9e105b Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 4 Sep 2021 23:32:23 +0200 Subject: [PATCH] BeatFactory: Round beatgrid frame positions in makePreferredBeats() 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. --- src/track/beatfactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/track/beatfactory.cpp b/src/track/beatfactory.cpp index 27ace259b17..fd47be85870 100644 --- a/src/track/beatfactory.cpp +++ b/src/track/beatfactory.cpp @@ -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 ironedBeats = BeatUtils::getBeats(constantRegions);