Files
mcde/lib
lotherk 67a6a1bb71 dtchat: add the UDP call, jitter buffer and push-to-talk (T6.4)
media_call.c: one UDP socket per call (bound, non-blocking, pollable through dc_call_fd), the two direction keys of T6.3, Opus 48 kHz mono and a jitter buffer. dc_call_drain authenticates every datagram and only then puts it into the buffer; dc_call_audio_out decodes one frame (a lost one becomes PLC), dc_call_audio_in encodes and sends one 20 ms frame, dc_call_send_ptt tells the peer about the key (DC_MEDIA_PTT). The jitter buffer starts after DEPTH frames (3 = 60 ms), reorders, drops duplicates and late frames, turns a proved gap into one frame of length 0 and is bounded by 32 slots. test_media_call: jitter below depth/reorder, loss -> concealment, duplicates/late/oversize, depth clamping, and a real loopback UDP run between two calls (PTT on/off seen, ten frames decoded in order with RMS > 1000, a damaged datagram dropped); standalone and ASan/UBSan clean. In-tree build pending: a foreign release chain holds the lock (pid 141722).
2026-11-17 07:28:48 +00:00
..