Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I have tried the https://crates.io/crates/rodio crate already but I did not find a way to change the parameters while the background thread is playing the song.
I had to do something similar to this a while back. I used cpal.
If you want to change tempo and pitch together, that's resampling. You can use Rubato's asynchronous resamplers for that.
Rodio is high level and likely not really suited to what you're trying to do. Rodio is nice if you just want to play sound files and don't care about the details. If you want to manipulate audio in realtime, Creek is likely a better fit. You can take a look how I am combining Creek and Rubato for realtime tempo changes in the DJ application I am writing.