Browse Source

Diagnose refill expectation with the corrected reserve

master
evgeny 2 days ago
parent
commit
5b0262d53f
  1. 8
      tools/chatgui/tests/test_call_jitter.cpp

8
tools/chatgui/tests/test_call_jitter.cpp

@ -83,7 +83,13 @@ int main() {
for (int i = 0; i < 100; i++) call_jitter_pull(j, pcm, 480);
size_t before = d.seen.size();
push(j, next++); push(j, next++);
CHECK(call_jitter_pull(j, pcm, 480) == 0);
int refill = call_jitter_pull(j, pcm, 480);
if (refill) {
call_jitter_get_stats(j, &depth, nullptr, nullptr, nullptr, &range);
DEBUG_ERROR(DEBUG_CATEGORY_CALL, "refill check: pcm=%d remaining=%dms reserve=%dms decoded=%zu",
refill, depth, range.reserve_ms, d.seen.size() - before);
}
CHECK(refill == 0);
CHECK(d.seen.size() == before);
for (int i = 0; i < 50; i++) push(j, next++);
CHECK(call_jitter_pull(j, pcm, 480) > 0);

Loading…
Cancel
Save