2 parents e36e5db + 9d8e89a commit 628f1f3Copy full SHA for 628f1f3
1 file changed
src/engine/controls/bpmcontrol.cpp
@@ -601,7 +601,8 @@ double BpmControl::calcSyncAdjustment(bool userTweakingSync) {
601
adjustment = 1.0;
602
// When updating the user offset, make sure to remove the existing offset or else it
603
// will get double-applied.
604
- m_dUserOffset.setValue(error + curUserOffset);
+ double offset = std::fmod(error + curUserOffset, 1.0f);
605
+ m_dUserOffset.setValue(offset);
606
} else {
607
// Threshold above which we do sync adjustment.
608
const double kErrorThreshold = 0.01;
0 commit comments