Add code to read audio_backend_silent_lead_in_time settings.
This commit is contained in:
+13
@@ -54,6 +54,19 @@ static int init(int argc, char **argv) {
|
||||
// get settings from settings file first, allow them to be overridden by command line options
|
||||
|
||||
if (config.cfg != NULL) {
|
||||
/* Get the desired length of the period of silence before the audio starts. */
|
||||
if (config_lookup_float(config.cfg, "ao.audio_backend_silent_lead_in_time",
|
||||
&dvalue)) {
|
||||
if ((dvalue < 0.05) || (dvalue > 4)) {
|
||||
pthread_mutex_unlock(&alsa_mutex);
|
||||
die("Invalid ao audio_backend_silent_lead_in_time \"%f\". It "
|
||||
"must be between 0.050 and 4.0 seconds. Omit setting to use the default value, which is approximately the latency specified by the source (typically 2 seconds). A value greater than the latency is ignored.",
|
||||
dvalue);
|
||||
} else {
|
||||
config.audio_backend_silent_lead_in_time = dvalue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the desired buffer size setting. */
|
||||
if (config_lookup_int(config.cfg, "ao.audio_backend_buffer_desired_length", &value)) {
|
||||
if ((value < 0) || (value > 66150)) {
|
||||
|
||||
Reference in New Issue
Block a user