From 913cd43139d7b5d6eac166a01ac09a754f2bd013 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 19 Aug 2022 17:12:54 +0200 Subject: Support EDI TCP server pre-roll on client connect Includes common code changes: socket changes for keepalive and preroll --- src/DabMux.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/DabMux.cpp') diff --git a/src/DabMux.cpp b/src/DabMux.cpp index 3938131..4373265 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -3,7 +3,7 @@ 2011, 2012 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2019 + Copyright (C) 2022 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -355,6 +355,11 @@ int main(int argc, char *argv[]) } } + const auto tist_offset = pt.get("general.tist_offset", 0); + // By keeping 1.5 x tist_offset worth of EDI in the pre-roll buffer, we ensure that a new client can + // immediately send out frames according to their timestamp. + edi_conf.tcp_server_preroll_buffers = ceil(1.5 * (tist_offset / 24e-3)); + edi_conf.dump = pt_edi.get("dump", false); edi_conf.enable_pft = pt_edi.get("enable_pft", false); edi_conf.verbose = pt_edi.get("verbose", false); -- cgit v1.2.3