From 5b0262d53fb96e17bc13684d8d82a9b5bfd40727 Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 1 Oct 2026 02:57:18 +0300 Subject: [PATCH] Diagnose refill expectation with the corrected reserve --- tools/chatgui/tests/test_call_jitter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/chatgui/tests/test_call_jitter.cpp b/tools/chatgui/tests/test_call_jitter.cpp index 1fa31a3d..ed72a323 100644 --- a/tools/chatgui/tests/test_call_jitter.cpp +++ b/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);