Add a --audio-output-latency command-line argument
This allows optimizing the audio output latency on higher-end CPUs, especially in projects that do not expose a way to override this setting.
This commit is contained in:
@ -45,7 +45,7 @@ Error AudioDriverXAudio2::init() {
|
||||
speaker_mode = SPEAKER_MODE_STEREO;
|
||||
channels = 2;
|
||||
|
||||
int latency = GLOBAL_GET("audio/driver/output_latency");
|
||||
int latency = Engine::get_singleton()->get_audio_output_latency();
|
||||
buffer_size = closest_power_of_2(latency * mix_rate / 1000);
|
||||
|
||||
samples_in = memnew_arr(int32_t, buffer_size * channels);
|
||||
|
||||
Reference in New Issue
Block a user