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

changing speed can cause track_position to become inaccurate #639

Open
dvdsk opened this issue Nov 11, 2024 · 2 comments
Open

changing speed can cause track_position to become inaccurate #639

dvdsk opened this issue Nov 11, 2024 · 2 comments
Labels

Comments

@dvdsk
Copy link
Collaborator

dvdsk commented Nov 11, 2024

Speed should only apply changes at frame boundaries since track_position uses those to add up the currently played duration OR track_position should update its internal counter every sample.

  • needs a test first, preferably integration.
@dvdsk dvdsk added the bug label Nov 11, 2024
@ugochukwu-850
Copy link
Contributor

This isn't clear .it seems interesting and I may want to go with it .But I don't understand what you mean yet.

@dvdsk
Copy link
Collaborator Author

dvdsk commented Nov 16, 2024

Speed works by changing the sample-rate. The sample rate normally only changes at frame boundaries. Track position assumes it never changes except when a new frame starts (see:

if Some(self.samples_counted) == self.current_frame_len() {
).

We should make it so that speed only changes the sample-rate at frame boundaries and limit the latency this causes by letting speed put an upper bound on frame boundary length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants