mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
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:
parent
2c1b42413a
commit
d2949f1b05
5
serval.h
5
serval.h
@ -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
3
vomp.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user