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

refactor(windows): simplify position and duration processing #1553

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Jun 26, 2023

Description

Continue #1548

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs:, chore: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in example.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Closes #1547

@Gustl22
Copy link
Collaborator Author

Gustl22 commented Jun 26, 2023

@SNNafi I pushed my changes here. Can you test, if that still fixes your issue? Thank you for your previous work :)

@Gustl22 Gustl22 requested a review from spydon June 27, 2023 08:36
Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Is it handled as double seconds for the other platforms as well already?

@Gustl22
Copy link
Collaborator Author

Gustl22 commented Jun 27, 2023

@spydon the media player for windows provides the time in double seconds, so I didn't see a point to convert it to Hns (hundred nanoseconds) first, as it also takes 64bit space and is not more accurate. And then convert from Hns to ms...
But in the end our interface takes milliseconds only, as integer.
So it doesn't make a difference in precision. And my test confirms that, even without the changes, the precision is already on 1ms on windows.

So for the other platforms it is not relevant if handled in double or int, as it has to be delivered as integer ms in the end.

@SNNafi
Copy link
Contributor

SNNafi commented Jun 27, 2023

@Gustl22, Sorry for the late reply. Working fine.

@Gustl22 Gustl22 merged commit ca63c5a into main Jun 27, 2023
7 checks passed
@Gustl22 Gustl22 deleted the feat/windows-millisecond-level-precision branch June 27, 2023 16:15
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

Successfully merging this pull request may close these issues.

The audioplayers plugin for Windows has an issue related to audio seeking precision
3 participants