diff options
author | Mike Brady <mikebrady@eircom.net> | 2019-01-04 17:07:21 +0000 |
---|---|---|
committer | Mike Brady <mikebrady@eircom.net> | 2019-01-04 17:07:21 +0000 |
commit | db0e718c12af37b8ca0018fbeacd6b6d2ef720d2 (patch) | |
tree | 4147c143f1b13079c143d5a8c6c7bec8b6de37b3 /audio.c | |
parent | 5e38fcd50fe09e0f4c74a7b32a570809cbba3da5 (diff) |
Add code for getting and setting the interpolation threshold.
Diffstat (limited to 'audio.c')
-rw-r--r-- | audio.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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)) { |