我遇到了GKVoiceChat的问题。整个音频设置都是在没有错误的情况下执行的,我可以用GKMatch对象成功创建GKVoiceChat对象。当我开始使用“开始”方法的语音聊天我语音聊天对象,控制台打印iOS:启动GKVoiceChat时发出的问题
AURemoteIO::Initialize failed: 'init' (enable 3, outf< 1 ch, 16000 Hz, 'lpcm' (0x0000002C) 16-bit little-endian signed integer, deinterleaved> inf< 1 ch, 16000 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer>)
谷歌没有透露任何关于此错误是有用的。有没有人遇到过这个,知道这里出了什么问题?在iPhone 4和iPad 2上表现相同。
编辑:其他发现:我还将AmbientSound属性设置为尊重其他音频(音乐,声音)的静音开关,并且这似乎是导致问题。当初始化音频服务时,我也在运行此代码:
SInt32 ambient = kAudioSessionCategory_SoloAmbientSound;
if (AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (ambient), &ambient)) {
NSLog(@"Error setting ambient property");
}
当我对此进行评论时,语音聊天运行良好。然而,静音开关不再受到尊重。
我该怎么做?
感谢,habitoti