-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Risk of buffer underruns during seek with keylock enabled #11142
Comments
#11120 make the issue worse. |
Since the #11120 is merged, continue the discussion here:
The 2048 frames window is moved by 512 frames and processed again. This means every process() call processes 2048 frames for a 512 frames output. It takes ~0.3 ms her in the best case, but can take also ~0,7 ms. Not sure what is blocking in the later case. The fist process() calls are "free", because rubberband has not enough samples to fill the first window. I have tested it with ramping disabled. With Padding:
Without padding:
I am considering to disable the padding via a compile flag or a preferences option. Do you think we can distinguish use cases when the padding is required/affordable? |
Without Hyperthreading:
This is the result with -8 % and Hyperthreading disabled:
Workaround: disable padding:
|
I also ran the numbers and they don't quite line up with yours: (the averages aren't very useful for the 128 sample period size since most of the periods the algorithm won't be doing anything, so just look at the maxima) Markdown version
The Even without padding the first call after a reset sometimes takes significantly longer. Maybe it's possible to avoid calling reset() at all here? |
Oh yeah and:
The padding is always needed, or the output will fade in over the coarse of the first 2048 produced samples (refer back to that squared Hann function I posted in the PR). |
But yes, when properly taking care of the padding you do need to process two additional overlapping windows, and that will indeed increase the DSP load on the first |
The current situation is:
Related:
For now I consider that we have fixed one problem by introducing another worse problem. As a band-aid I like to disable the padding by default. Later we may introduce a better solution:
|
Also, why does Mixxx always stream the file even if the decoded file would only take up a fraction of the available system memory? I feel like just reading the entire track upfront if it's, say, below 100 MB when decoded to PCM samples would help seek performance a lot and remove a source of realtime-unsafeness that causes real world performance issues. |
I agree that this is not optimal and can be improved. The goal was original to be immediately ready to play a track after throwing it to a deck and the concerns the about long tracks which can be theoretically unlimited.
This will free up a lot resources especially if you need to analyze a track during a performance for some reason. |
Bug Description
This is due to crossfading + settling time of the pitch shift library
Discussed in
#11120 (comment)
Solution: We need to move the crossfading to the input buffer.
Version
all
OS
all
The text was updated successfully, but these errors were encountered: