Version
menu_open

Using the GME C++ API

You must call specific APIs before you use the GME service. The exposed C++ API calls are declared in the TencentGMEDevice.h file. These API calls are available to any game that depends on the TencentGME_Wwise module. For a description of each function, refer to Using the 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);
};

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise