Add ability to set the missing DACP port scan interval.

This commit is contained in:
Mike Brady
2020-03-25 10:40:05 +00:00
parent 31f5e8b9ca
commit 1b7e23c093
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ general =
// resend_control_first_check_time = 0.10; // Use this optional advanced setting to set the wait time in seconds before deciding a packet is missing.
// resend_control_check_interval_time = 0.25; // Use this optional advanced setting to set the time in seconds between requests for a missing packet.
// resend_control_last_check_time = 0.10; // Use this optional advanced setting to set the latest time, in seconds, by which the last check should be done before the estimated time of a missing packet's transfer to the output buffer.
//
// missing_port_dacp_scan_interval_seconds = 2.0; // Use this optional advanced setting to set the time interval between scans for a DACP port number if no port number has been provided by the player for remote control commands
};
// Advanced parameters for controlling how Shairport Sync stays active and how it runs a session
+12
View File
@@ -806,6 +806,18 @@ int parse_options(int argc, char **argv) {
dvalue, config.resend_control_last_check_time);
}
if (config_lookup_float(config.cfg, "general.missing_port_dacp_scan_interval_seconds",
&dvalue)) {
if ((dvalue >= 0.0) && (dvalue <= 300.0))
config.missing_port_dacp_scan_interval_seconds = dvalue;
else
warn("Invalid general missing_port_dacp_scan_interval_seconds setting \"%d\". It should "
"be "
"between 0.0 and 300.0, "
"inclusive. The setting remains at %f seconds.",
dvalue, config.missing_port_dacp_scan_interval_seconds);
}
/* Get the default latency. Deprecated! */
if (config_lookup_int(config.cfg, "latencies.default", &value))
config.userSuppliedLatency = value;