View Full Version : Dynamic sound playback?
napthali
2003.12.05, 03:50 PM
Does anyone know of a good tool (or method) for having a sound play back at variable rates? Like a few-minute-long sound clip speeding up and slowing down based on the speed of movement in the game?
As always, thanks for the help.
jotapeh
2003.12.05, 04:10 PM
Just to add to this, it'd be really great to know (if such a function exists) whether or not it changes the pitch of the sound as well.
FCCovett
2003.12.05, 04:11 PM
In the Sound Manager API (legacy), you can set up all those you mentioned in the callbacks.
Check out the source code of Glypha III.
Now, someone had asked me about changing the pitch of a particular sound used for the engine of a boat. You can do that with CoreAudio (OS X).
You could code your own method / filter to go inside the IOProc function (if you are familiar with how CoreAudio works), or you could use an Audio Unit (AU) to post-process the sound in real-time.
aarku
2003.12.05, 04:43 PM
Check out SWSounds.c, part of SpriteWorld (http://www.spriteworld.org). It can very easily be modified for use outside of SpriteWorld. It is very solid code in my experience.
-Jon
skyhawk
2003.12.06, 12:47 AM
CocoaBlitz also has excellent sound manipulations (all done with CBMovie)
Frank C.
2003.12.06, 12:55 AM
FMOD (http://fmod.org) makes this sort of stuff _real_ easy (as long as the licensing works for you).
kelvin
2003.12.08, 01:38 AM
I should probably post the Volcanis code sometime...
Volcanis makes use of CBMovie by varying the rates of the impact sounds so they all sound different.
edit: If you'd like to download the source of just CBMovie, you can do that here (http://www.variableaspect.com/experiments/CocoaBlitz/CBMovie.zip).
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.