-
Notifications
You must be signed in to change notification settings - Fork 246
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
Seek breaks span #691
Comments
We may require that all variable sources are wrapped into something like UniformSourceIterator, so in most cases spans can only change channels, not sample rate... |
would not help since seek is implemented at the decoder level. Those inherently do not have a uniform sample rate. And we can not resample to such a uniform source if the spans are not correct. |
At least it would help to not care about the sample rate changes downstream, in sources that come after decoders. With decoders themselves, I am thinking of more comprehensive test harness that would generate both various source audio files and random seeks, something like property testing but for our case. |
it would, but it would come at a performance cost. Hifi-resampling is performance intensive, resampling everything at the edges might be wasteful. Maybe we can make the resampler very lazy, that would help.... Honestly I think we would need a prototype before making any decision. A rodio fork that only supports a few sources (lets say queue & mix) and works by informed resampling at the input. With informed I mean that idea I had earlier with the output communicating its preferred sample rate down and everything adjusting along the way. After I finish fixing queue I can work on the informed sample rate bit, once that's done you could make the prototype. Then we have to figure out some workloads to compare the implementations with. If the performance difference is positive or trivial the code simplifications might be worth it. |
Seek might need padding silence when resample rate or channel count change. Since the consumer has no way to know they have.
Alternative, make seek an exception and make the consumer recall sample_rate, channel count & span len.
The text was updated successfully, but these errors were encountered: