tags:

views:

103

answers:

1

Im working on a new game and i'm done but i just need to add some looping music, i have the sound file i want to loop, called theme.m4a How would you loop the music to play forever

Thank you!

+1  A: 

Look at the Core Audio Reference this may help. AVAudioPlayerReference

When you get that just use the property:

@property NSInteger numberOfLoops;

Any negetive integer will infinitely loop it, 0 will play it once, and 1 will play it twice, etc.

Jaba