博客> 解决AudioServicesPlaySystemSound真机播放无声音
解决AudioServicesPlaySystemSound真机播放无声音
2018-12-13 10:04 评论:0 阅读:696 郭鹏飞
ios 审核 Store 被拒。App appreview

NSURL *soundURL_other = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"a" ofType:@"wav"]]; OSStatus err_ohter = AudioServicesCreateSystemSoundID((__bridge CFURLRef)soundURL_other,&receiveSound_other); if (err_ohter != kAudioServicesNoError) NSLog(@"Could not load %@, error code: %d", soundURL_other, (int)err_ohter); AudioServicesPlaySystemSound(receiveSound_other); 使用此方法播放声音的时候没有声音,在设置 - 声音 - 把铃声音量调大,再试下

收藏
0
sina weixin mail 回到顶部