首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >GVoice在Windows(Unity)下麦不起作用?

GVoice在Windows(Unity)下麦不起作用?

提问于 2019-09-16 17:22:30
回答 0关注 0查看 217

GetMicState 返回-1

if (m_VoiceEngine == null)

{

m_VoiceEngine = IGCloudVoice.GCloudVoice.GetEngine();

if (m_VoiceEngine != null)

{

Int32 unixTimestamp =

(Int32)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;

string strTime = unixTimestamp.ToString();

string AppID = "1387222982";// "gcloud.test";

string AppKey = "248d3c4f18c77b4339d8b1c39a77ba2d";// "test_key";

string UserID = strTime;

int result = m_VoiceEngine.SetAppInfo(AppID, AppKey, UserID);

if (GCloudVoiceErr.GCLOUD_VOICE_SUCC != (GCloudVoiceErr)result)

{

Debug.Log("GVoice SetAppInfo fail");

return;

}

int ret = m_VoiceEngine.Init();

m_VoiceEngine.EnableLog(true);

if (GCloudVoiceErr.GCLOUD_VOICE_SUCC != (GCloudVoiceErr)ret)

{

Debug.LogError("GVoice Init fail");

MsgText.text = "GVoice Init fail";

return;

}

ret = m_VoiceEngine.TestMic();

if (GCloudVoiceErr.GCLOUD_VOICE_SUCC != (GCloudVoiceErr)ret)

{

Debug.LogError("TestMic fail");

MsgText.text = "TestMic fail";

return;

}

ret = m_VoiceEngine.GetMicLevel();

ret = m_VoiceEngine.GetMicState();

m_VoiceEngine.SetMode(GCloudVoiceMode.Messages);

ret = m_VoiceEngine.GetMicState();

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档