Skip to content

Commit

Permalink
BpmControl: simplify slotUpdateEngineBpm()
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Dec 2, 2023
1 parent 79f3ec5 commit 9863ab2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/engine/controls/bpmcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,13 +980,12 @@ mixxx::audio::FrameDiff_t BpmControl::getPhaseOffset(mixxx::audio::FramePos this

void BpmControl::slotUpdateEngineBpm(double value) {
// Adjust playback bpm in response to a rate_ratio update
double dRate = m_pRateRatio->get();

if (kLogger.traceEnabled()) {
kLogger.trace() << getGroup() << "BpmControl::slotUpdateEngineBpm"
<< value << m_pLocalBpm->get() << dRate;
<< m_pLocalBpm->get() << value;
}
m_pEngineBpm->set(m_pLocalBpm->get() * dRate);
m_pEngineBpm->set(m_pLocalBpm->get() * value);
}

void BpmControl::slotUpdateRateSlider(double value) {
Expand Down Expand Up @@ -1094,7 +1093,7 @@ mixxx::Bpm BpmControl::updateLocalBpm() {
localBpmValue = localBpm.value();
}
m_pLocalBpm->set(localBpmValue);
slotUpdateEngineBpm();
slotUpdateEngineBpm(m_pRateRatio->get());
}
return localBpm;
}
Expand Down

0 comments on commit 9863ab2

Please sign in to comment.