I want to make a custom loop that handles the tick of a timer. The loop will control the timing of when to play the ticks. I'm using the AVAudioPlayer so I can use things like "playAtTime." I can even use the "playerDidFinishPlaying" method for some of the sounds. But I want to overlap some of the sounds, so didFinishPlaying won't work. Essentially, I would like to play a certain set of sounds every 1 or 2 seconds, and precision is necessary.
I'm currently using NSTimer and NSDate for keeping track of the time. But I've noticed sometimes a skip, and skips could screw up the timing of my sounds. So I'm wondering if there's any way to run a loop that is based on time and not frames.
I'm currently using NSTimer and NSDate for keeping track of the time. But I've noticed sometimes a skip, and skips could screw up the timing of my sounds. So I'm wondering if there's any way to run a loop that is based on time and not frames.