我正在尝试在我的项目中使用 Agora.io 语音聊天模块,由于他们的 tuto,我已经设法实现了语音,但我似乎找不到添加音频空间化的方法。我尝试使用一些函数:SetRemoteVoicePosition((和EnableSoundPositionIndication((,但它不起作用。
void Update()
{
mRtcEngine.GetAudioEffectManager().SetRemoteVoicePosition(17, 0, 80);
}
public void JoinChannel()
{
string channelName = mChannelNameInputField.text.Trim();
Debug.Log(string.Format("tap joinChannel with channel name {0}", channelName));
if (string.IsNullOrEmpty(channelName))
{
return;
}
mRtcEngine.EnableSoundPositionIndication(true);
//mRtcEngine.GetAudioEffectManager().SetRemoteVoicePosition(17, 0, 80);
mRtcEngine.JoinChannel(channelName, "extra", 7);
}
如果有人能帮助我了解我没有做错或做错了什么,那就太好了!
你可以看看这个 GitHub 项目的例子作为参考:
https://github.com/AgoraIO/Voice-Call-for-Mobile-Gaming/tree/master/Advanced-Voice-Call-for-Gaming/Spacewar-with-AMG-Voice-SDK-Unity