Ответ 1
Вы можете использовать AVAudioPlayer
:
NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"mySound" ofType:@"mp3"];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:nil];
player.numberOfLoops = -1; //infinite
[player play];
и вы можете перепрыгнуть, установив currentTime
:
player.currentTime = 10; //jump to 10th second