]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clang format
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 26 Nov 2021 18:02:23 +0000 (18:02 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 26 Nov 2021 18:02:23 +0000 (18:02 +0000)
audio_alsa.c
player.c

index 0910b9e7c1225529ead171f3bbd8faabe5afe35b..f2e0b1311f03f20c2de39c3508d1a654b65458c2 100644 (file)
@@ -249,10 +249,10 @@ static int set_period_size_request, set_buffer_size_request;
 
 static uint64_t frames_sent_for_playing;
 
- // set to true if there has been a discontinuity between the last reported frames_sent_for_playing
- // and the present reported frames_sent_for_playing
- // Not that it will be set when the device is opened, as any previous figures for frames_sent_for_playing
- // (which Shairport Sync might hold) would be invalid.
+// set to true if there has been a discontinuity between the last reported frames_sent_for_playing
+// and the present reported frames_sent_for_playing
+// Not that it will be set when the device is opened, as any previous figures for
+// frames_sent_for_playing (which Shairport Sync might hold) would be invalid.
 static int frames_sent_break_occurred;
 
 static void help(void) {
@@ -1660,8 +1660,8 @@ int stats(uint64_t *the_time, uint64_t *the_delay, uint64_t *frames_sent_to_dac)
   if (ret == 0)
     ret = frames_sent_break_occurred; // will be zero unless an error like an underrun occurred
   else
-    ret = 1; // just indicate there was some kind of a break
-  frames_sent_break_occurred = 0;     // reset it.
+    ret = 1;                      // just indicate there was some kind of a break
+  frames_sent_break_occurred = 0; // reset it.
   if (frames_sent_to_dac != NULL)
     *frames_sent_to_dac = frames_sent_for_playing;
   debug_mutex_unlock(&alsa_mutex, 0);
@@ -1716,7 +1716,7 @@ int do_play(void *buf, int samples) {
         frames_sent_for_playing += samples;
       } else {
         frames_sent_break_occurred = 1; // note than an output error has occurred
-        if (ret == -EPIPE) {          /* underrun */
+        if (ret == -EPIPE) {            /* underrun */
 
           // It could be that the DAC was in the SND_PCM_STATE_XRUN state before
           // sending the samples to be output. If so, it will still be in
@@ -1790,7 +1790,7 @@ int do_open(int do_auto_setup) {
         // do_mute(0); // complete unmute
       }
       frames_sent_break_occurred = 1; // there is a discontinuity with
-      // any previously-reported frame count      
+      // any previously-reported frame count
       frames_sent_for_playing = 0;
       alsa_backend_state = abm_connected; // only do this if it really opened it.
     }
index 0991167c20badbe598af33d026c5a7014e9e2a0b..5e6e4133dd6420a508b8074cf2e52d2f76c02732 100644 (file)
--- a/player.c
+++ b/player.c
@@ -2339,7 +2339,9 @@ void *player_thread_func(void *arg) {
               uint64_t actual_delay;
               stats_status =
                   config.output->stats(&measurement_time, &actual_delay, &frames_sent_for_play);
-              // debug(1,"status: %d, actual_delay: %" PRIu64 ", frames_sent_for_play: %" PRIu64 ", frames_played: %" PRIu64 ".", stats_status, actual_delay, frames_sent_for_play, frames_sent_for_play - actual_delay);
+              // debug(1,"status: %d, actual_delay: %" PRIu64 ", frames_sent_for_play: %" PRIu64 ",
+              // frames_played: %" PRIu64 ".", stats_status, actual_delay, frames_sent_for_play,
+              // frames_sent_for_play - actual_delay);
               uint64_t frames_played = frames_sent_for_play - actual_delay;
               // If the status is zero, it means that there were no output problems since the
               // last time the stats call was made. Thus, the frame rate should be valid.
@@ -2349,7 +2351,8 @@ void *player_thread_func(void *arg) {
                 if (interval != 0) {
                   conn->frame_rate = (1e9 * frames_played_in_this_interval) / interval;
                   conn->frame_rate_valid = 1;
-                  //debug(1,"frames_played_in_this_interval: %" PRIu64 ", interval: %" PRId64 ", rate: %f.",
+                  // debug(1,"frames_played_in_this_interval: %" PRIu64 ", interval: %" PRId64 ",
+                  // rate: %f.",
                   //  frames_played_in_this_interval, interval, conn->frame_rate);
                 }
               }