1 parent 35dc3f2 commit 3dcbbadCopy full SHA for 3dcbbad
1 file changed
src/engine/controls/bpmcontrol.cpp
@@ -553,10 +553,7 @@ double BpmControl::calcSyncAdjustment(bool userTweakingSync) {
553
adjustment = 1.0;
554
// When updating the user offset, make sure to remove the existing offset or else it
555
// will get double-applied.
556
- double offset = error + curUserOffset;
557
- while (std::abs(offset) > 1.0f) {
558
- offset -= std::copysign(1.0f, offset);
559
- }
+ double offset = std::fmod(error + curUserOffset, 1.0f);
560
m_dUserOffset.setValue(offset);
561
} else {
562
// Threshold above which we do sync adjustment.
0 commit comments