Scrubbing the audio... is that possible?
Hi, I am doing a game where I have to move boxes on the iphone screen. What I am tring to do is to play a sound while the user is pushing the box and stop the sound when the user stops pushing.
Here is the problem.
I have an audio file that can be put in loop to last the time that is needed, I mean, to be played as long as the user keeps pushing the box.
As playing the sound and moving the box on the same thread freezes the game I have done it on another thread. But I do not like the result. Even working correctly the sound seems to be not syncrhonized with the box movement.
What I need is a kind of scrub on the audio. Imagine using an audio editing program and going forward and back on an audio file, manually, and listening the sound as you move the slider. I mean, listening the sound on the speed you are scrubbing (i.e. moving the slider).
In other words... playing the audio at different speeds and stopping as soon as the user stops sliding.
Any ideas on how to do that?
Last edited by LunarMoon; 01-28-2009 at 02:48 PM.
|