PDA

View Full Version : Pitch limit



BlueCat
03-11-2003, 12:12 AM
I'm trying to use OpenAL to make a car engine sound. So far it's been really easy to set everything up and play a looping sample.

I have a problem with setting the pitch of the sound though. It seems that the pitch can be set between 0.5 and 2.0. I'd like to be able to increase the pitch higher than 2x and I'm wondering if there's an easy way to do it.

:cat:

noeska
19-11-2003, 07:04 PM
I know it is giving me lots of problems also. As i am trying to write a mod player pitch is way to limitied.

I decided to see if i could change the frequency of the buffer. This did not seem to do anything at first, but...

Deleting the buffer and recreating it does it.

Take a look at the modplayer source where i delete and recreate the buffer to see what i mean.

You can use the frequency on your buffer to make it sound higher or lower.

Be aware to stop the source before deleting the buffer or else a memory leak will occur.

Personaly i thing you should use multiple samples for your engine sound. Just changing the frequency (or pitch) is not enought to make it sound realistic. Maybe a sample for every gear?