-
-
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
eject: double click does 'un-replace', i.e. reloads the previous track #11246
Conversation
Okay, the current implementation would break all mappings that don't send I think I'll try the double-tap solution used for deck cloning. |
Does anyone have recommendations how to do timed actions (sleep) in tests? edit |
Done. Works and tests pass 🎉 |
I can confirm that this PR works and the code looks good. However I am unsure if it works as you might expect, after a dim memory in a panic situation: Scenario:
So we do not have a double click. In fact we have the requirement to undo the eject within 500 ms. How about bringing back the SecondLastEjectedTrack in that scenario as well? |
I don't understand why you would do that "Shit... eject" in the first place? That kinda feels like setting the table cloth on fire and "Shit... turn away" I mean, I could implement it in a way that we always wait for the second click before reacting. That would allow testing for a double-click but it would also delay the single-click eject. Eject is not time-sensitive, so I that is acceptable and would be m preferred solution. Otherwise (double-eject empty deck after panic eject) it would be
If that one useless track load is acceptable.. |
That was exactly my idea. Do you think that will still "feel" natural? |
I don't know, we'd have to try. However, I'm still not convinced we need to worry about the "Oh shit... eject" situation, I consider that part of the learning process tbh. What matters is the feature description (tooltip and manual): if that clearly states that double-click does does un-replace while the wrong new track is still loaded we're fine I'd say. |
When trying you PR the first time I had just the expectation that I can restore the old track with a double click unconditionally. |
The delay feels weird, it's not clear why eject takes "so long". I changed it to always un-replace on double-click, no matter the delay or if a track is loaded. Note that like uneject this works across decks (restore a replaced track in another deck). |
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.
Except of the test crasher, it works good now.
Do you mean, just toggle between un-load the last and the second last track?
That works for me as well and would make the feature even more predictable.
That's what it does right now, no? I'll fix the tests. |
Yes, it is working fine. I just did not understand that comment:
|
I meant it's not clear for users why there's a delay when ejecting a track because everything else happens immediately incl. track load. |
I fixed |
@@ -123,6 +123,8 @@ class BaseTrackPlayerImpl : public BaseTrackPlayer { | |||
bool m_replaygainPending; | |||
EngineChannel* m_pChannelToCloneFrom; | |||
|
|||
PerformanceTimer m_ejectTimer; |
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.
IMO PerformanceTimer
is a little overkill, but we don't have anything better in mixxx right now (except possibly implementing a custom clock based on std::chrono
). Unimportant.
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.
Thank you. Code LGTM, still need to do a manual test though.
@ywwg Do you have time to take a look? |
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.
Looks almost good. Just a text nit pick.
Also enable word-warp for the control description label in the Learning dialg
Okido, done |
Thank you. |
follow-up for Un-eject #4668
Long-press eject (> 800 ms) to reload the previous track.Double-press (< 500 ms) Eject to reload the last replaced track.
Like uneject this works across decks (restore a replaced track in another deck).
TODO