1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Add "Mute Audio" button to Game view in editor

Update servers/audio_server.cpp

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Adam Scott <ascott.ca@gmail.com>

Fix a few lines for new member names

Add command-line argument `--debug-mute-audio`, and pass it to game if started with mute enabled

Apply suggestions from code review

Co-authored-by: arkology <43543909+arkology@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>

Fix icon for svgo
This commit is contained in:
Malcolm Anderson
2024-11-21 21:31:00 -08:00
parent 28102e6682
commit 6858607e74
12 changed files with 108 additions and 0 deletions

View File

@@ -52,6 +52,7 @@
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
#include "scene/theme/theme_db.h"
#include "servers/audio_server.h"
SceneDebugger::SceneDebugger() {
singleton = this;
@@ -150,6 +151,11 @@ Error SceneDebugger::parse_message(void *p_user, const String &p_msg, const Arra
} else if (p_msg == "next_frame") {
_next_frame();
} else if (p_msg == "debug_mute_audio") { // Enable/disable audio.
ERR_FAIL_COND_V(p_args.is_empty(), ERR_INVALID_DATA);
bool do_mute = p_args[0];
AudioServer::get_singleton()->set_debug_mute(do_mute);
} else if (p_msg == "override_cameras") { /// Camera
ERR_FAIL_COND_V(p_args.is_empty(), ERR_INVALID_DATA);
bool enable = p_args[0];