Peaz
25-04-2008 12:59:32
Hey guys, sorry for the long post but I'll need to explain what I'm doing before people can understand what I'm asking 
I currently have a .wav file which is a second long and plays a single heart beat. The ogre application I have at the moment currently just loops the sound over and over when the scene is created to give the impression you can hear a regular heart beat going at 60 bps.
The idea of the application is that when the player sees/does something scary their heart rate will increase and I need the sound being played to increase as well to match the faster heart rate.
What I was wondering is is it possible to get OgreAL to change the speed at which a sound is played, e.g. play the sound twice as fast so you hear two beats a second and get a bps of 120? I'm just wondering because the only other way I can think of to get this working is to edit the .wav file and save different versions of it, i.e. have an audio file which plays a beat every second, every 0.8 seconds, every 0.6 seconds etc. and play the appropriate file at the correct time during the game. I'd really appreciate any help on how to do this if this is possible at all or any advice on maybe another better/more efficient way of doing this.
Thanks in advance,
Peaz

I currently have a .wav file which is a second long and plays a single heart beat. The ogre application I have at the moment currently just loops the sound over and over when the scene is created to give the impression you can hear a regular heart beat going at 60 bps.
The idea of the application is that when the player sees/does something scary their heart rate will increase and I need the sound being played to increase as well to match the faster heart rate.
What I was wondering is is it possible to get OgreAL to change the speed at which a sound is played, e.g. play the sound twice as fast so you hear two beats a second and get a bps of 120? I'm just wondering because the only other way I can think of to get this working is to edit the .wav file and save different versions of it, i.e. have an audio file which plays a beat every second, every 0.8 seconds, every 0.6 seconds etc. and play the appropriate file at the correct time during the game. I'd really appreciate any help on how to do this if this is possible at all or any advice on maybe another better/more efficient way of doing this.
Thanks in advance,
Peaz