summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);