Lines Matching refs:tb
88 static void tb_init(struct TimingBuffer *tb)
90 tb->filled = 0;
91 tb->curr_count = 0;
95 static void tb_add(struct TimingBuffer *tb, spx_int16_t timing)
99 if (tb->filled >= MAX_TIMINGS && timing >= tb->timing[tb->filled-1])
101 tb->curr_count++;
108 while (pos<tb->filled && timing >= tb->timing[pos])
113 speex_assert(pos <= tb->filled && pos < MAX_TIMINGS);
116 if (pos < tb->filled)
118 int move_size = tb->filled-pos;
119 if (tb->filled == MAX_TIMINGS)
121 SPEEX_MOVE(&tb->timing[pos+1], &tb->timing[pos], move_size);
122 SPEEX_MOVE(&tb->counts[pos+1], &tb->counts[pos], move_size);
125 tb->timing[pos] = timing;
126 tb->counts[pos] = tb->curr_count;
128 tb->curr_count++;
129 if (tb->filled<MAX_TIMINGS)
130 tb->filled++;
170 @param tb Array of buffers
186 struct TimingBuffer *tb;
188 tb = jitter->_tb;
193 tot_count += tb[i].curr_count;
217 if (pos[j] < tb[j].filled && tb[j].timing[pos[j]] < latest)
220 latest = tb[j].timing[pos[j]];