]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clang Format Cleanup
authorMike Brady <mikebrady@eircom.net>
Sun, 9 Sep 2018 19:43:01 +0000 (20:43 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 9 Sep 2018 19:43:01 +0000 (20:43 +0100)
audio.h
audio_alsa.c
common.c
common.h
player.c

diff --git a/audio.h b/audio.h
index 171e366be829ad39713795e1c8ac2546c4840aa2..a4f0f178e3357edb56bb8e74fb42ebdc35fe2fbe 100644 (file)
--- a/audio.h
+++ b/audio.h
@@ -24,9 +24,10 @@ typedef struct {
   // block of samples
   int (*play)(void *buf, int samples);
   void (*stop)(void);
-  
+
   // may be null if no implemented
-  int (*is_running)(void); // if implemented, will return 0 if everything is okay, non-zero otherwise
+  int (*is_running)(
+      void); // if implemented, will return 0 if everything is okay, non-zero otherwise
 
   // may be null if not implemented
   void (*flush)(void);
index d0b62532378051e3179cad8f0a4f2d19208cb7c4..17b2df4c27a17dcc38451a8a5620a67f00b9db76 100644 (file)
@@ -1005,7 +1005,7 @@ static int play(void *buf, int samples) {
           measurement_time = get_absolute_time_in_fp();
           frames_played_at_measurement_time = frames_sent_for_playing - fl;
           if (frame_index == start_measurement_from_this_frame) {
-            debug(1,"Start frame counting");
+            debug(1, "Start frame counting");
             frames_played_at_measurement_start_time = frames_played_at_measurement_time;
             measurement_start_time = measurement_time;
             measurement_data_is_valid = 1;
index f895866ce441669b47a49da425c4b8f1abe338d9..4a60cfb966130d8deb04e152f996a921008de77b 100644 (file)
--- a/common.c
+++ b/common.c
@@ -587,8 +587,6 @@ int config_set_lookup_bool(config_t *cfg, char *where, int *dst) {
   }
 }
 
-
-
 void command_set_volume(double volume) {
   if (config.cmd_set_volume) {
     /*Spawn a child to run the program.*/
index 41844b77cd4455c9b93381f301321b12eef051cb..c25b166a077db073b5ba4975c4c5c719ebef6020 100644 (file)
--- a/common.h
+++ b/common.h
@@ -206,7 +206,8 @@ typedef struct {
 #ifdef CONFIG_JACK
   char *jack_client_name, *jack_left_channel_name, *jack_right_channel_name;
   int jack_auto_client_open_interval; // will try to open a client automatically every second
-  int jack_auto_client_disconnect; // will disconnect from the server on end of session if set, normally clear.
+  int jack_auto_client_disconnect;    // will disconnect from the server on end of session if set,
+                                      // normally clear.
 #endif
 
 } shairport_cfg;
index 20f01855d7f6bb359aa59869daa39b34c01f9225..9bfc99a7b0b905064e66336e08798e753786a846 100644 (file)
--- a/player.c
+++ b/player.c
@@ -835,14 +835,14 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
         debug_mutex_unlock(&conn->flush_mutex, 3);
       }
     }
-    
+
     if (config.output->is_running)
-      if (config.output->is_running() !=) { // if the back end isn't running for any reason
-        debug(3,"not running");
+      if (config.output->is_running() != 0) { // if the back end isn't running for any reason
+        debug(3, "not running");
         debug_mutex_lock(&conn->flush_mutex, 1000, 1);
         conn->flush_requested = 1;
         debug_mutex_unlock(&conn->flush_mutex, 3);
-     }
+      }
 
     debug_mutex_lock(&conn->flush_mutex, 1000, 1);
     if (conn->flush_requested == 1) {
@@ -907,7 +907,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
                                    // player
           int have_sent_prefiller_silence = 1; // set true when we have sent some silent frames to
                                                // the DAC
-          /*                                    
+          /*
           int64_t reference_timestamp;
           uint64_t reference_timestamp_time, remote_reference_timestamp_time;
           get_reference_timestamp_stuff(&reference_timestamp, &reference_timestamp_time,
@@ -991,7 +991,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
                 &should_be_time, conn);
 
             conn->first_packet_time_to_play = should_be_time;
-            
+
             // now, the size of the initial silence must be affected by the lead-in time.
             // it must be somewhat less than the lead-in time so that dynamic adjustments can be
             // made
@@ -1175,11 +1175,15 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
 
       // here, get the time to play the current frame.
 
-      if (have_timestamp_timing_information(conn)) {    // if we have a reference time
+      if (have_timestamp_timing_information(conn)) { // if we have a reference time
 
         uint64_t time_to_play;
-        frame_to_local_time(curframe->timestamp + conn->latency * conn->output_sample_ratio + (int64_t)(config.audio_backend_latency_offset * config.output_rate) - config.audio_backend_buffer_desired_length * config.output_rate, &time_to_play, conn);
-        
+        frame_to_local_time(
+            curframe->timestamp + conn->latency * conn->output_sample_ratio +
+                (int64_t)(config.audio_backend_latency_offset * config.output_rate) -
+                config.audio_backend_buffer_desired_length * config.output_rate,
+            &time_to_play, conn);
+
         if (local_time_now >= time_to_play) {
           do_wait = 0;
         }