Triode,
Just tracking down why I'm dropping frames on the floor from time to
time. Please can we reset the cnt (from 10 down to zero) back to 10
after we have written some frames to the out buffer.
Code:
--------------------
--- /home/clivem/development/git/squeezelite/process.c 2013-06-06
19:12:54.896223918 +0100
+++ process.c 2013-06-06 19:08:32.958889436 +0100
@@ -81,10 +82,12 @@
_buf_inc_writep(outputbuf, f * BYTES_PER_FRAME);
iptr += f * BYTES_PER_FRAME / sizeof(*iptr);
+ cnt = 10;
} else if (cnt--) {
// there should normally be space in the output buffer,
but may need to wait during drain phase
+ LOG_SDEBUG("waiting (10ms) for space in output buffer,
frames: %u, cnt: %u", frames, cnt);
UNLOCK_O;
usleep(10000);
LOCK_O;
@@ -92,7 +95,7 @@
} else {
// bail out if no space found after 100ms to avoid
locking
- LOG_ERROR("unable to get space in output buffer");
+ LOG_ERROR("unable to get space in output buffer,
dropping %u frames", frames);
return;
}
}
--------------------
+-------------------------------------------------------------------+
|Filename: squeezelite-process-cnt.patch |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=14895|
+-------------------------------------------------------------------+
------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=98544
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix