Skip to content

Commit 9554e3c

Browse files
committed
Merge pull request #38208 from Calinou/project-manager-use-dummy-audio-driver
Use the Dummy audio driver in the project manager
2 parents cd3c86d + da4683c commit 9554e3c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main/main.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
24992499

25002500
GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name());
25012501
if (audio_driver.is_empty()) { // Specified in project.godot.
2502-
audio_driver = GLOBAL_GET("audio/driver/driver");
2502+
if (project_manager) {
2503+
// The project manager doesn't need to play sound (TTS audio output is not emitted by Godot, but by the system itself).
2504+
// Disable audio output so it doesn't appear in the list of applications outputting sound in the OS.
2505+
// On macOS, this also prevents the project manager from inhibiting suspend.
2506+
audio_driver = "Dummy";
2507+
} else {
2508+
audio_driver = GLOBAL_GET("audio/driver/driver");
2509+
}
25032510
}
25042511

25052512
// Make sure that dummy is the last one, which it is assumed to be by design.

0 commit comments

Comments
 (0)