-
Notifications
You must be signed in to change notification settings - Fork 21
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
Check if my resampler usage is correct #85
Comments
Managed to get it working as expected, feel free to check and see if I'm doing anything stupid but as it works hopefully I'm not 🙏 |
I took a quick look and I'd say it looks fine. But the resampler size looks a little odd, like a power of two with a typo: |
Ah yeah that was a typo. I was doing various powers of two and probably messed up in one of the changes. It would be nice if I didn't have to manually figure out where to truncate to but that's do-able |
You can use this to know how much to trim at the start: |
So normally I'd use some closed source code making use of ffmpeg bindings to do audio resampling. But this is an open source project outside of my work so I thought I'd try rubato out as it seemed the most fleshed out solution. PR for reference xd009642/streamer-template#19
So initially I'm doing some fairly simple resamplings in the tests just as a sanity check before doing anything more complicated.
Also I've had to manually implement some truncation to cut off a trailing silence which i guess is based on the buffer size? It would be nice if this was documented in some way or there was a code sample.
Hopefully my code is useful to see how someone with no knowledge of this library approaches using it and if there's any stupid mistakes I've made they could potentially be fed back into examples or docs to add more clarity.
EDIT: Removed something that was an issue in my test I fixed.
The text was updated successfully, but these errors were encountered: