Skip to content

Commit

Permalink
loopcontrol: prevent moving a loop beyond track end
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Sep 23, 2020
1 parent 9a5a50a commit 75344a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,12 @@ void LoopingControl::slotLoopMove(double beats) {
pBeats->findNBeatsFromSample(new_loop_in, m_pCOBeatLoopSize->get()) :
pBeats->findNBeatsFromSample(loopSamples.end, beats);

// The track would stop as soon as the playhead crosses track end,
// so we don't allow moving a loop beyond end.
// https://bugs.launchpad.net/mixxx/+bug/1799574
if (new_loop_out > m_pTrackSamples->get()) {
return;
}
// If we are looping make sure that the play head does not leave the
// loop as a result of our adjustment.
loopSamples.seek = m_bLoopingEnabled;
Expand Down

0 comments on commit 75344a1

Please sign in to comment.