summaryrefslogtreecommitdiff
path: root/main/jitterbuf.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-10 19:35:50 +0000
committerSean Bright <sean@malleable.com>2008-08-10 19:35:50 +0000
commitb69c8e6ab5b5d20a964d67e93cda8dc07da61fa4 (patch)
treeb4d1b3f66cf87177cb1c8a8ee596b6a9458f8f6c /main/jitterbuf.c
parent3ffb39833b25a02108214d7584733bc6b9c334df (diff)
Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/jitterbuf.c')
-rw-r--r--main/jitterbuf.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/main/jitterbuf.c b/main/jitterbuf.c
index d8297a0a8..834be8781 100644
--- a/main/jitterbuf.c
+++ b/main/jitterbuf.c
@@ -277,7 +277,7 @@ static void history_calc_maxbuf(jitterbuf *jb)
static void history_get(jitterbuf *jb)
{
long max, min, jitter;
- int index;
+ int idx;
int count;
if (!jb->hist_maxbuf_valid)
@@ -286,22 +286,21 @@ static void history_get(jitterbuf *jb)
/* count is how many items in history we're examining */
count = (jb->hist_ptr < JB_HISTORY_SZ) ? jb->hist_ptr : JB_HISTORY_SZ;
- /* index is the "n"ths highest/lowest that we'll look for */
- index = count * JB_HISTORY_DROPPCT / 100;
+ /* idx is the "n"ths highest/lowest that we'll look for */
+ idx = count * JB_HISTORY_DROPPCT / 100;
- /* sanity checks for index */
- if (index > (JB_HISTORY_MAXBUF_SZ - 1))
- index = JB_HISTORY_MAXBUF_SZ - 1;
+ /* sanity checks for idx */
+ if (idx > (JB_HISTORY_MAXBUF_SZ - 1))
+ idx = JB_HISTORY_MAXBUF_SZ - 1;
-
- if (index < 0) {
+ if (idx < 0) {
jb->info.min = 0;
jb->info.jitter = 0;
return;
}
- max = jb->hist_maxbuf[index];
- min = jb->hist_minbuf[index];
+ max = jb->hist_maxbuf[idx];
+ min = jb->hist_minbuf[idx];
jitter = max - min;