Made VoMP audio packet stuffing limit configurable and larger

so that we can test preemptive audio retransmission before we
implement any codecs.
This commit is contained in:
gardners 2012-05-16 11:52:22 +09:30
parent 2c1b42413a
commit d2949f1b05
2 changed files with 7 additions and 1 deletions

View File

@ -1194,6 +1194,11 @@ typedef struct overlay_mdp_addrlist {
#define MDP_VOMPEVENT 7
#define VOMP_MAX_CALLS 16
/* Maximum amount of audio to cram into a VoMP audio packet.
More lets us include preemptive retransmissions.
Less reduces the chance of packets getting lost, and reduces
the bandwidth used. */
#define VOMP_STUFF_BYTES 1024
/* elements sorted by size for alignment */
typedef struct overlay_mdp_vompevent {
/* Once a call has been established, this is how the MDP/VoMP server

3
vomp.c
View File

@ -257,7 +257,8 @@ int vomp_send_status(vomp_call_state *call,int flags,overlay_mdp_frame *arg)
/* stuff frame with most recent sample blocks as a form of preemptive
retransmission. But don't make the packets too large. */
while ((*len)<256) {
while (((*len)+1+vomp_sample_size(sb[rotor].codec))
<VOMP_STUFF_BYTES) {
p[(*len)++]=sb[rotor].codec;
bcopy(&sb[rotor].bytes[0],&p[*len],vomp_sample_size(sb[rotor].codec));
(*len)+=vomp_sample_size(sb[rotor].codec);