我试过AVAudioPlayer它不起作用。
url= [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/test.mid", [[NSBundle mainBundle] resourcePath]]];
NSLog(@"URL Description is %@",[url description]);
NSError *error=nil;
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
if (error!=nil) {
NSLog(@"Error is %@",[error localizedDescription]);
}
[audioPlayer play];
我收到此错误
Error is The operation couldn’t be completed. (OSStatus error 1954115647.)
我应该使用其他方法吗?有什么建议吗?
由于
答案 0 :(得分:1)
ios 5上的MusicPlayer + MusicSequence
答案 1 :(得分:0)