Version
menu

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);
    
    static int SetServerAudioRoute(
        GMEWWisePlugin_AudioRouteMode sendType,
        const FString& sendList,
        GMEWWisePlugin_AudioRouteMode recvType,
        const FString& recvList);
	static int GetServerAudioRoute(
        GMEWWisePlugin_AudioRouteMode& sendType,
        FString& sendListBuf,
        GMEWWisePlugin_AudioRouteMode& recvType,
        FString& recvListBuf);

	static int GetMicCount();
	static void GetMicList(DEV_INFO* name, int count);
	static void SelectMicDevice(int micId);
    static int GetCurrentMicDeviceInfo(DEV_INFO* pInfo);
};

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise