Skip to content

Commit

Permalink
Merge pull request #4155 from ywwg/synclock-audiblephase
Browse files Browse the repository at this point in the history
SyncLock: Fix issues with single-playing syncables.
  • Loading branch information
daschuer authored Oct 12, 2021
2 parents 7f53cbd + 6513451 commit 15805bc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/engine/sync/enginesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,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 @@ -446,6 +446,9 @@ void EngineSync::notifyBeatDistanceChanged(Syncable* pSyncable, double beatDista
<< pSyncable->getGroup() << beatDistance;
}
if (pSyncable != m_pInternalClock) {
if (getUniquePlayingSyncedDeck() == pSyncable) {
updateLeaderBeatDistance(pSyncable, beatDistance);
}
return;
}

Expand Down

0 comments on commit 15805bc

Please sign in to comment.