From: Mike Brady Date: Fri, 17 May 2019 09:43:54 +0000 (+0100) Subject: remove a strncpy truncation warning X-Git-Tag: 3.3~1^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9168f4aa76a5b45cbde41ac99247cd970c809cf;p=thirdparty%2Fshairport-sync.git remove a strncpy truncation warning update a timing setting in the settings file list the alsa hardware devices in the -h message --- diff --git a/audio_alsa.c b/audio_alsa.c index 5b2f5f60..cd692f1d 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -192,6 +192,7 @@ static void help(void) { " -c mixer-control set the mixer control name, default is to use no mixer.\n" " -m mixer-device set the mixer device, default is the output device.\n" " -i mixer-index set the mixer index, default is 0.\n"); + system("if [ -d /proc/asound ] ; then echo \" hardware output devices:\" ; ls -al /proc/asound/ 2>/dev/null | grep '\\->' | tr -s ' ' | cut -d ' ' -f 9 | while read line; do echo \" \\\"hw:$line\\\"\" ; done ; fi"); } void set_alsa_out_dev(char *dev) { alsa_out_dev = dev; } diff --git a/dacp.c b/dacp.c index 29851014..cea3e7f5 100644 --- a/dacp.c +++ b/dacp.c @@ -377,7 +377,7 @@ void set_dacp_server_information(rtsp_conn_info *conn) { if ((conn->dacp_id == NULL) || (strcmp(conn->dacp_id, dacp_server.dacp_id) != 0)) { if (conn->dacp_id) - strncpy(dacp_server.dacp_id, conn->dacp_id, sizeof(dacp_server.dacp_id)); + strncpy(dacp_server.dacp_id, conn->dacp_id, sizeof(dacp_server.dacp_id)-1); else dacp_server.dacp_id[0] = '\0'; dacp_server.port = 0; diff --git a/scripts/shairport-sync.conf b/scripts/shairport-sync.conf index 3662b468..7b030d6d 100644 --- a/scripts/shairport-sync.conf +++ b/scripts/shairport-sync.conf @@ -44,7 +44,7 @@ general = // interface = "name"; // Use this advanced setting to specify the interface on which Shairport Sync should provide its service. Leave it commented out to get the default, which is to select the interface(s) automatically. // audio_backend_latency_offset_in_seconds = 0.0; // Set this offset to compensate for a fixed delay in the audio back end. E.g. if the output device delays by 100 ms, set this to -0.1. -// audio_backend_buffer_desired_length_in_seconds = 0.15; // If set too small, buffer underflow occurs on low-powered machines. Too long and the response time to volume changes becomes annoying. Default is 0.15 seconds in the alsa backend, 0.35 seconds in the pa backend and 1.0 seconds otherwise. +// audio_backend_buffer_desired_length_in_seconds = 0.2; // If set too small, buffer underflow occurs on low-powered machines. Too long and the response time to volume changes becomes annoying. Default is 0.15 seconds in the alsa backend, 0.35 seconds in the pa backend and 1.0 seconds otherwise. // audio_backend_buffer_interpolation_threshold_in_seconds = 0.075; // Advanced feature. If the buffer size drops below this, stop using time-consuming interpolation like soxr to avoid dropouts due to underrun. // audio_backend_silent_lead_in_time = 2.0; // This optional advanced setting, from 0.0 and 4.0 seconds, sets the length of the period of silence that precedes the start of the audio. The default is the latency, usually 2.0 seconds. Values greater than the latency are ignored. Values that are too low will affect initial synchronisation. // dbus_service_bus = "system"; // The Shairport Sync dbus interface, if selected at compilation, will appear