Skip to content

Commit 559812d

Browse files
authored
Disable voice chat with voice_chat_enabled=0 Pref (#2687)
* Disable voice chat with voice_chat_enabled=0 Pref EE's built-in voice chat can degrade all Bluetooth audio output on some Linux distros while EE is running and a headset with mic is connected, even if EE's built-in voice isn't sending or receiving voice data. For example, Fedora 40+ drops audio output from A2DP to HSP/HFP while EE is running. Add a Preferences File option to disable built-in voice chat. This setting defaults to 1 (enabled) and should not change the existing default state of EE's built-in voice chat. * Update src/main.cpp
1 parent d74f044 commit 559812d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,12 @@ int main(int argc, char** argv)
172172
// Since there is no way to access it (yet) via a touchscreen, compile out.
173173
#if !defined(ANDROID)
174174
// Set up voice chat and key bindings.
175-
NetworkAudioRecorder* nar = new NetworkAudioRecorder();
176-
nar->addKeyActivation(&keys.voice_all, 0);
177-
nar->addKeyActivation(&keys.voice_ship, 1);
175+
if (PreferencesManager::get("voice_chat_enabled", "0") == "1")
176+
{
177+
NetworkAudioRecorder* nar = new NetworkAudioRecorder();
178+
nar->addKeyActivation(&keys.voice_all, 0);
179+
nar->addKeyActivation(&keys.voice_ship, 1);
180+
}
178181
#endif
179182

180183
P<HardwareController> hardware_controller = new HardwareController();

0 commit comments

Comments
 (0)