Playing a wave file, dynamically changing the frequency


I'm making a race game and would like to play a wave file and change the
frequency during playback. That way, I could loop one wave file and produce
an engine sound that matches the current RPM.

Is this done the same way in other race games?

Can I use standard Delphi code, or some small simple library? Or must I dig
into DirectX for stuff like this?

Thanks in advance,

  - John