-
-
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: disallow selection of Explicit Leader #12431
Conversation
This helps work around stopped-leader bugs, like mixxxdj#11788. We can reenable this later if we can fix those issues.
Please remember to update the manual as well. Thank you! |
Please describe the intended behavior in more words. Otherwise it's impossible to decide if the code implements it correct. |
Please use std::as_const() |
src/engine/sync/enginesync.cpp
Outdated
if (pSyncable->getBaseBpm().isValid()) { | ||
if (!pSyncable->isPlaying()) { | ||
bool anyPlaying = false; | ||
// Only allow a non-playing deck to be leader if no deck is playing |
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.
Do we have a use case for this?
- Load two decks.
- sync both.
- select a soft-leader
- play the soft leader -> it is picked anyway
- play the follower -> it becomes the new leader
So it looks like users choice is ignored anyway.
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.
So it looks like users choice is ignored anyway.
I think I can fix that be preferring the current leader if there are multiple equivalent choices
This prevents unexpected switches of leader status. Also corrects a test that did not match its comments.
We've removed this feature due to bugs, but most of the useful functionality is still available See mixxxdj/mixxx#12431
Thank you. What is the workflow where the user has a benefit if a preselected soft leader. Can you give a hint for workflow we can test? |
Mostly it's to prevent user confusion when the decks are stopped, like this:
Alternatively we could always choose internal clock as sync leader when all decks are stopped. |
With this branch (not tested)
So yes, hiding the leader crown on stopped deck seems to be a good workaround for the visual issue. |
Oof unfortunately that behavior breaks a LOT of tests and assumptions, and it's not trivial to fix. I am unable to make it work easily. I think we can update the docs to say that "Mixxx will always prefer a playing deck for leader, overriding the user's preference" which is actually what we want, based on the original bug report. |
Original we could also not change the soft leaders in stopped decks. So to make progress here, how about just remove the the added logic that allows to shifting a soft leader to an other stopped deck and merge this. During testing I have discovered that it is currently not allowed to select a soft leader. The feature would be nice use this to switch to the internal clock as leader. |
ok done. |
In the future I'd like to make it so that when all decks are stopped, the InternalClock is leader, but doing that causes too many test failures / side effects right now. I think it can be solved with some logic fixes around setting the internal clock BPM but that's out of scope for 2.4 |
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.
LGTM and works good. Thank you for taking care.
Excellent, thanks for resolving this issue. I tested the most recent beta, now the problem (#11788) should never happen again. |
In response to the sync_leader CO, enable soft leader instead of explicit leader. This is due to the large number of side effects and bugs in the explicit leader code. Effectively this removes the Explicit Leader feature from mixxx 2.4. The user can still select which deck they want to be soft leader if that selection is valid, but Mixxx will not allow the user to select an invalid leader -- specifically, a stopped deck while another deck is playing. If all decks are stopped, the first deck with a loaded track will always be leader.
Fixes: #11788.
We can reenable this later if we can fix those issues.