Fix an error that prevented it from reporting delay correctly.

This commit is contained in:
Mike Brady
2017-04-16 18:43:11 +01:00
parent 225efa127a
commit 2caeeb3581
+1 -8
View File
@@ -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;
}