版本
您必须在使用 GME 服务前调用特定的 API。暴露的 C++ API 调用在 TencentGMEDevice.h
文件中声明。这些 API 调用适用于所有依赖 TencentGME_Wwise 模块的游戏。有关各项函数的说明,请参阅使用 GME In-Game Voice Chat API 章节。
class TENCENTGME_WWISE_API FTencentGMEDevice { public: static FString GetGMEVersion(); static void SetUserID(const FString& userID); static void SetRoomID(const FString& roomID); static void ReceivePlugin_SetReceiveOpenIDWithGameObjectID( AkGameObjectID gameObjectID, const FString& userID); static void ReceivePlugin_GetReceiveOpenIDWithGameObjectID( AkGameObjectID gameObjectID, FString& userID); static void SendPlugin_EnableLoopbackWithGameObjectID( AkGameObjectID gameObjectID, bool enableLoopback); static bool SendPlugin_GetEnableLoopbackWithGameObjectID( AkGameObjectID gameObjectID); static void SetRegion(GMEWWisePlugin_Region region); static void SetAudioStreamProfile(GMEWWisePlugin_STREAMPROIFLE profile); static void SetLogLevel( GMEWWisePlugin_LogLevel logLevelWrite, GMEWWisePlugin_LogLevel logLevelPrint); static void GMEPause(); static void GMEResume(); static int GetAudioSendStreamLevel(); static int GetAudioRecvStreamLevel(const FString& targetID); static void AddAudioBlockList(const FString& targetID); static void RemoveAudioBlockList(const FString& targetID); static void EnableBluetoothMic(bool enable); static void SetRangeAudioTeamID(int teamID); static void SetRangeAudioTeamMode(GMEWWisePlugin_TeamMode teamMode); static void SetRangeAudioRecvRange(int range); static void SetSelfPosition(int positionX, int positionY, int positionZ); static int StartRecording(const FString& fileid); static int StopRecording(); static int PlayRecordFile(const FString& fileid); static int StopPlayFile(); static int SpeechToText( const FString& fileid, const FString& speechLanguage, const FString& translateLanguage); static int GetVoiceFileDuration(const FString& fileid); static int GetMessage( int& localUTCTime, int& messageType, int& code, FString& message1, FString& message2); };