aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-03-15 15:42:15 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-03-15 15:42:15 +0100
commitc92c05d1199a2380d8c8c79a89c7e1f3159a2603 (patch)
tree38af70c7d3a659a8e03dcfa11732f7bde731eaae /contrib
parent6f5e28b0fa0e6a4cdc3c9f4e8f1cceac11d85798 (diff)
downloadODR-AudioEnc-c92c05d1199a2380d8c8c79a89c7e1f3159a2603.tar.gz
ODR-AudioEnc-c92c05d1199a2380d8c8c79a89c7e1f3159a2603.tar.bz2
ODR-AudioEnc-c92c05d1199a2380d8c8c79a89c7e1f3159a2603.zip
Common c90e505: Fix EDI UDP packet spreading set to 0
Diffstat (limited to 'contrib')
-rw-r--r--contrib/edioutput/Transport.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/edioutput/Transport.cpp b/contrib/edioutput/Transport.cpp
index 136c71c..274f7ec 100644
--- a/contrib/edioutput/Transport.cpp
+++ b/contrib/edioutput/Transport.cpp
@@ -135,14 +135,17 @@ void Sender::write(const TagPacket& tagpacket)
edi_fragments.size());
}
- /* Spread out the transmission of all fragments over 25% of the 24ms AF packet duration
+ /* Spread out the transmission of all fragments over part of the 24ms AF packet duration
* to reduce the risk of losing a burst of fragments because of congestion. */
using namespace std::chrono;
- auto inter_fragment_wait_time = microseconds(0);
+ auto inter_fragment_wait_time = microseconds(1);
if (edi_fragments.size() > 1) {
- inter_fragment_wait_time = microseconds(
- llrint(m_conf.fragment_spreading_factor * 24000.0 / edi_fragments.size())
- );
+ if (m_conf.fragment_spreading_factor > 0) {
+ inter_fragment_wait_time =
+ microseconds(
+ llrint(m_conf.fragment_spreading_factor * 24000.0 / edi_fragments.size())
+ );
+ }
}
/* Separate insertion into map and transmission so as to make spreading possible */