aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 17:44:29 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 17:44:29 +0100
commitc74279c0af306e2fb4a1f03b0a698fb239f4c33b (patch)
tree7a8990ac13ef856c3e17a3be7274572408750752 /src/DabMod.cpp
parentafb8d8d8bcad7294c114c9a72123964a171cb01a (diff)
downloaddabmod-c74279c0af306e2fb4a1f03b0a698fb239f4c33b.tar.gz
dabmod-c74279c0af306e2fb4a1f03b0a698fb239f4c33b.tar.bz2
dabmod-c74279c0af306e2fb4a1f03b0a698fb239f4c33b.zip
Use milliseconds for edi_max_delay
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index a5e3163..8065a5a 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -132,7 +132,7 @@ int launch_modulator(int argc, char* argv[])
std::string inputName = "";
std::string inputTransport = "file";
unsigned inputMaxFramesQueued = ZMQ_INPUT_MAX_FRAME_QUEUE;
- int edi_max_delay = 0;
+ float edi_max_delay_ms = 0.0f;
std::string outputName;
int useZeroMQOutput = 0;
@@ -388,7 +388,7 @@ int launch_modulator(int argc, char* argv[])
inputMaxFramesQueued = pt.get("input.max_frames_queued",
ZMQ_INPUT_MAX_FRAME_QUEUE);
- edi_max_delay = pt.get("input.edi_max_delay", 0);
+ edi_max_delay_ms = pt.get("input.edi_max_delay", 0.0f);
inputName = pt.get("input.source", "/dev/stdin");
@@ -698,8 +698,9 @@ int launch_modulator(int argc, char* argv[])
EdiReader ediReader;
EdiDecoder::ETIDecoder ediInput(ediReader);
- if (edi_max_delay > 0) {
- ediInput.setMaxDelay(edi_max_delay);
+ if (edi_max_delay_ms > 0.0f) {
+ // setMaxDelay wants number of AF packets, which correspond to 24ms ETI frames
+ ediInput.setMaxDelay(lroundf(edi_max_delay_ms / 24.0f));
}
EdiUdpInput ediUdpInput(ediInput);