I’ve been learning SDL 1.2, and I just recently started learning the sdl_mixer functions, so I’ve been adding music and sounds to my games. I’m working on this game where I need to play a sound at different sample rates, so the speed and pitch of the sound are altered. I was planning to just use ProTools to create several versions of the same sound, played at different speeds, but then it occurred to me that my game would maybe use less ram if I could just change the speed of the audio file on the fly. Is there a function in the mixer that would let me do that?
I don’t need to do anything fancy, like time-shifting without changing the pitch, or ramping up the speed as the audio plays. I just want to take a 22.05kHz wav file and play it at maybe 28kHz or so. As some of you already know, I’m very new to programming, so if this is something that would be very complicated, I’ll probably just make some new versions of the wav file instead. But I figured there might be a simple way to do it.