Skip to content
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

Audio seek does not work on first playback #27

Open
trevorvanhoof opened this issue Aug 23, 2024 · 0 comments
Open

Audio seek does not work on first playback #27

trevorvanhoof opened this issue Aug 23, 2024 · 0 comments

Comments

@trevorvanhoof
Copy link
Owner

If we:

  • mute the application
  • scrub to a point in time
  • unmute
  • press play
    Qt multimedia will load the song and we will tell it to go to a certain positoin and play
    But because of reasons Qt loads the song async and we can't set the position as soon as the song exists
    If we pause and press play again it WILL set the position correctly because the second call DOES get honored by Qt

The robust thing to do is probably:

  • Check if song is seekable directly after load
  • If not: start a looping timer that will check again after N milliseconds
  • If seekable: stop the timer and set position to current time (Song needs to know about Timer for this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant