diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-10 19:35:50 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-10 19:35:50 +0000 |
commit | 8cb986b936ea0cee5af2dccf467fe1fc5b89414b (patch) | |
tree | b4d1b3f66cf87177cb1c8a8ee596b6a9458f8f6c /main/jitterbuf.c | |
parent | 842faddb76b6fbcbd623292bf1656d76eb22f3a7 (diff) |
Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137082 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/jitterbuf.c')
-rw-r--r-- | main/jitterbuf.c | 19 |
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; |