Skip to content

Commit

Permalink
Merge pull request #91141 from kus04e4ek/earbuds-you-had-one-job
Browse files Browse the repository at this point in the history
Don't ignore `audio/driver/output_latency.web`
  • Loading branch information
akien-mga committed Apr 25, 2024
2 parents 50a38cd + 1e8eff8 commit 780e1a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2341,10 +2341,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Engine::get_singleton()->set_max_physics_steps_per_frame(GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "physics/common/max_physics_steps_per_frame", PROPERTY_HINT_RANGE, "1,100,1"), 8));
Engine::get_singleton()->set_physics_jitter_fix(GLOBAL_DEF("physics/common/physics_jitter_fix", 0.5));
Engine::get_singleton()->set_max_fps(GLOBAL_DEF(PropertyInfo(Variant::INT, "application/run/max_fps", PROPERTY_HINT_RANGE, "0,1000,1"), 0));
Engine::get_singleton()->set_audio_output_latency(GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "audio/driver/output_latency", PROPERTY_HINT_RANGE, "1,100,1"), 15));

GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "audio/driver/output_latency", PROPERTY_HINT_RANGE, "1,100,1"), 15);
// Use a safer default output_latency for web to avoid audio cracking on low-end devices, especially mobile.
GLOBAL_DEF_RST("audio/driver/output_latency.web", 50);

Engine::get_singleton()->set_audio_output_latency(GLOBAL_GET("audio/driver/output_latency"));

GLOBAL_DEF("debug/settings/stdout/print_fps", false);
GLOBAL_DEF("debug/settings/stdout/print_gpu_profile", false);
GLOBAL_DEF("debug/settings/stdout/verbose_stdout", false);
Expand Down

0 comments on commit 780e1a5

Please sign in to comment.