diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-06 17:44:29 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-06 17:44:29 +0100 |
commit | c74279c0af306e2fb4a1f03b0a698fb239f4c33b (patch) | |
tree | 7a8990ac13ef856c3e17a3be7274572408750752 /src/DabMod.cpp | |
parent | afb8d8d8bcad7294c114c9a72123964a171cb01a (diff) | |
download | dabmod-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.cpp | 9 |
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); |