summaryrefslogtreecommitdiff
path: root/audio.c
diff options
context:
space:
mode:
authorMike Brady <mikebrady@eircom.net>2019-01-04 17:07:21 +0000
committerMike Brady <mikebrady@eircom.net>2019-01-04 17:07:21 +0000
commitdb0e718c12af37b8ca0018fbeacd6b6d2ef720d2 (patch)
tree4147c143f1b13079c143d5a8c6c7bec8b6de37b3 /audio.c
parent5e38fcd50fe09e0f4c74a7b32a570809cbba3da5 (diff)
Add code for getting and setting the interpolation threshold.
Diffstat (limited to 'audio.c')
-rw-r--r--audio.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/audio.c b/audio.c
index a0b5f74..4c3df7d 100644
--- a/audio.c
+++ b/audio.c
@@ -152,6 +152,19 @@ void parse_general_audio_options(void) {
config.audio_backend_buffer_desired_length = dvalue;
}
}
+
+ /* Get the minumum buffer size for fancy interpolation setting in seconds. */
+ if (config_lookup_float(config.cfg, "general.audio_backend_buffer_interpolation_threshold_in_seconds",
+ &dvalue)) {
+ if ((dvalue < 0) || (dvalue > config.audio_backend_buffer_desired_length)) {
+ die("Invalid audio_backend_buffer_interpolation_threshold_in_seconds value: \"%f\". It "
+ "should be between 0 and "
+ "audio_backend_buffer_desired_length_in_seconds of %.3f, default is %.3f seconds",
+ dvalue, config.audio_backend_buffer_desired_length,config.audio_backend_buffer_interpolation_threshold_in_seconds);
+ } else {
+ config.audio_backend_buffer_interpolation_threshold_in_seconds = dvalue;
+ }
+ }
/* Get the latency offset (deprecated). */
if (config_lookup_int(config.cfg, "general.audio_backend_latency_offset", &value)) {