summaryrefslogtreecommitdiffstats
path: root/core/config/engine.h
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2023-06-08 19:46:05 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-08-17 14:45:17 +0200
commit6f1152bdbe1338998b41c51c5a39dc6dac28ae31 (patch)
tree10ae7ca78b0da733070802d1108f28ca3c2c21d4 /core/config/engine.h
parent281b7b9fdf033f391e6a2c2b1d777e61737ccb16 (diff)
downloadredot-engine-6f1152bdbe1338998b41c51c5a39dc6dac28ae31.tar.gz
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.
Diffstat (limited to 'core/config/engine.h')
-rw-r--r--core/config/engine.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/config/engine.h b/core/config/engine.h
index 73d40d50ae..ff88fbc787 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -61,6 +61,7 @@ private:
double physics_jitter_fix = 0.5;
double _fps = 1;
int _max_fps = 0;
+ int _audio_output_latency = 0;
double _time_scale = 1.0;
uint64_t _physics_frames = 0;
int max_physics_steps_per_frame = 8;
@@ -99,6 +100,9 @@ public:
virtual void set_max_fps(int p_fps);
virtual int get_max_fps() const;
+ virtual void set_audio_output_latency(int p_msec);
+ virtual int get_audio_output_latency() const;
+
virtual double get_frames_per_second() const { return _fps; }
uint64_t get_frames_drawn();