连着真机调,没有发现异常啊
NSString *file = [[NSBundle mainBundle]pathForResource:@"right" ofType:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:file],&systemsoundID);
NSString *filewrong = [[NSBundle mainBundle]pathForResource:@"error" ofType:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:filewrong],&systemsoundID_wrong);对应的调试窗口
NSString *file = [[NSBundle mainBundle]pathForResource:@"right" ofType:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:file],&systemsoundID);
NSString *filewrong = [[NSBundle mainBundle]pathForResource:@"error" ofType:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:filewrong],&systemsoundID_wrong);对应的调试窗口
但是,我看网上也有其他人有这种现象:
http://www.cocoachina.com/bbs/read.php?tid-42803.html
无法解决,暂时放弃了,不用系统声音。换播放器。
加
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];