Diagnose refill expectation with the corrected reserve

This commit is contained in:
evgeny committed 2026-10-01 02:57:18 +03:00
1 parent 4a2efe21c7
commit 5b0262d53f
1 file changed
+7 -1
+7 -1
View File
@@ -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);