Skip to content

Commit 3dcbbad

Browse files
ywwgdaschuer
andcommitted
Update src/engine/controls/bpmcontrol.cpp
Co-authored-by: Daniel Schürmann <daschuer@mixxx.org>
1 parent 35dc3f2 commit 3dcbbad

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/engine/controls/bpmcontrol.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,7 @@ double BpmControl::calcSyncAdjustment(bool userTweakingSync) {
553553
adjustment = 1.0;
554554
// When updating the user offset, make sure to remove the existing offset or else it
555555
// will get double-applied.
556-
double offset = error + curUserOffset;
557-
while (std::abs(offset) > 1.0f) {
558-
offset -= std::copysign(1.0f, offset);
559-
}
556+
double offset = std::fmod(error + curUserOffset, 1.0f);
560557
m_dUserOffset.setValue(offset);
561558
} else {
562559
// Threshold above which we do sync adjustment.

0 commit comments

Comments
 (0)