-
Notifications
You must be signed in to change notification settings - Fork 13
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
Resampling on Read and Write #21
Comments
Sorry, I just saw that you had already addressed resampling in #9, although being able to cache both the decode from disk and also the resampling would be excellent. |
I don't think this should be done in creek because creek doesn't know what sample rate to target. Depending on the application, the target sample rate can change, potentially continuously in real time as Moiré does. Caching resampled audio doesn't make sense in that case because the cache would have to be invalidated whenever the target sample rate changes, which would require creek to still keep the cache of the un-resampled audio and resample it. Resampling all of creek's cache doesn't make sense when the sample rate can change the next time the application reads data from creek. |
I do however think it should be easier to pass data from creek to rubato. I have been contributing to the audio crate to create a API to pass audio data between crates and have a work-in-progress branch of rubato using it. I asked the Symphonia maintainer about using the audio crate as well and they expressed some interest. |
Closing as out of scope |
Hi I just came upon creek today, the idea of the buffers and the ability to seek in realtime is excellent.
This may be a massive scope creep, however, for a project I need to do resampling (and looping).
I have used https://crates.io/crates/rubato to do sample interpolation in another project.
Would it be possible to create a Decoder/Encoder using rubato as a wrapper to the underlying Codec?
To enable seeking it would be great for there to be 2 different caches.
I imagine that there could be a pipeline something like
Data in File Format -> Cached Buffers of float -> Cached Resampled data (at different rate) - in chronological order -> Playback sampling (possibly in reverse issue #14, or sample accurate looping)
Is any of this currently possible?
Thanks
The text was updated successfully, but these errors were encountered: