I'm trying to develop a metronome for iPhone. I've tried using an NSTimer and Apples SoundEngine.h to play a tick, but it doesn't seem to be very accurate. I've seen several forums that Auido Queue can be used to create a more precise metronome. I haven't used Audio Queue before, but I've looked at "Audio Queue Services Programming Guide" and SpeakHere sample code. Still I don't have a clue as to how to generate sound data on the fly (as opposed to reading from a file) and play it using Audio Queue. Can somebody help me? I'd love to see a code sample or at least some pseudo code describing the steps to do the timing and feed audio data from a short audio clip to the Queues.
Thanks