Improve output packet interleaving
The 'wait' constant was a terrible means of trying to ensure that the packets were interleaved. Instead, calculate the current highest timestamps of each encoder that's present in the interleaved buffer, and use that as a means of detecting whether the current packet should be sent off. This will guarantee sorting without relying on some arbirary constant that 'assumes' that it'll be interleaved. It also reduces buffering any more than what is needed to interleave.
Showing
想要评论请 注册 或 登录