highfidelity/hifi — pull request #3107 by wangyix (2014-07-02 00:52:07+00:00)
Title: prune missing sequence numbers before sending NACK; AudioRingBuffer frame length can now be specified;

Issue 1: NACK packets may contain sequence numbers that are too old to be in the receiver's SentPacketHistory.

Fix: Before sending a NACK, the missing set of the relevant SequenceNumberStats is pruned (using the same old-age cutoff as the number of packets kept in SentPacketHistory). This way, no super-old sequence numbers will be packed into the NACK packet

Test: not tested

Issue 2: AudioRingBuffer length was hardcoded for all instances at 10. This may be undesirable since upstream and downstream audio may have different amounts of jitter,

Fix: The constructors of AudioRingBuffer and its subclasses now have an additional arg numFramesCapacity. AudioMixerClientData.cpp (upstream) now makes all _ringBuffers to have 100 frames while Audio.cpp (downstream) keeps its ring buffer at 10 frames.

Test: not tested