2012-01-22 3 views
1

Я пробовал AVAudioPlayer, он не работает.Как я могу воспроизвести файл .mid на устройстве iOS

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.) 

Должен ли я использовать другой способ сделать это? Какие-либо предложения?

Благодаря

ответ

1

MusicPlayer + MusicSequence КСН 5

+0

Спасибо! Будет ли он работать на iOS 4? – user667673

+0

извините, нет. он был введен в ios 5. – justin