Do you care ifwant the pitch changesto warp with the speed?
NoYes: Then you want time stretching.
This is simply interpolating / combining samples to generate the same overall waveform in a different number of samples. The obvious nearest neighbor approach will cause severe aliasing but technically works. To make it sound better one can use a higher order function like sinc interpolation.
YesNo: Then you want time scaling.
This is usually boiling down the sound to a procedural / time domain representation, it is an active area of research and doesn't sound perfect. The common techniques are:
EDIT: Your question is WAY out of scope for SDL. If you just want a library (instead of understanding what you are doing) then try SoundTouch or Rubber Band.