]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add some diagnostics around the state of the DAC during delays.
authorMike Brady <mikebrady@eircom.net>
Fri, 28 Dec 2018 10:35:13 +0000 (10:35 +0000)
committerMike Brady <mikebrady@eircom.net>
Fri, 28 Dec 2018 10:35:13 +0000 (10:35 +0000)
audio_alsa.c
player.c

index 764a4381856d0eedfe30ab93aa6e44e563652fb3..33669018498f5f705f86901809d48f06e867c434 100644 (file)
@@ -1493,8 +1493,13 @@ void *alsa_buffer_monitor_thread_code(void *arg) {
             ((present_time > most_recent_write_time) &&
              ((present_time - most_recent_write_time) > (sleep_time_in_fp)))) {
           reply = delay(&buffer_size);
-          if (reply != 0)
-            buffer_size = 0;
+          if (reply != 0) {
+            buffer_size = 0;            
+            char errorstring[1024];
+            strerror_r(-reply, (char *)errorstring, sizeof(errorstring));
+            debug(1, "alsa: alsa_buffer_monitor_thread_code delay error %d: \"%s\".",
+                  reply, (char *)errorstring);
+          }
           if (buffer_size < frames_of_silence) {
             if ((hardware_mixer == 0) && (config.ignore_volume_control == 0) &&
                 (config.airplay_volume != 0.0))
index 816ff40a873ec3a9d49655c4a766d30ca2a5a046..1ce5494a107d70ac37c27cdd2d11f7511fdfc783 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1017,8 +1017,8 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
                       // this might happen if a big clock adjustment was made at just the wrong
                       // time.
 
-                      debug(1, "Run a bit past the exact start time by %" PRId64 " frames.",
-                            -exact_frame_gap);
+                      debug(1, "Run a bit past the exact start time by %" PRId64 " frames with a DAC delay of %ld frames.",
+                            -exact_frame_gap, dac_delay);
                       if (config.output->flush)
                         config.output->flush();
                       ab_resync(conn);