EOSVoiceChat.FakeAudioInputEnabled
EOSVoiceChat.FakeAudioInputEnabled
#Overview
name: EOSVoiceChat.FakeAudioInputEnabled
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether Fake Audio input is enabled or not.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of EOSVoiceChat.FakeAudioInputEnabled is to control whether fake audio input is enabled or not in the EOS Voice Chat system. This setting is primarily used for testing and debugging purposes in the voice chat functionality of Unreal Engine.
This setting variable is used within the EOSVoiceChat plugin, which is part of the Online subsystem in Unreal Engine. Specifically, it is utilized in the EOSVoiceChatUser module.
The value of this variable is set through a console variable (CVar) named CVarFakeAudioInputEnabled. It is initialized with a default value of false, indicating that fake audio input is disabled by default.
The associated variable CVarFakeAudioInputEnabled interacts directly with EOSVoiceChat.FakeAudioInputEnabled. They share the same value and purpose.
Developers must be aware that this variable is primarily intended for testing and debugging. It should not be enabled in production builds or shipping versions of the game. The variable is only accessible in non-shipping builds, as evidenced by the #if !UE_BUILD_SHIPPING
conditional compilation directive.
Best practices when using this variable include:
- Only enable it during development and testing phases.
- Ensure it is disabled before building for release.
- Use it in conjunction with other debugging tools to isolate and resolve voice chat issues.
- Document any changes made to this setting to maintain consistency across the development team.
Regarding the associated variable CVarFakeAudioInputEnabled:
- It is an instance of TAutoConsoleVariable
, which allows for runtime modification of the setting. - Its value is retrieved using the GetValueOnAnyThread() method in various parts of the code, particularly when joining channels or adding lobby rooms.
- When its value changes, the code calls ApplyAudioInputOptions() to reapply audio options based on the new CVar properties.
- Developers should be cautious when modifying this variable at runtime, as it may affect ongoing voice chat sessions.
#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:85
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarFakeAudioInputEnabled(
TEXT("EOSVoiceChat.FakeAudioInputEnabled"),
false,
TEXT("Whether Fake Audio input is enabled or not."));
#if !UE_BUILD_SHIPPING
static TAutoConsoleVariable<bool> CVarChannelEchoEnabled(
TEXT("EOSVoiceChat.ChannelEchoEnabled"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarFakeAudioInputEnabled
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:84
Scope: file
Source code excerpt:
}
static TAutoConsoleVariable<bool> CVarFakeAudioInputEnabled(
TEXT("EOSVoiceChat.FakeAudioInputEnabled"),
false,
TEXT("Whether Fake Audio input is enabled or not."));
#if !UE_BUILD_SHIPPING
static TAutoConsoleVariable<bool> CVarChannelEchoEnabled(
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:564
Scope (from outer to inner):
file
function void FEOSVoiceChatUser::JoinChannel
Source code excerpt:
ChannelSession.JoinDelegate = Delegate;
bFakeAudioInput = CVarFakeAudioInputEnabled.GetValueOnAnyThread();
ApplyAudioInputOptions(); // Reapply audio options based on CVar properties
BindChannelCallbacks(ChannelSession);
ApplySendingOptions(ChannelSession);
ApplyReceivingOptions(ChannelSession);
#Loc: <Workspace>/Engine/Plugins/Online/VoiceChat/EOSVoiceChat/Source/EOSVoiceChat/Private/EOSVoiceChatUser.cpp:935
Scope (from outer to inner):
file
function bool FEOSVoiceChatUser::AddLobbyRoom
Source code excerpt:
LoginSession.LobbyIdToChannelName.Emplace(ChannelSession.LobbyId, ChannelSession.ChannelName);
bFakeAudioInput = CVarFakeAudioInputEnabled.GetValueOnAnyThread();
ApplyAudioInputOptions(); // Reapply audio options based on CVar properties
BindChannelCallbacks(ChannelSession);
ApplySendingOptions(ChannelSession);
// Call UpdateReceiving once to set the default receiving state for all participants