]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add a | to the statistics output to ensure the columns of numbers are aligned. Seems...
authorMike Brady <mikebrady@eircom.net>
Sun, 15 Jul 2018 11:25:38 +0000 (12:25 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 15 Jul 2018 11:25:38 +0000 (12:25 +0100)
player.c

index b29ab496f71557c492a11825c50da86018f4bf3c..07716b769b133e1142d426509894f0c4f48a00a7 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1695,7 +1695,7 @@ void *player_thread_func(void *arg) {
   if (config.statistics_requested) {
     if ((config.output->delay)) {
       if (config.no_sync == 0) {
-        inform("sync error in milliseconds, "
+        inform("sync error in milliseconds, "
                "net correction in ppm, "
                "corrections in ppm, "
                "total packets, "
@@ -1707,7 +1707,7 @@ void *player_thread_func(void *arg) {
                "min buffer occupancy, "
                "max buffer occupancy");
       } else {
-        inform("sync error in milliseconds, "
+        inform("sync error in milliseconds, "
                "total packets, "
                "missing packets, "
                "late packets, "
@@ -1718,7 +1718,7 @@ void *player_thread_func(void *arg) {
                "max buffer occupancy");
       }
     } else {
-      inform("sync error in milliseconds, "
+      inform("sync error in milliseconds, "
              "total packets, "
              "missing packets, "
              "late packets, "
@@ -2275,7 +2275,7 @@ void *player_thread_func(void *arg) {
               if ((config.output->delay)) {
                 if (config.no_sync == 0) {
                   inform(
-                      " %10.1f," /* Sync error in milliseconds */
+                      "|%*.1f," /* Sync error in milliseconds */
                       "%*.1f,"  /* net correction in ppm */
                       "%*.1f,"  /* corrections in ppm */
                       "%*d,"    /* total packets */
@@ -2286,8 +2286,7 @@ void *player_thread_func(void *arg) {
                       "%*lli,"  /* min DAC queue size */
                       "%*d,"    /* min buffer occupancy */
                       "%*d",    /* max buffer occupancy */
-                      //9, /* should be 10, but there's an explicit space at the start to ensure
-                      //      alignment */
+                      10,
                       1000 * moving_average_sync_error / config.output_rate,
                       10, moving_average_correction * 1000000 / (352 * conn->output_sample_ratio),
                       10, moving_average_insertions_plus_deletions * 1000000 /
@@ -2296,7 +2295,7 @@ void *player_thread_func(void *arg) {
                       conn->too_late_packets, 7, conn->resend_requests, 7, minimum_dac_queue_size,
                       5, minimum_buffer_occupancy, 5, maximum_buffer_occupancy);
                 } else {
-                  inform(" %10.1f," /* Sync error in milliseconds */
+                  inform("|%*.1f," /* Sync error in milliseconds */
                          "%*d,"    /* total packets */
                          "%*llu,"  /* missing packets */
                          "%*llu,"  /* late packets */
@@ -2305,8 +2304,7 @@ void *player_thread_func(void *arg) {
                          "%*lli,"  /* min DAC queue size */
                          "%*d,"    /* min buffer occupancy */
                          "%*d",    /* max buffer occupancy */
-                         // 9, /* should be 10, but there's an explicit space at the start to ensure
-                         //       alignment */
+                         10,
                          1000 * moving_average_sync_error / config.output_rate,
                          12, play_number, 7, conn->missing_packets, 7, conn->late_packets, 7,
                          conn->too_late_packets, 7, conn->resend_requests, 7,
@@ -2314,7 +2312,7 @@ void *player_thread_func(void *arg) {
                          maximum_buffer_occupancy);
                 }
               } else {
-                inform(" %10.1f," /* Sync error in milliseconds */
+                inform("|%*.1f," /* Sync error in milliseconds */
                        "%*d,"    /* total packets */
                        "%*llu,"  /* missing packets */
                        "%*llu,"  /* late packets */
@@ -2322,8 +2320,7 @@ void *player_thread_func(void *arg) {
                        "%*llu,"  /* resend requests */
                        "%*d,"    /* min buffer occupancy */
                        "%*d",    /* max buffer occupancy */
-                       // 9, /* should be 10, but there's an explicit space at the start to ensure
-                       //       alignment */
+                       10,
                        1000 * moving_average_sync_error / config.output_rate,
                        12, play_number, 7, conn->missing_packets, 7, conn->late_packets, 7,
                        conn->too_late_packets, 7, conn->resend_requests, 5,