1
AVAudioPlayer * myExampleSound;如何播放音乐,以便在结束后自动播放音乐?
NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"];
myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL];
myExampleSound.delegate = self;
[myExampleSound play];
如何播放myExampleSound,使其在结束后自动重播? 我正在使用上面的代码。
请人帮忙。