Title Audio Ideas - Resampling and Pitch Shifting
Student Aaron Wishnick
Mentor Ryan C. Gordon
Abstract
Currently SDL does not support resampling by factors that are not powers of two. Because many sound cards require buffers to be powers of two, it is necessary to manage the resampled buffer so that the sound card always receives buffers of the proper size. Some real-time DSP filtering will be necessary to prevent artifacting from the resampling process. While this may not have been possible several years ago, computers are now to the point where this can be done efficiently in real-time. This resampling code will add some new members to SDL_AudioCVT.buf, as well as a minimal amount of code to SDL_RunAudio().

SDL also lacks pitch shifting support, which can be used, for example, to give the illusion of the Doppler effect. Pitch shifting is somewhat related to resampling. Pitch shifting can be done without altering the speed of the audio using a delay line whose delay time varies depending upon the pitch shift ratio. The pitch-shifting interface will allow the user to vary the pitch shift ratio as they please, so that the Doppler effect can be created.