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:
Hugo Locurcio
2023-06-08 19:46:05 +02:00
parent 281b7b9fdf
commit 6f1152bdbe
17 changed files with 46 additions and 12 deletions

View File

@ -74,6 +74,14 @@ int Engine::get_max_fps() const {
return _max_fps;
}
void Engine::set_audio_output_latency(int p_msec) {
_audio_output_latency = p_msec > 1 ? p_msec : 1;
}
int Engine::get_audio_output_latency() const {
return _audio_output_latency;
}
uint64_t Engine::get_frames_drawn() {
return frames_drawn;
}