summaryrefslogtreecommitdiffstats
path: root/src/engine/loopingcontrol.cpp
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2017-11-15 00:49:04 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2017-11-15 00:49:04 +0100
commit05e3d496b5a3ab437831caa03456fcd332b875fb (patch)
treedc77c60faaced9f52c8cef4812bccebfa8872e24 /src/engine/loopingcontrol.cpp
parentc5e6f454b8c354c8abcf30211524bd2d037158c7 (diff)
Fix Beats::findNBeatsFromSample() precision
Diffstat (limited to 'src/engine/loopingcontrol.cpp')
-rw-r--r--src/engine/loopingcontrol.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/engine/loopingcontrol.cpp b/src/engine/loopingcontrol.cpp
index 06181762c5..2f897b7f10 100644
--- a/src/engine/loopingcontrol.cpp
+++ b/src/engine/loopingcontrol.cpp
@@ -335,8 +335,6 @@ void LoopingControl::process(const double dRate,
double LoopingControl::nextTrigger(bool reverse,
const double currentSample,
double *pTarget) {
- Q_UNUSED(currentSample);
-
*pTarget = kNoTrigger;
LoopSamples loopSamples = m_loopSamples.getValue();
@@ -938,8 +936,8 @@ void LoopingControl::slotBeatLoop(double beats, bool keepStartPoint, bool enable
// the end of the track, let beatloop_size be set to
// a smaller size, but not get larger.
double previousBeatloopSize = m_pCOBeatLoopSize->get();
- double previousBeatloopOutPoint =
- m_pBeats->findNBeatsFromSample(newloopSamples.start, previousBeatloopSize);
+ double previousBeatloopOutPoint = m_pBeats->findNBeatsFromSample(
+ newloopSamples.start, previousBeatloopSize);
if (previousBeatloopOutPoint < newloopSamples.start
&& beats < previousBeatloopSize) {
m_pCOBeatLoopSize->setAndConfirm(beats);
@@ -951,9 +949,9 @@ void LoopingControl::slotBeatLoop(double beats, bool keepStartPoint, bool enable
// do not resize the existing loop until beatloop_size matches
// the size of the existing loop.
// Do not return immediately so beatloop_size can be updated.
- bool avoidResize = false;
+ bool omitResize = false;
if (!currentLoopMatchesBeatloopSize() && !enable) {
- avoidResize = true;
+ omitResize = true;
}
if (m_pCOBeatLoopSize->get() != beats) {
@@ -966,7 +964,7 @@ void LoopingControl::slotBeatLoop(double beats, bool keepStartPoint, bool enable
return;
}
- if (avoidResize) {
+ if (omitResize) {
return;
}