Audio playback speed

I want to code car engine audio. I need to loop sound sample. Speed of sample
will change - it depends of car speed. How can I do it in realtime?

I searched racing games for SDL, but found only tuxracer - without “engine”.–
If there isn’t light when no one sees
Then how can I know what you might believe
A story told that can’t be real "Sign of the Southern Cross"
Somehow must reflect the truth we feel - Ronnie James Dio

After hours of reading SDL/docs and watching short and simple loopwave.c I
coded it, I just create new sample from source - skipping number of bytes (or
words). Then play that sample (with lenght=len) in callback routine.On Sat, Jul 07, 2001 at 05:38:57PM +0200, Jacek Pop?awski wrote:

I want to code car engine audio.

Same story, different eyes
Here’s where the hero never, never dies

                                      "Hollywood Black" - Ronnie James Dio