-
Notifications
You must be signed in to change notification settings - Fork 0
Description
If we're going to keep sending the PTT_START message, it needs to be synchronized with the voice frames.
Right now, the PTT_START message comes out of Interlocutor about 63ms before the first voice frame. That's long enough to require a dummy frame in between, but that's not the biggest part of the problem. It's also about 180 degrees out of phase with the voice frames. That makes it close to the edge of the window, which is plus and minus half a frame, referenced to the time when the first frame arrived. With just a few milliseconds of jitter, that can lead to an ongoing problem with untimely frames and dummy frames being inserted unnecessarily.
The timing doesn't have to be super precise, as long as the PTT_START message comes out on the wire within a few milliseconds of 40ms before the first voice frame. So, if the voice frame is already coming out with minimum possible latency (thanks to packetization delays and pipeline delays, presumably dominated by Opus), we need to artificially delay the PTT_START by about 23ms.
Before we add a constant delay like 23ms, we need to better characterize what the delay is. I've only eye-ball-averaged a few data points I noticed while looking for other things in Wireshark traces.