Play Sound

iPhone SDK Tips & Tricks

AVAudioPlayer *backgroundPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Fishtank_Bubbles-SoundBibleco-amanda-1550139304-attribution3" ofType:@"wav"]] error:nil];
[backgroundPlayer setNumberOfLoops:-1];
[backgroundPlayer play];