You mean "How to set AVAudioPlayer to repeat the sound?" I guess?
if so:
Note that the AVAudioPlayer class has a numberOfLoops property. If you set this property to a negative integer value when you play AVAudioPlayer , it will loop until it stops. You can set the number of loops you want to play by making numberOfLoops positive integer.
Hope this helps!
GoinAum Jul 24 2018-11-11T00: 00Z
source share