diff --git a/src/engine/controls/bpmcontrol.cpp b/src/engine/controls/bpmcontrol.cpp index 9954e95f481..5bc92d15d4d 100644 --- a/src/engine/controls/bpmcontrol.cpp +++ b/src/engine/controls/bpmcontrol.cpp @@ -49,7 +49,7 @@ BpmControl::BpmControl(const QString& group, m_dSyncInstantaneousBpm(0.0), m_dLastSyncAdjustment(1.0) { m_dSyncTargetBeatDistance.setValue(0.0); - m_bSyncTargetAudible.setValue(false); + m_bSyncTargetAudible = false; m_dUserOffset.setValue(0.0); m_pPlayButton = new ControlProxy(group, "play", this); @@ -348,7 +348,7 @@ double BpmControl::calcSyncedRate(double userTweak) { // Now we have all we need to calculate the sync adjustment if any. double adjustment = 1.0; - if (m_bSyncTargetAudible.getValue()) { + if (m_bSyncTargetAudible) { adjustment = calcSyncAdjustment(userTweak != 0.0); } return (rate + userTweak) * adjustment; @@ -584,7 +584,7 @@ mixxx::audio::FramePos BpmControl::getNearestPositionInPhase( double otherBeatFraction; if (isFollower(syncMode)) { // Do not sync phase if the target is not audible. - if (!m_bSyncTargetAudible.getValue()) { + if (!m_bSyncTargetAudible) { return thisPosition; } // If we're a follower, it's easy to get the other beat fraction @@ -1072,7 +1072,7 @@ void BpmControl::notifyTargetAudible(bool audible) { if (kLogger.traceEnabled()) { qDebug() << getGroup() << "BpmControl::notifyTargetPlayingAudible:" << audible; } - m_bSyncTargetAudible.setValue(audible); + m_bSyncTargetAudible = audible; } void BpmControl::updateInstantaneousBpm(double instantaneousBpm) { diff --git a/src/engine/controls/bpmcontrol.h b/src/engine/controls/bpmcontrol.h index f908678be32..cc2236a23a2 100644 --- a/src/engine/controls/bpmcontrol.h +++ b/src/engine/controls/bpmcontrol.h @@ -157,7 +157,7 @@ class BpmControl : public EngineControl { ControlProxy* m_pThisBeatDistance; ControlValueAtomic m_dSyncTargetBeatDistance; - ControlValueAtomic m_bSyncTargetAudible; + QAtomicInt m_bSyncTargetAudible; // The user offset is a beat distance percentage value that the user has tweaked a deck // to bring it in sync with the other decks. This value is added to the reported beat // distance to get the virtual beat distance used for sync.