EOSVoiceChat.ChannelEchoEnabled
EOSVoiceChat.ChannelEchoEnabled
#Overview
name: EOSVoiceChat.ChannelEchoEnabled
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether channel echo should be enabled or not for testing with a single participant in the room (default false).
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of EOSVoiceChat.ChannelEchoEnabled is to enable channel echo for testing voice chat functionality with a single participant in a room. This setting is specifically designed for the EOS (Epic Online Services) Voice Chat system in Unreal Engine 5.
This setting variable is primarily used by the EOS Voice Chat plugin, which is part of the Online subsystem in Unreal Engine. It’s specifically utilized within the EOSVoiceChat module.
The value of this variable is set through a console variable (CVar) system, which allows developers to change its value at runtime for debugging and testing purposes. It’s defined as a TAutoConsoleVariable with a default value of false.
The associated variable CVarChannelEchoEnabled directly interacts with EOSVoiceChat.ChannelEchoEnabled. They share the same value and purpose.
Developers must be aware that this variable is only available in non-shipping builds (#if !UE_BUILD_SHIPPING). It’s intended for testing and debugging purposes and should not be used in production environments.
Best practices when using this variable include:
- Only use it for testing voice chat functionality, particularly when simulating multiple participants with a single user.
- Be cautious about enabling it in multiplayer testing scenarios, as it might create unexpected behavior.
- Remember to disable it before creating a shipping build, as it’s not available in release versions.
Regarding the associated variable CVarChannelEchoEnabled:
The purpose of CVarChannelEchoEnabled is the same as EOSVoiceChat.ChannelEchoEnabled - to control channel echo for testing purposes.
It’s used within the EOS Voice Chat system, specifically in the FEOSVoiceChatUser class when joining a channel.
The value is set through the console variable system and can be accessed using CVarChannelEchoEnabled.GetValueOnAnyThread().
It directly interacts with the EOS_RTC_JOINROOMFLAGS when joining a room, enabling echo if the channel type is Echo or if the console variable is set to true.
Developers should be aware that this variable affects the behavior of voice chat channels and should be used carefully during testing.
Best practices include using it in conjunction with the EVoiceChatChannelType::Echo for comprehensive echo testing, and ensuring it’s disabled for normal gameplay testing to avoid unexpected audio feedback.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:91
Scope: file
Source code excerpt:
#if !UE_BUILD_SHIPPING
static TAutoConsoleVariable<bool> CVarChannelEchoEnabled(
TEXT("EOSVoiceChat.ChannelEchoEnabled"),
false,
TEXT("Whether channel echo should be enabled or not for testing with a single participant in the room (default false)."));
#endif
FEOSVoiceChatUser::FEOSVoiceChatUser(FEOSVoiceChat& InEOSVoiceChat)
: EOSVoiceChat(InEOSVoiceChat)
#Associated Variable and Callsites
This variable is associated with another variable named CVarChannelEchoEnabled
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:90
Scope: file
Source code excerpt:
#if !UE_BUILD_SHIPPING
static TAutoConsoleVariable<bool> CVarChannelEchoEnabled(
TEXT("EOSVoiceChat.ChannelEchoEnabled"),
false,
TEXT("Whether channel echo should be enabled or not for testing with a single participant in the room (default false)."));
#endif
FEOSVoiceChatUser::FEOSVoiceChatUser(FEOSVoiceChat& InEOSVoiceChat)
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:587
Scope (from outer to inner):
file
function void FEOSVoiceChatUser::JoinChannel
Source code excerpt:
JoinOptions.ParticipantToken = Utf8ParticipantToken.Get();
#if !UE_BUILD_SHIPPING
const bool bEnableEcho = ChannelSession.ChannelType == EVoiceChatChannelType::Echo || CVarChannelEchoEnabled.GetValueOnAnyThread();
JoinOptions.Flags |= bEnableEcho ? EOS_RTC_JOINROOMFLAGS_ENABLE_ECHO : 0x0;
#endif
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(EOSVoiceChat);
QUICK_SCOPE_CYCLE_COUNTER(EOS_RTC_JoinRoom);
EOS_RTC_JoinRoom(GetRtcInterface(), &JoinOptions, this, &FEOSVoiceChatUser::OnJoinRoomStatic);
}