]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clang format
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 14 Jan 2023 12:53:20 +0000 (12:53 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 14 Jan 2023 12:53:20 +0000 (12:53 +0000)
common.h
player.c
shairport.c

index 93f04ec68259451d1f735bff5e4589c2bb919985..298bdbd0064bba206cf774543b9daf2184feba7f 100644 (file)
--- a/common.h
+++ b/common.h
@@ -169,11 +169,12 @@ typedef struct {
   int ignore_volume_control;
   int volume_max_db_set; // set to 1 if a maximum volume db has been set
   int volume_max_db;
-  int no_sync;            // disable synchronisation, even if it's available
-  int no_mmap;            // disable use of mmap-based output, even if it's available
-  double resync_threshold; // if it gets out of whack by more than this number of seconds, do a resync.
-                          // if zero, never do a resync.
-  double resync_recovery_time; // if sync is late, drop the delay but also drop the following frames up to the resync_recovery_time
+  int no_sync;             // disable synchronisation, even if it's available
+  int no_mmap;             // disable use of mmap-based output, even if it's available
+  double resync_threshold; // if it gets out of whack by more than this number of seconds, do a
+                           // resync. if zero, never do a resync.
+  double resync_recovery_time; // if sync is late, drop the delay but also drop the following frames
+                               // up to the resync_recovery_time
   int allow_session_interruption;
   int timeout; // while in play mode, exit if no packets of audio come in for more than this number
                // of seconds . Zero means never exit.
index 293bde264d2ae6ae6b1be782eb32ed7e40e630fb..21107ecb106af47ee79d0f9b3219612f470d704f 100644 (file)
--- a/player.c
+++ b/player.c
@@ -2645,8 +2645,9 @@ void *player_thread_func(void *arg) {
                        conn->connection_number);
                 }
               } else {
-                if ((resp != -EBUSY) && (resp != -ENODEV)) // delay and not-there errors can be reported if the device is (hopefully
-                                    // temporarily) busy or unavailable
+                if ((resp != -EBUSY) &&
+                    (resp != -ENODEV)) // delay and not-there errors can be reported if the device
+                                       // is (hopefully temporarily) busy or unavailable
                   debug(1, "Delay error %d when checking running latency.", resp);
               }
             }
@@ -2832,7 +2833,8 @@ void *player_thread_func(void *arg) {
                 source_frames_to_drop = source_frames_to_drop / conn->output_sample_ratio;
 
                 // drop some extra frames to give the pipeline a chance to recover
-                int64_t extra_frames_to_drop = (int64_t)(conn->input_rate * config.resync_recovery_time);
+                int64_t extra_frames_to_drop =
+                    (int64_t)(conn->input_rate * config.resync_recovery_time);
                 source_frames_to_drop += extra_frames_to_drop;
 
                 uint32_t frames_to_drop = source_frames_to_drop;
index b5ecd030ef54a66c9daa964803a51caa6457c01d..4b2129cc726bbceefa10b8401ceca029cd78294b 100644 (file)
@@ -1986,15 +1986,14 @@ int main(int argc, char **argv) {
   config.debugger_show_file_and_line =
       1; // by default, log the file and line of the originating message
   config.debugger_show_relative_time =
-      1;                         // by default, log the  time back to the previous debug message
+      1;                // by default, log the  time back to the previous debug message
   config.timeout = 120; // this number of seconds to wait for [more] audio before switching to idle.
   config.buffer_start_fill = 220;
-  
-  config.resync_threshold = 0.050; // default
+
+  config.resync_threshold = 0.050;   // default
   config.resync_recovery_time = 0.1; // drop this amount of frames following the resync delay.
   config.tolerance = 0.002;
 
-
 #ifdef CONFIG_AIRPLAY_2
   config.timeout = 0; // disable watchdog
   config.port = 7000;
@@ -2374,9 +2373,8 @@ int main(int argc, char **argv) {
   debug(1, "mdns backend \"%s\".", strnull(config.mdns_name));
   debug(2, "userSuppliedLatency is %d.", config.userSuppliedLatency);
   debug(1, "interpolation setting is \"%s\".",
-        config.packet_stuffing == ST_basic  ? "basic"
-        : config.packet_stuffing == ST_soxr ? "soxr"
-                                            : "auto");
+        config.packet_stuffing == ST_basic ? "basic"
+                                           : config.packet_stuffing == ST_soxr ? "soxr" : "auto");
   debug(1, "interpolation soxr_delay_threshold is %d.", config.soxr_delay_threshold);
   debug(1, "resync time is %f seconds.", config.resync_threshold);
   debug(1, "resync recovery time is %f seconds.", config.resync_recovery_time);