views:

33

answers:

1

Basically I'm writing a metronome app, but I'm using a sound file that, depending on the BPM, might not be finished playing when the "play" method is called again. For example, if the sound file is 0.5 seconds long, but the BPM is 200, the "play" method needs to be called every 0.3 seconds.

I'm not overly familiar with NSTimer, but it appears that if it is supposed to fire before the previous invocation has completed, it doesn't, and just waits for the next time around. I could be completely wrong about that though.

What I need to do is have the previous invocation end prematurely, and have the "play" method called again when the time is supposed to fire.

Any help would be appreciated!

+1  A: 

Check out the CocosDension part of cocos2d for iPhone - it's made all my audio requirements a breeze.

adam