Professional Documents
Culture Documents
Contents
Version information 3
Known Issues 3
Overview 4
Product Introduction 4
Platform Support 4
Using GME Voice Communication Service 4
GME Plug-in Installation 4
GME Integration in Wwise 5
Authoring Tool 6
GME Plugin Introduction 6
Master-Mixer Hierarchy Setup 6
GME Authentication Information and Chat Room Parameters Setup 6
Setting up GME for Voice Chat – Sending and Receiving 7
Sending Discreet Audio Signal 7
Sending Mixed Audio as a Single Chat Stream 9
Using the GME Plug-in to Receive Voice 10
Closing the Loop - Listening and Talking Simultaneously 11
Creative Voice Chat Integration Possibilities 11
Prepping the Wwise Project to Run in your Game 12
Create the Events 12
Generate the SoundBank 13
Unity Integration 27
Prerequisite 27
SDK Package 27
Integration 27
GME C# API 28
Build and Run 30
Reference Sample Game 30
Demo game setup 30
UE4 Integration 33
Prerequisite 33
SDK Package 33
Integration 33
GME API for C++ Project 35
GME API for Blueprint Project 35
Reference Sample Game 36
2018.1 2018.1.0
2019.1 2019.1.0
Known Issues
The following issues are known to affect the current version of the plug-in. Before using the
plug-in, make sure you are aware of these issues to evaluate how they can affect your
product.
● WG-45276: Tencent GME Unreal: Plug-in not found error at SoundEngine init.
Note: T his error is harmless, and the plug-in will still be functional.
● WG-46754: GME does not work with Xbox One's proprietary controller headset.
Note: GME works with any standard headset connected to the jack port of the Xbox
One controller
● WG-46843: Wwise profiler interrupts GME on macOS
WG-46845: The Tencent GME plug-in is not automatically added to the Xcode
project for iOS.
● WG-47031: Tencent GME plugin-in performance issues in Wwise Authoring on
macOS Mojave
● WG-47099: Tencent GME plug-in crash on Mac with Wwise 2018.1
At the moment, the Wwise Authoring for macOS does not support the GME plug-in. The
issue does not affect the Sound Engine part of the plug-in: games built on macOS with GME
work as expected.
1. GME captures the microphone input form the OS and applies noise reduction and
echo cancellation. Echo cancellation needs the final rendered audio to operate. This
is provided by the GME audio device plug-in (#10).
2. The local player’s voice chat source is sent to teammates through GME servers.
Audio effects can optionally be applied.
3. Any other game audio source such as music, ambient sounds, SFX, etc. can also be
sent to GME servers.
4. Voice activity detection and encoding optimizes network bandwidth.
5. The GME media server receives voice chat and redirects individual streams to the
proper receivers.
6. The incoming voices from the GME servers are received and managed, prior to their
decompression into PCM audio.
7. Incoming voice chat is assigned to independent sound instances, which allows for
additional DSP, distance attenuation, positioning, etc.
8. Voice chat can be mixed as a single audio input stream when desired.
9. All sounds, except audio received from GME servers, are locally triggered by the
game.
10. The final audio mix is rendered by the GME audio device plug-in, which is necessary
for echo cancellation (#1).
The GME Send source plug-in receives its audio from the device’s microphone, as set
in the operating system of your computer. There are no settings associated with this
source plug-in. Now, in order to have the GME Send sound send its audio to the
other players in the same room using the GME servers, we must configure the GME
Send effect plug-in.
3. On the GME Send sound, select the Effects tab, and insert the GME Send effect
plug-in in the last effect slot. Adding the effect on the last slot is not mandatory, but
it allows us to insert other effects prior to sending the acquired audio to the server,
if necessary.
Note that the GME Send effect plug-in “steals” the audio from Wwise and sends it to
the other players. The speaking player never hears his or her own voice in the final
game mix.
That’s it! You’re now set up to send audio from your system to other players in the same
chat room (assuming you set the same Authentication Key, Room ID, but a different User ID
on the Tencent GME audio device, as previously described).
Sending Mixed Audio as a Single Chat Stream
There are situations where various sources may need to be mixed into a single “chat” signal
before being sent to the other players in the chat room. For instance, if a game supports
having one of the players act as the DJ for the rest of the group. In this situation, the music
may come from many different sources, so it is best to set the GME Send effect plug-in to a
bus instead of to each individual music file. Here’s an easy way to achieve this:
1. Create a new “top” bus in the Master-Mixer Hierarchy, by right-clicking on the
Default Work Unit, and selecting New Child – Bus. Name it: GME Send Bus.
2. Select the GME Send Bus, click the Effects tab in the Property Editor, and insert the
GME Send effect plug-in on the last effect slot, as shown in Figure 7. Adding the
effect on the last slot is not mandatory, but it allows us to insert other effects prior
3. Any audio object routed to the GME Send Bus (or to a child of this bus) is mixed with
the other concurrent sounds, which are routed to the same bus before being sent to
GME and received by the other players. To send audio to the GME Send Bus, simply
modify the Output Bus routing to the GME Send Bus on your sounds or containers
from the General Settings tab, as shown on Figure 8.
3. Select the GME Receive sound to load it in the Transport and click the play button. If
there are other players in the room, you should hear them as well.
[Add Snapshot]
Closing the Loop - Listening and Talking Simultaneously
To be able to speak and listen to everybody in the chat room, you need to have both GME
Send and GME Receive sounds (or events targeting these sounds, as shown in Figure 10) play
back. The easiest way to accomplish this is by dropping and playing both sounds in a
Soundcaster session.
For voice sending operations, the following four events may be created:
Event name Description
Play_GME_Send To start sending voice
Stop_GME_Send To stop sending voice
Pause_GME_Send To pause sending voice
Resume_GME_Send To resume sending voice
Copy the header files, the dynamic libraries and the Java library to the Android project
directory. The gmesdk.jar should be placed in the libs folder, which is generated after the
Android native code is compiled. Figure 11 shows the reference structure of the libs folder:
In the Android.mk file, include the directories and dependency libraries of the GME SDK. Use
the following pseudo Andorid.mk content for reference:
include $(CLEAR_VARS)
LOCAL_MODULE := libgmesdk
LOCAL_SRC_FILES :=
$(LOCAL_PATH)/../GME_SDK/Android_$(APP_ABI)/$(CONFIGURATION)/bin/GME_PLUGIN/libgmes
dk.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := TencentGME
LOCAL_SRC_FILES :=
$(LOCAL_PATH)/../GME_SDK/Android_$(APP_ABI)/$(CONFIGURATION)/lib/libTencentGME.a
include $(PREBUILT_STATIC_LIBRARY)
…
include ($CLEAR_VARS)
…
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../GME_SDK/include
LOCAL_SHARED_LIBRARIES += libgmesdk
LOCAL_STATIC_LIBRARIES += TencentGME
…
include $(BUILD_SHARED_LIBRARY)
From the location of the Application Java source code, call the following Java codes to pass
Application Context to GME:
Copy the header files and libraries to the Xcode project directory. From the Xcode project
build settings, adjust the settings for the Include directories and dependency libraries of the
SDK. Figure 12 (below) shows the dependency libraries to add:
The Bitcode setting should be disabled in the Xcode project, as it’s not supported by the
GME SDK. To disable Bitcode, look for Bitcode under Targets -> Build Settings and set the
corresponding option to NO.
Figure 13
<Capabilities>
<Capability Name=”internetClient” / >
<mx:Capability Name=”kinectAudio” />
<mx:Capability Name=”kinectGamechat” />
</Capabilities>
The game code needs to call extra API functions in order to pass all of the necessary data to
the GME plug-ins. These API functions are declared in the header file TencentGMEPlugin.h.
The following section provides a description of the GME Plug-in API for Wwise.
General Settings
/**
* @brief Set the local user ID, used as a voice ID for other clients.
* Each GME user must have a unique identifier.
* This function must be called before posting events sending or receiving to GME
servers.
* @param[in] openID The identifier of the local GME user.
* The value is a 64-bit integer data and should be greater than 10000. It needs to be
* converted into character type.
*/
void GMEWWisePlugin_SetUserID(c onst char* o penID) ;
/**
* @brief Set the GME chatting room ID.
* This function must be called before posting events sending or receiving to GME
servers.
* Setting a new roomID will not affect already playing voices.
* @param[in] roomID A lphanumeric character string of up to 127 characters identifying a
* GME chatting room.
*/
void GMEWWisePlugin_SetRoomID(const char* roomID) ;
/**
* @brief S et the mapping between a Wwise game object ID and a GME voice ID
* corresponding to a user. A mapping between gameObjectID and voiceID is used
* by GME to decide whether a GME Receive plug-in instance should play a
* specific voiceID or, if there is no mapping, the mix of all voice streams within
* the currently set roomID.
* @param[in] gameObjectID The gameObjectID allocated in the game.
* @param[in] voiceID The voice ID of the GME user. Passing NULL or “” (empty string)
* clears a previously set mapping.
*/
void GMEWWisePlugin_ReceivePlugin_SetReceiveOpenIDWithGameObjectID(
AkUInt64 g ameObjectID,
const c har* voiceID
);
/**
* @brief Get the mapping between a Wwise game object ID and a GME voice ID
* corresponding to a user.
* @param[in] gameObjectID The gameObjectID allocated in the game.
* @param[out] voiceID User-allocated character buffer of maximum size specified by
maxlen.
* The v oiceID mapped to the g
ameObjectID will be copied to the buffer if one exists.
* @param[in] maxlen The maximum size of the character buffer voiceID.
*/
void GMEWWisePlugin_ReceivePlugin_GetReceiveOpenIDWithGameObjectID(
AkUInt64 g ameObjectID,
char* voiceID,
int m
axlen
);
/**
* @brief Enable or disable audio loopback. Loopback controls if sound related to the
* specified game object is routed back to Wwise to be played on the local device.
* The audio is always sent to the server, but will only be played locally if loopback
* is enabled.
* @param[in] gameObjectID The gameObjectID allocated in the game.
* @param[in] enableLoopback Loopback flag value.
*/
void GMEWWisePlugin_SendPlugin_EnableLoopbackWithGameObjectID(
AkUInt64 g ameObjectID,
bool e nableLoopback
);
/**
* @brief Get the loopback status. Retrieve whether loopback is enabled or disabled for
* a given game object. Loopback controls if sound posted on the specified game
* object is routed back to Wwise to be played on the local device.
* The audio is always sent to the server, but will only be played locally if loopback
* is enabled.
* @param[in] gameObjectID The gameObjectID allocated in the game.
* @return The loopback status.
*/
MEWWisePlugin_SendPlugin_GetEnableLoopbackWithGameObjectID(
bool G
AkUInt64 g
ameObjectID
);
The screenshots below are the two main user interfaces of the GME demo running on
Windows. In this document, only the controls for the Windows platform are described.
However, controls for other platforms are similar.
Figure 15 - Shows the voice receiving and voice sending related functions
%WWISEROOT%\SDK\samples\Plugins\TencentGME\IntegrationDemo
Windows
Solutions for Visual Studio 2015 (IntegrationDemo_Windows_vc140.sln) and Visual Studio
2017 (IntegrationDemo_Windows_vc150.sln) are provided in the Windows directory.
You may need to change the Windows SDK version you wish to target with one you have
installed. To do so, in Visual Studio, right-click on the project in the Solution Explorer and in
the “General” section, set the “Windows SDK Version” to your available version.
The minimum required version is 10.0.17763.0.
Android
A script “Build.cmd” is provided in the Android directory. Its usage is as follows:
PS4
A Visual Studio 2015 solution (IntegrationDemo_PS4_vc140.sln) is provided in the PS4
directory. You must have previously built the PS4 sample utilities project provided by the PS4
SDK. You can find the sample utilities in:
<PS4 SDK>\target\samples\sample_code\
common\source\sampleutil\libSceSampleUtil.sln
Xbox One
A Visual Studio 2015 solution (IntegrationDemo_XboxOne_vc140.sln) is provided in the
XboxOne directory.
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
In the Wwise project, create new send and receive points, as described in the GME Wwise
Integration Demo section of this document , and add the relevant GME events to a
SoundBank.
SDK Package
The GME integration SDK is a collection of resources, which include prebuilt plug-in libraries
for each platform, the GME C# layer API, and reference build scripts. To help with the GME
integration, a sample game is available to download to help you understand how to use
GME in a Unity project. After installing the Tencent GME plug-in through the Wwise
Launcher, the sample game is found in
<WWISE_INSTALL_PATH>/SDK/plugins/TencentGME/Unity/GMEWwiseDemo. Note that it is
necessary to integrate Wwise into the Unity project, using the Wwise Launcher.
The GME SDK package for Unity is installed when installing the Tencent GME plug-in from
the Wwise Launcher. The SDK has been tested on Windows, Android, iOS, macOS, Xbox One
and PS4.
Integration
After installing the Tencent GME plug-in from the Wwise Launcher, integrate Wwise into
your Unity project, using the Unity tab in the Wwise Launcher. If you have already integrated
Wwise to your Unity project, use the Wwise Launcher to modify your Unity integration. This
copies the newly installed GME plugins to your Unity project.
Once the integration process is complete , navigate to the Wwise installation folder:
The various native plugins for each platform supported by the GME integration should have
been copied in the platform’s DSP folder. For all platforms except iOS, the plug-in is
The Wwise-GME Unity integration requires specific settings for Android and iOS:
iOS: When building for iOS, Unity generates an Xcode project. In order to link the GME
plug-in library, some settings must be changed in the Xcode project. The reference code for
doing these configurations can be found in the following file:
Assets/Editor/iosProjectScript.cs.
The settings can be divided into three categories, the pseudo code is as follows:
Important Because of a known issue, after building the game, you need to add
libTencentGMEPlugin.a to the additional libraries in Xcode. Otherwise, the build will fail due
to missing external symbols.
Note: The Wwise project provided was created with Wwise 2019.1. While the required
banks are provided for each platform, it is strongly suggested to use Wwise 2019.1 for
testing the reference sample game.
The GME Unity SDK is bundled with a sample game to help you understand how to use GME
in a Unity project. It is located in:
<WWISE_INSTALL_PATH>/SDK/plugins/TencentGME/Unity/GMEWwiseDem
o
Make a copy of the project to a location where your user has write access, e.g.,
C:/Users/<YourUser>. The demo game requires Wwise to be integrated using the Launcher
to copy the Wwise SDK with the Tencent GME plug-in. Refer to the Wwise Unity Integration
documentation.
First, copy the Wwise project provided for the GME Integration Demo next to the demo
game. It is located in:
<WWISE_INSTALL_PATH>/SDK/samples/Plugins/TencentGME/
IntegrationDemo/WwiseProject
Next, set the paths to the Wwise project and your Wwise installation in the Wwise settings
(Edit > Wwise Settings…). The settings should look something like this:
Then, copy the GeneratedSoundBanks directory from the GME Integration Demo Wwise
<UNITY_PROJECT>/Assets/StreamingAssets/Audio
Finally, set events and SoundBank elements from Wwise project into Unity components.
The Main Scene has a set of checkboxes for posting events. They are controlled by the Main
Scene script component on the Canvas object: set them as follows:
Note: If the events do not appear, the Wwise project may not have been read by Unity yet.
You can force a refresh by clicking the “Refresh Project” button in the Wwise Picker window
(Window > Wwise Picker).
The Main Camera in the AuthScene has a script allowing you to set the SoundBank to load at
initialization: set to to the GME bank:
There are two scenes, the first one shows how to set the GME initial parameters, the second
one shows the GME features. The related source files can be found in the following
locations:
● Demo scenes: Assets\Scenes
● Demo scripts: Assets\Scripts
AuthScene.cs provides a facility to specify the OpenID and the RoomID for the session.
In the Wwise project, create new send and receive points as described in the GME Wwise
Integration Demo section of this document, and add the relevant GME events to a
SoundBank.
SDK Package
The GME integration SDK acts both as an Unreal plug-in and as a Wwise plug-in at the same
time. It includes prebuilt plug-in libraries for each platform, build scripts and the API
functions. To facilitate the GME integration, a sample game is available to download to help
you understand how to use GME in an Unreal project. After installing the TencentGME
plug-in through the Wwise Launcher, the sample game is found in
<WWISE_INSTALL_PATH>/SDK/plugins/TencentGME/Unreal/GMEWwiseDemo. Note that it
is necessary to integrate Wwise into the Unreal project, using the Wwise Launcher.
The GME SDK package for Unreal is installed when installing the Tencent GME plug-in from
the Wwise Launcher. The SDK has been tested on Windows, Android, iOS, macOS, Xbox One
and PS4.
Integration
After installing the Tencent GME plug-in from the Wwise Launcher, integrate Wwise to your
Unreal project using the Unreal Engine tab in the Wwise Launcher. If you have already
integrated Wwise to your Unreal project, you can skip this step.
Once the integration process is done, navigate to the Wwise installation folder:
GME prebuilt plug-in libraries for different platform targets must be placed in the specified
locations of the TencentGME_Wwise plugin-in “ThirdParty” folder. The naming style and the
The TencentGME_Wwise module must be linked by the game C++ project. In the game
project module file (eg. GMEWWiseDemo.Build.cs), add the GME plug-in dependency as
follows:
PublicDependencyModuleNames.AddRange(new string[]
{
"Core",
"CoreUObject",
"Engine",
"InputCore",
"HeadMountedDisplay",
"AkAudio",
"TencentGME_Wwise"
});
}
}
UCLASS()
class TENCENTGME_WWISE_API UTencentGMEBlueprintLibrary : public
UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "TencentGME")
static void SetUserID(const FString& openID);
private:
static class UAkComponent* GetAkComponentFromActor(class AActor* Actor);
};
HomeViewController.cpp is the main C++ file to trigger the GME related Wwise events to
enable for voice chat.