summaryrefslogtreecommitdiff
path: root/ringbuffer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-05-17 10:07:17 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-05-17 10:07:17 +0200
commitd41461ad40525286e075b5b09ff6d1f84deb77e9 (patch)
treebc0b64ae4dfefdfb9ff14b1154db47c5928ea39c /ringbuffer.c
parent877d4851e85874e3e16e2f62ac234d32f7309205 (diff)
downloadvdr-d41461ad40525286e075b5b09ff6d1f84deb77e9.tar.gz
vdr-d41461ad40525286e075b5b09ff6d1f84deb77e9.tar.bz2
Added a note about the meaning of PERCENTAGEDELTA in cRingBuffer::UpdatePercentage()
Diffstat (limited to 'ringbuffer.c')
-rw-r--r--ringbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 25a01596..fd8123ec 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -7,7 +7,7 @@
* Parts of this file were inspired by the 'ringbuffy.c' from the
* LinuxDVB driver (see linuxtv.org).
*
- * $Id: ringbuffer.c 2.1 2009/03/01 11:20:34 kls Exp $
+ * $Id: ringbuffer.c 2.2 2009/05/17 10:05:17 kls Exp $
*/
#include "ringbuffer.h"
@@ -43,7 +43,7 @@ void cRingBuffer::UpdatePercentage(int Fill)
{
if (Fill > maxFill)
maxFill = Fill;
- int percent = Fill * 100 / (Size() - 1) / PERCENTAGEDELTA * PERCENTAGEDELTA;
+ int percent = Fill * 100 / (Size() - 1) / PERCENTAGEDELTA * PERCENTAGEDELTA; // clamp down to nearest quantum
if (percent != lastPercent) {
if (percent >= PERCENTAGETHRESHOLD && percent > lastPercent || percent < PERCENTAGETHRESHOLD && lastPercent >= PERCENTAGETHRESHOLD) {
dsyslog("buffer usage: %d%% (tid=%d)", percent, getThreadTid);