Search code examples
iphoneiosipadavfoundationavaudioplayer

Is AVAudioPlayer able to loop large audio files without an audible gap?


I have large looping background music files of up to 10 minutes length. The sounds are looped perfectly and if the player introduces no delay you would not notice where the loop point is.

Can AVAudioPlayer play them without that the user will hear a gap caused by latency or other problems with looping?


Solution

  • As long as you don't stop/start it at the end and you set numberOfLoops to a negative integer, it should work.