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

fix #148311 by adding dummy note events to end of loop during playback #5719

Merged
Merged
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
10 changes: 9 additions & 1 deletion mscore/seq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,15 @@ void Seq::setLoopSelection()

if (score && score->selection().isRange()) {
cs->setLoopInTick(score->selection().tickStart());
cs->setLoopOutTick(score->selection().tickEnd());
cs->setLoopOutTick(score->selection().tickEnd());
}

// add a dummy event to loop end if it is not already there
// this is to let the playback reach the end completely before starting again
if (!events.count(cs->loopOutTick().ticks())) {
NPlayEvent ev;
ev.setValue(ME_INVALID);
events.insert(std::pair<int, Ms::NPlayEvent>(cs->loopOutTick().ticks(), ev));
}
}

Expand Down