From: Mike Brady Date: Sun, 16 Apr 2017 17:40:05 +0000 (+0100) Subject: Improve debug messages a little X-Git-Tag: 3.1.d6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=225efa127aee78e4033fd9741ee4ebd7a9f2f738;p=thirdparty%2Fshairport-sync.git Improve debug messages a little --- diff --git a/audio_sndio.c b/audio_sndio.c index 8aa1d8ab..c10077c2 100644 --- a/audio_sndio.c +++ b/audio_sndio.c @@ -229,12 +229,14 @@ static void onmove_cb(void *arg, int delta) { static int delay(long *_delay) { pthread_mutex_lock(&sndio_mutex); - if (played > (written / framesize)) { + // debug(1,"Frames written %u, played %u.",written/framesize,played); + + //if (played > (written / framesize)) { /* _delay is in frames */ *_delay = (written / framesize) - played; - } else { - *_delay = 0; - } + // } else { + // *_delay = 0; + // } pthread_mutex_unlock(&sndio_mutex); return 0; } diff --git a/player.c b/player.c index 9f57e1c4..5dbce717 100644 --- a/player.c +++ b/player.c @@ -1685,7 +1685,7 @@ static void *player_thread_func(void *arg) { current_delay = l_delay; if (resp == 0) { // no error if (current_delay < 0) { - debug(1, "Underrun of %d frames reported, but ignored.", current_delay); + debug(1, "Underrun of %lld frames reported, but ignored.", current_delay); current_delay = 0; // could get a negative value if there was underrun, but ignore it. } @@ -1728,7 +1728,7 @@ static void *player_thread_func(void *arg) { // only allow stuffing if there is enough time to do it -- check DAC buffer... if (current_delay < DAC_BUFFER_QUEUE_MINIMUM_LENGTH) { - // debug(1,"DAC buffer too short to allow stuffing."); + // debug(2,"DAC buffer too short(at %lld frames) to allow stuffing.",current_delay); amount_to_stuff = 0; }