发布于 2010-12-31 14:08:42
您可以使用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 secondhttps://stackoverflow.com/questions/3631353
复制相似问题