-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Consistently use seconds instead of milliseconds throughout playback module #23794
Consistently use seconds instead of milliseconds throughout playback module #23794
Conversation
1d92504
to
5c955eb
Compare
@cbjeukendrup Tested on Win10. There is a regression comparing with master (and 4.3.2)
bandicam.2024-07-29.15-59-43-313.mp4 |
5c955eb
to
b465fde
Compare
@DmitryArefiev Oops, there was one letter I forgot to remove 😄 But now it should be better! |
@cbjeukendrup All fine now. But I found another bug with measure counter in the playback panel (also regression from 4.3.2). Do you want to fix in this PR? :) Just try to input 123 (in big score): bandicam.2024-07-30.17-19-21-822.mp4 |
…module Resolves musescore#23793: the time input field in the playback toolbar was not working properly, because the amount of milliseconds resulting from the entered time was accidentally interpreted as a number of ticks, because the wrong overload of `seek` was used. This problem is avoided by eliminating the usage of the msecs_t type completely.
b465fde
to
30d34af
Compare
@DmitryArefiev I found a fix for that too! @RomanPudashkin please check if it looks good :) |
PlaybackToolbarModel emitted a "playback position changed" signal in response to notifications on the `playbackState->playbackPositionChanged()` channel. `PlaybackController` also listens to this channel, and uses it to update its `m_currentTick` value. The value is used to determine the current measure/beat position in PlaybackToolbar. The problem: the order in which channel listeners are invoked is undefined. And in this case we are unlucky: PlaybackToolbarModel's listener is invoked first, so it updates the QML view; and only after that, PlaybackController's listener is invoked, so its `m_currentTick` is updated too late. So, the QML view is updated based on the old `m_currentTick`. Solution: don't listen to `playbackState->playbackPositionChanged()` directly, but listen to a channel from PlaybackController. This channel sends the notification after updating `m_currentTick`. This commit also updates the name and signature of this channel, to better reflect its purpose. This problem was a regression, maybe caused by 8b95896, but that is an unverified conjecture.
30d34af
to
2f7f138
Compare
@cbjeukendrup Yeah, all fixed! Tested #23793 on Win10, Mac13.6, LinuxUbuntu22.04 - FIXED |
Resolves: #23793
The time input field in the playback toolbar was not working properly, because the amount of milliseconds resulting from the entered time was accidentally interpreted as a number of ticks, because the wrong overload of
seek
was used. This problem is avoided by eliminating the usage of the msecs_t type completely.Will conflict with #19038; it doesn't really matter which one is merged first.