]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
add delay to debug output.
authorMike Brady <mikebrady@eircom.net>
Sun, 9 Dec 2018 08:58:47 +0000 (08:58 +0000)
committerMike Brady <mikebrady@eircom.net>
Sun, 9 Dec 2018 08:58:47 +0000 (08:58 +0000)
audio_alsa.c

index bc9a76aa616bc5f43c2dd20d74fac88d571e446a..07ee0cab2dfdc4593e4b780ca45849fd61ee2a5a 100644 (file)
@@ -976,6 +976,7 @@ int my_snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) {
 
 int delay(long *the_delay) {
   uint64_t overall_time_before = get_absolute_time_in_fp();
+  *the_delay = 0;
   // snd_pcm_sframes_t is a signed long -- hence the return of a "long"
   int reply = 0;
   // debug(3,"audio_alsa delay called.");
@@ -1050,7 +1051,7 @@ int delay(long *the_delay) {
     // reply = -EIO; // pretend something bad has happened
     pthread_setcancelstate(oldState, NULL);
   }
-  debug(1, "Total playing time to get delay: %8.2f us.",
+  debug(1, "Total playing time to get delay of %d frames: %8.2f us.", *the_delay,
     (1000000.0 * (get_absolute_time_in_fp() - overall_time_before) / (uint64_t)0x100000000));
   return reply;
 }