]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
remove a strncpy truncation warning
authorMike Brady <mikebrady@eircom.net>
Fri, 17 May 2019 09:43:54 +0000 (10:43 +0100)
committerMike Brady <mikebrady@eircom.net>
Fri, 17 May 2019 09:43:54 +0000 (10:43 +0100)
update a timing setting in the settings file
list the alsa hardware devices in the -h message

audio_alsa.c
dacp.c
scripts/shairport-sync.conf

index 5b2f5f607793cfc4d68d7273cb3a079e2fecbc0f..cd692f1d56447b331d6129f077bd5370733c7116 100644 (file)
@@ -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 2985101469fb8ce5893ade60a8045992758e46c8..cea3e7f5dde0b1898273c88885535f79bba1b254 100644 (file)
--- 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;
index 3662b468ad3f9c2c283fd8195aa6124246414ff8..7b030d6d437818f061a849c14c91dbb484f05fc4 100644 (file)
@@ -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