Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loopcontrol: prevent moving a loop beyond track end #3117

Merged
merged 1 commit into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Fix missing manual in deb package lp:1889776
* Fix caching of duplicate tracks that reference the same file #3027
* Fix loss of precision when dealing with floating-point sample positions while setting loop out position and seeking using vinyl control #3126 #3127
* prevent moving a loop beyond track end #3117 https://bugs.launchpad.net/mixxx/+bug/1799574

==== 2.2.4 2020-05-10 ====

Expand Down
6 changes: 6 additions & 0 deletions src/engine/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,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