Skip to content

Commit

Permalink
Sync Lock: Don't recalc half/double multiplier on every callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Jun 16, 2021
1 parent 29866ac commit 6640a28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/engine/sync/enginesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,13 @@ void EngineSync::requestBpmUpdate(Syncable* pSyncable, double bpm) {
}

if (mbaseBpm != 0.0) {
// resync to current master
pSyncable->reinitMasterParams(beatDistance, mbaseBpm, mbpm);
// update from current master
pSyncable->updateMasterBeatDistance(beatDistance);
pSyncable->updateMasterBpm(mbpm);
} else {
// There is no master, adopt this bpm as master values
// There is no other master, adopt this bpm as master
pSyncable->reinitMasterParams(0.0, 0.0, bpm);
pSyncable->updateMasterBeatDistance(0.0);
pSyncable->updateMasterBpm(bpm);
}
}

Expand Down

0 comments on commit 6640a28

Please sign in to comment.