Objective c AVAudioPlayer在Ipod Touch 4g中正常播放音频,但在Ipad、Ipad2中却无法正常播放,为什么?

Objective c AVAudioPlayer在Ipod Touch 4g中正常播放音频,但在Ipad、Ipad2中却无法正常播放,为什么?,objective-c,ios,ipod-touch,Objective C,Ios,Ipod Touch,这是我的密码: NSError *error; NSString* path = [[NSBundle mainBundle] pathForResource:[settings alarmAudioName] ofType:@"mp3"]; NSLog(@"%@",path); audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; NSLog(@"

这是我的密码:

NSError *error;
NSString* path = [[NSBundle mainBundle] pathForResource:[settings alarmAudioName] ofType:@"mp3"];
NSLog(@"%@",path);
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
NSLog(@"%@",[NSURL fileURLWithPath:path]);
if (audioPlayer == nil) 
    NSLog(@"%@", [error description]);
else
{
    [audioPlayer prepareToPlay];
    [audioPlayer play];
    NSLog(@"Should have been played");
}
NSLog:

/var/mobile/Applications/9B5B4E10-A936-4D90-8CBE-17854A0B22F7/SSCA Development.app/Song 1.mp3
file://localhost/var/mobile/Applications/9B5B4E10-A936-4D90-8CBE-17854A0B22F7/SSCA%20Development.app/Song%201.mp3
它在iPodtouch4G中工作正常,但在Ipad、Ipad2中却不工作,为什么

谢谢你的回答