Skip to content

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

Merged
Gustl22 merged 4 commits into
mainfrom
feat/windows-millisecond-level-precision
Jun 27, 2023
Merged

refactor(windows): simplify position and duration processing#1553
Gustl22 merged 4 commits into
mainfrom
feat/windows-millisecond-level-precision

Conversation

@Gustl22

@Gustl22 Gustl22 commented Jun 26, 2023

Copy link
Copy Markdown
Collaborator

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

Gustl22 commented Jun 26, 2023

Copy link
Copy Markdown
Collaborator Author

@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

@spydon spydon left a comment

Copy link
Copy Markdown
Member

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

Gustl22 commented Jun 27, 2023

Copy link
Copy Markdown
Collaborator Author

@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

SNNafi commented Jun 27, 2023

Copy link
Copy Markdown
Contributor

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

@Gustl22 Gustl22 merged commit ca63c5a into main Jun 27, 2023
@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