I need to play an audio clip in mp3 format and synchronize something in my app with the audio being played. What audio tools in the iPhone SDK should I use to allow me to know exactly when the selected sound starts to play?
Sometimes with AVAudioPlayer I notice that when a sound starts to play there is a slight delay from when I command the player to play, and when I actually hear the sound (I’m guessing it’s loading the sound during that time). There is no ‘ready to play’ delegate methods that I can find for AVAudioPlayer.
Any suggestions/pointers appreciated.
to get accurate synchronization of your audio playback, you’ll need to use Audio Queue Services. It’s a C interface offering finer-grained control of audio. I won’t be able to tell you exactly how to sync up because I’ve no experience with that aspect of it, maybe someone else can help. But if you look at the docs hopefully that will steer you in the right direction.