SystemSoundID soundID;
NSString *soundFile = [[NSBundle mainBundle]
pathForResource:@"deathsc" ofType:@"mp3"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)
[NSURL fileURLWithPath:soundFile], & soundID);
AudioServicesPlaySystemSound(soundID);
}
每当我在模拟器上运行这段代码时,它运行得很好(并且听起来很可怕),但是当我在iPad上运行时,游戏会冻结,如果我触摸屏幕,我会收到sigkill错误