]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Change names of drift, resync, alsa buffer offset and alsa buffer length to distingui...
authorMike Brady <mikebrady@eircom.net>
Sun, 18 Sep 2016 11:56:22 +0000 (12:56 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 18 Sep 2016 11:56:22 +0000 (12:56 +0100)
audio_alsa.c
scripts/shairport-sync.conf
shairport.c

index 04f743700bc6fa1a66f43676cb88a24c78bef5ca..89517a2555bae35377ed5afb37be6990edf21ca3 100644 (file)
@@ -146,10 +146,22 @@ static int init(int argc, char **argv) {
   // command line options
 
   if (config.cfg != NULL) {
+
+
+    if (config_lookup_int(config.cfg,
+                          "alsa.audio_backend_buffer_desired_length", &value)) 
+      inform("The setting audio_backend_buffer_desired_length is no longer used and has been ignored. Use audio_backend_buffer_desired_length_in_seconds instead.");
+    
+
+    /* Get the latency offset. */
+    if (config_lookup_int(config.cfg, "alsa.audio_backend_latency_offset",
+                          &value)) 
+      inform("The setting audio_backend_latency_offset is no longer used and has been ignored. Use audio_backend_latency_offset_in_seconds instead.");
+
     /* Get the desired buffer size setting. */
-    if (config_lookup_float(config.cfg, "alsa.audio_backend_buffer_desired_length", &dvalue)) {
+    if (config_lookup_float(config.cfg, "alsa.audio_backend_buffer_desired_length_in_seconds", &dvalue)) {
       if ((dvalue < 0) || (dvalue > 1.5))
-        die("Invalid alsa audio backend buffer desired length \"%f\". It "
+        die("Invalid alsa audio backend buffer desired time \"%f\". It "
             "should be between 0 and "
             "1.5, default is 0.15 seconds",
             dvalue);
@@ -159,9 +171,9 @@ static int init(int argc, char **argv) {
     }
 
     /* Get the latency offset. */
-    if (config_lookup_float(config.cfg, "alsa.audio_backend_latency_offset", &dvalue)) {
+    if (config_lookup_float(config.cfg, "alsa.audio_backend_latency_offset_in_seconds", &dvalue)) {
       if ((dvalue < -1.0) || (dvalue > 1.5))
-        die("Invalid alsa audio backend buffer latency offset \"%f\". It "
+        die("Invalid alsa audio backend buffer latency offset time \"%f\". It "
             "should be between -1.0 and +1.5, default is 0 seconds",
             dvalue);
       else
index dea8ba6f3704891b924e65d64e55f95f8a1a0aec..4f4ebe0a3e3214b74a6dd31161e547b620bf0b9f 100644 (file)
@@ -19,8 +19,8 @@ general =
 //     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 (only three are needed).
 //     statistics = "no"; // set to "yes" to print statistics in the log
-//     drift = 0.002; // allow a timing error of this number of seconds of drift away from exact synchronisation before attempting to correct it
-//     resync_threshold = 0.050; // a synchronisation error greater than this number of seconds will cause resynchronisation; 0 disables it
+//     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 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.
@@ -62,8 +62,8 @@ alsa =
 //  mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this.
 //  output_rate = 44100; // can be 44100, 88200, 176400, 352800, but the device must be capable of it
 //  output_format = "S16"; // can be "U8", "S8", "S16", "S24" or "S32", with be LE or BE depending on the processor, but the device must be capable of it
-//  audio_backend_latency_offset = 0.0; // Set this offset in seconds 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 = 0.15; // Given in seconds. If set too small, buffer underflow occurs on low-powered machines. Too long and the response times with software mixer become annoying.
+//  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 times with software mixer become annoying.
 //  disable_synchronization = "no"; // Set to "yes" to disable synchronization. Default is "no".
 //  period_size = <number>; // Use this optional advanced setting to set the alsa period size near to this value
 //  buffer_size = <number>; // Use this optional advanced setting to set the alsa buffer size near to this value
index 9356ff8cbfd51adf312da59e2470944349a36212..2631e40ca4e35996abc7aa48d0af1fcfe9c124e3 100644 (file)
@@ -397,12 +397,20 @@ int parse_options(int argc, char **argv) {
           die("Invalid statistics option choice \"%s\". It should be \"yes\" or \"no\"");
       }
 
+      /* The old drift tolerance setting. */
+      if (config_lookup_int(config.cfg, "general.drift", &value))
+        inform("The drift setting is deprecated and has been ignored. Use drift_tolerance_in_seconds instead");
+
+      /* The old resync setting. */
+      if (config_lookup_int(config.cfg, "general.resync_threshold", &value))
+        inform("The resync_threshold setting is deprecated and has been ignored. Use resync_threshold_in_seconds instead");
+
       /* Get the drift tolerance setting. */
-      if (config_lookup_float(config.cfg, "general.drift", &dvalue))
+      if (config_lookup_float(config.cfg, "general.drift_tolerance_in_seconds", &dvalue))
         config.tolerance = dvalue;
 
       /* Get the resync setting. */
-      if (config_lookup_float(config.cfg, "general.resync_threshold", &dvalue))
+      if (config_lookup_float(config.cfg, "general.resync_threshold_in_seconds", &dvalue))
         config.resyncthreshold = dvalue;
 
       /* Get the verbosity setting. */