From: Mike Brady Date: Sun, 16 Apr 2017 17:43:11 +0000 (+0100) Subject: Fix an error that prevented it from reporting delay correctly. X-Git-Tag: 3.1.d6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2caeeb35819e45f5b535416e2e4976d932c9a7c6;p=thirdparty%2Fshairport-sync.git Fix an error that prevented it from reporting delay correctly. --- diff --git a/audio_sndio.c b/audio_sndio.c index c10077c2..52e127dd 100644 --- a/audio_sndio.c +++ b/audio_sndio.c @@ -229,14 +229,7 @@ static void onmove_cb(void *arg, int delta) { static int delay(long *_delay) { pthread_mutex_lock(&sndio_mutex); - // 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; - // } + *_delay = (written / framesize) - played; pthread_mutex_unlock(&sndio_mutex); return 0; }