I\'m trying to eliminate startup lag when playing a (very short -- less than 2 seconds) audio file via AVAudioPlayer on the iPhone.
First, the code:
Other workaround is to create a short & silent audio and play it on the first time player is initiated.
If you dont want to create a new sound file yourself, you may download a short & silent audio file here : https://www.dropbox.com/s/3u45x9v72ic70tk/silent.m4a?dl=0