-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Sync Lock: Differentiate track loading from beats updating #3944
Merged
Merged
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0d1eb3f
Sync Lock: Differentiate track loading from beats updating
ywwg 0f15a65
Update src/test/enginesynctest.cpp
ywwg e506d79
Update src/engine/sync/synccontrol.cpp
ywwg 2c7c706
Merge branch 'main' into synclock-05-explicitload
ywwg 7ea1c8c
Update src/test/enginesynctest.cpp
ywwg 1410ff3
Update src/test/enginesynctest.cpp
ywwg f76defe
Sync Lock: correct naming in enginemaster
ywwg b0868a1
Merge remote-tracking branch 'origin/synclock-05-explicitload' into s…
ywwg 00f7544
Merge branch 'main' into synclock-05-explicitload
ywwg d432fe9
Merge branch 'main' into synclock-05-explicitload
ywwg f4680af
Merge branch 'main' into synclock-05-explicitload
ywwg 719bd08
Sync Lock: remove obsolete and broken BpmControler::syncTempo function
ywwg ffcfcbf
Merge branch 'main' into synclock-05-explicitload
ywwg b836148
Remove processbuffer calls to keep positions at zero
ywwg 31b7463
Merge branch 'main' into synclock-05-explicitload
ywwg 1a31030
Sync Lock: move obsolete beatsync_* controls to synccontrol
ywwg 90132fd
Revert debug edit
ywwg 665c03d
Sync Lock: make sure beatsync control is momentary
ywwg 2a66e45
Merge remote-tracking branch 'origin/main' into oops
ywwg 5d6dbc2
SyncLock: clang-format files
ywwg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,9 +89,8 @@ void EngineSync::requestSyncMode(Syncable* pSyncable, SyncMode mode) { | |
// Second, figure out what Syncable should be used to initialize the leader | ||
// parameters, if any. Usually this is the new leader. (Note, that pointer might be null!) | ||
Syncable* pParamsSyncable = m_pLeaderSyncable; | ||
// But if we are newly soft leader, we need to match to some other deck. | ||
if (pSyncable == m_pLeaderSyncable && pSyncable != oldLeader && | ||
mode != SyncMode::LeaderExplicit) { | ||
// But if we are newly leader, we need to match to some other deck. | ||
if (pSyncable == m_pLeaderSyncable && pSyncable != oldLeader) { | ||
pParamsSyncable = findBpmMatchTarget(pSyncable); | ||
if (!pParamsSyncable) { | ||
// We weren't able to find anything to match to, so set ourselves as the | ||
|
@@ -112,7 +111,6 @@ void EngineSync::requestSyncMode(Syncable* pSyncable, SyncMode mode) { | |
pSyncable->requestSync(); | ||
} | ||
} | ||
|
||
} | ||
|
||
void EngineSync::activateFollower(Syncable* pSyncable) { | ||
|
@@ -214,7 +212,7 @@ Syncable* EngineSync::pickLeader(Syncable* enabling_syncable) { | |
return m_pLeaderSyncable; | ||
} | ||
|
||
// First preference: some other sync deck that is not playing. | ||
// First preference: some other sync deck that is playing. | ||
// Note, if we are using PREFER_LOCK_BPM we don't use this option. | ||
Syncable* first_other_playing_deck = nullptr; | ||
// Second preference: whatever the first playing sync deck is, even if it's us. | ||
|
@@ -431,7 +429,8 @@ void EngineSync::requestBpmUpdate(Syncable* pSyncable, mixxx::Bpm bpm) { | |
|
||
void EngineSync::notifyInstantaneousBpmChanged(Syncable* pSyncable, mixxx::Bpm bpm) { | ||
if (kLogger.traceEnabled()) { | ||
kLogger.trace() << "EngineSync::notifyInstantaneousBpmChanged" << pSyncable->getGroup() << bpm; | ||
kLogger.trace() << "EngineSync::notifyInstantaneousBpmChanged" | ||
<< pSyncable->getGroup() << bpm; | ||
} | ||
if (pSyncable != m_pInternalClock) { | ||
return; | ||
|
@@ -535,7 +534,7 @@ void EngineSync::onCallbackEnd(mixxx::audio::SampleRate sampleRate, int bufferSi | |
m_pInternalClock->onCallbackEnd(sampleRate, bufferSize); | ||
} | ||
|
||
EngineChannel* EngineSync::getLeader() const { | ||
EngineChannel* EngineSync::getLeaderChannel() const { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks unrelated, but but probably makes sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah it helped clarify -- "getLeader" would seemingly return a Syncable* |
||
return m_pLeaderSyncable ? m_pLeaderSyncable->getChannel() : nullptr; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the momentary sync of tempo only when right clicking the sync button.
Mapping this to sync enabled will also sync the phase = seeks the track.
The original use case is syncing the tempo without seeking. This is now no longer possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved these controls to the synccontrol and reimplemented using the correct code.