seq_t next = seq_sum(conn->ab_read, i);
abuf = conn->audio_buffer + BUFIDX(next);
if (!abuf->ready) {
- rtp_request_resend(next, 1, conn);
- // debug(1,"Resend %u.",next);
- conn->resend_requests++;
+ if (config.disable_resend_requests==0) {
+ rtp_request_resend(next, 1, conn);
+ // debug(1,"Resend %u.",next);
+ conn->resend_requests++;
+ }
}
}
}
// port = 5000; // Listen for service requests on this port
// udp_port_base = 6001; // start allocating UDP ports from this port number when needed
// udp_port_range = 100; // look for free ports in this number of places, starting at the UDP port base. Allow at least 10, though only three are needed in a steady state.
-// statistics = "no"; // set to "yes" to print statistics in the log
// drift_tolerance_in_seconds = 0.002; // allow a timing error of this number of seconds of drift away from exact synchronisation before attempting to correct it
// resync_threshold_in_seconds = 0.050; // a synchronisation error greater than this number of seconds will cause resynchronisation; 0 disables it
-// log_verbosity = 0; // "0" means no debug verbosity, "3" is most verbose.
-
// ignore_volume_control = "no"; // set this to "yes" if you want the volume to be at 100% no matter what the source's volume control is set to.
// volume_range_db = 60 ; // use this advanced setting to set the range, in dB, you want between the maximum volume and the minimum volume. Range is 30 to 150 dB. Leave it commented out to use mixer's native range.
// volume_max_db = 0.0 ; // use this advanced setting, which must have a decimal point in it, to set the maximum volume, in dB, you wish to use.
// socket_msglength = 65000; // the maximum packet size for any UDP metadata. This will be clipped to be between 500 or 65000. The default is 500.
};
+// Diagnostic settings. These are for diagnostic and debugging only. Normally you sould leave them commented out
+diagnostics =
+{
+// disable_resend_requests = "no"; // set this to yes to stop Shairport Sync from requesting the retransmission of missing packets. Default is "no".
+// statistics = "no"; // set to "yes" to print statistics in the log
+// log_verbosity = 0; // "0" means no debug verbosity, "3" is most verbose.
+};
/* Get the statistics setting. */
if (config_lookup_string(config.cfg, "general.statistics", &str)) {
+ warn("The \"general\" \"statistics\" setting is deprecated. Please use the \"diagnostics\" \"statistics\" setting instead.");
if (strcasecmp(str, "no") == 0)
config.statistics_requested = 0;
else if (strcasecmp(str, "yes") == 0)
/* Get the verbosity setting. */
if (config_lookup_int(config.cfg, "general.log_verbosity", &value)) {
+ warn("The \"general\" \"log_verbosity\" setting is deprecated. Please use the \"diagnostics\" \"log_verbosity\" setting instead.");
if ((value >= 0) && (value <= 3))
debuglev = value;
else
value);
}
+ /* Get the verbosity setting. */
+ if (config_lookup_int(config.cfg, "diagnostics.log_verbosity", &value)) {
+ if ((value >= 0) && (value <= 3))
+ debuglev = value;
+ else
+ die("Invalid diagnostics log_verbosity setting option choice \"%d\". It should be between 0 and 3, "
+ "inclusive.",
+ value);
+ }
+
+ /* Get the statistics setting. */
+ if (config_lookup_string(config.cfg, "diagnostics.statistics", &str)) {
+ if (strcasecmp(str, "no") == 0)
+ config.statistics_requested = 0;
+ else if (strcasecmp(str, "yes") == 0)
+ config.statistics_requested = 1;
+ else
+ die("Invalid diagnostics statistics option choice \"%s\". It should be \"yes\" or \"no\"");
+ }
+
+
+ /* Get the disable_resend_requests setting. */
+ if (config_lookup_string(config.cfg, "diagnostics.disable_resend_requests", &str)) {
+ config.disable_resend_requests = 0; // this is for legacy -- only set by -t 0
+ if (strcasecmp(str, "no") == 0)
+ config.disable_resend_requests = 0;
+ else if (strcasecmp(str, "yes") == 0)
+ config.disable_resend_requests = 1;
+ else
+ die("Invalid diagnostic disable_resend_requests option choice \"%s\". It should be "
+ "\"yes\" "
+ "or \"no\"");
+ }
+
/* Get the ignore_volume_control setting. */
if (config_lookup_string(config.cfg, "general.ignore_volume_control", &str)) {
if (strcasecmp(str, "no") == 0)
#endif
debug(1, "loudness is %d.", config.loudness);
debug(1, "loudness reference level is %f", config.loudness_reference_volume_db);
+ debug(1, "disable resend requests is %d -- non-zero means \"yes\"", config.disable_resend_requests);
uint8_t ap_md5[16];