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

CachingReader: Invalid sample position from engine #8812

Closed
mixxxbot opened this issue Aug 23, 2022 · 9 comments
Closed

CachingReader: Invalid sample position from engine #8812

mixxxbot opened this issue Aug 23, 2022 · 9 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: uklotzde
Date: 2017-02-19T19:06:31Z
Status: Fix Released
Importance: Critical
Launchpad Issue: lp1666050
Attachments: invalid_sample_read_request.txt


Branch: master / 2.1

Deck 2 was playing and I was adjusting a cue point on deck 1. When hitting cue on deck 1 suddenly the music stopped. My first guess was a wrong midi mapping, but than I noticed that a debug assertion stopped Mixxx. Only a test run with controller debugging enabled ;)

Please see the attached stack trace.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2017-02-19T19:06:31Z
Attachments: invalid_sample_read_request.txt

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2017-03-11T13:11:58Z


This has now happened multiple times when setting a cue point. Only one deck is affected, it doesn't matter if another deck is playing or not. The engine code for calculating the sample offser when setting cue points is definitely broken!

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2017-03-13T10:01:39Z


This is probably caused be the late latest changes, allowing fractional sample cue points.
We need to allow fractional hints for the caching reader as well.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2017-03-13T20:18:31Z


I disagree. The caching reader can only read from frame boundaries. Sub-frame calculations must be done in the engine.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2017-03-13T20:21:05Z


By switching to frame positions this would work as expected. It's just a missing adjustment of sample positions to even numbers during sub-frame calculations.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2017-03-13T22:10:06Z


Yes, the caching reader can only read full frames, and the engine can request fractional frames.
This bug is just an issue where we round to full frames. I have no strong opinion about the right place right now.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2017-03-14T06:24:47Z


The sub-frame calculations (and interpolation) must be done once, but not twice. If resampling between the sampling rate provided by decoding and the internal rate of the engine is needed, that could be the right place.

@mixxxbot
Copy link
Collaborator Author

Commented by: Be-ing
Date: 2017-05-11T17:44:48Z


#1223

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 2.1.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant