4e8074cb92ac700b98cc8277e3719097377c800c
Replace the fixed 3-frame (~60ms) playout delay with a feedback controller that tunes depth to real network behavior, no wall clock needed: - Grow (+1 frame) on a late-arriving packet (one for a sequence already played past) or a gap that forces Opus PLC — jitter beat the cushion. - Shrink (-1 frame) after a long unbroken run of real frames — the link is comfortably ahead. Fast grow, slow shrink (AIMD-style). - Bounded to [2, 12] frames (40-240ms), well under MAX_BUFFERED_FRAMES. - Benign silence (a talker pausing) emits none of these signals, so the delay is untouched across quiet stretches — avoids the classic "inflate delay because someone went quiet" bug. - Prime-timeout safety net: since the mixer polls every ~20ms, prime after ~500ms even under a grown target so a short utterance isn't held forever and startup latency stays bounded. No public API change; all logic stays in jitter.rs. Adds 8 unit tests (grow/shrink, both bounds, silence-neutrality, prime timeout). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>