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

SyncLock: Fix issues with single-playing syncables. #4155

Merged
merged 6 commits into from
Oct 12, 2021
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
9 changes: 6 additions & 3 deletions src/engine/sync/enginesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ void EngineSync::notifyPlayingAudible(Syncable* pSyncable, bool playingAudible)
} else {
Syncable* pOnlyPlayer = getUniquePlayingSyncedDeck();
if (pOnlyPlayer) {
// Even if we didn't change leader, if there is only one player (us), then we should
// update the beat distance.
// Even if we didn't change leader, if there is only one player, then we should
// reinit leader params.
pOnlyPlayer->notifyUniquePlaying();
updateLeaderBeatDistance(pOnlyPlayer, pOnlyPlayer->getBeatDistance());
reinitLeaderParams(pOnlyPlayer);
}
}
}
Expand Down Expand Up @@ -448,6 +448,9 @@ void EngineSync::notifyBeatDistanceChanged(Syncable* pSyncable, double beatDista
<< pSyncable->getGroup() << beatDistance;
}
if (pSyncable != m_pInternalClock) {
if (getUniquePlayingSyncedDeck() == pSyncable) {
updateLeaderBeatDistance(pSyncable, beatDistance);
}
return;
}

Expand Down