系统声音服务可在模拟器上运行,但不适用于iPad

时间:2011-07-27 11:57:30

标签: ipad audiotoolbox

- (void)viewDidLoad {

SystemSoundID ReelStopSound;
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"spin" ofType:@"mp3" ];
CFURLRef soundURL = (CFURLRef)[NSURL fileURLWithPath:soundPath];
AudioServicesCreateSystemSoundID(soundURL, &ReelStopSound);
AudioServicesPlaySystemSound(ReelStopSound);    
[super viewDidLoad];
}

当我在模拟器中运行这个应用程序时,它会播放spin.mp3,但在我的iPad中它不是!!

0 个答案:

没有答案