From fd6d695275f88e83ebba6fa39afc044e329a690f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 25 Dec 2016 23:53:51 +0100 Subject: Add first version of EDI input --- src/DabMod.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/DabMod.cpp') diff --git a/src/DabMod.cpp b/src/DabMod.cpp index fc28218..e44ed20 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -187,6 +187,7 @@ int launch_modulator(int argc, char* argv[]) auto inputZeroMQReader = make_shared(); #endif + auto inputEdiReader = make_shared(); auto inputTcpReader = make_shared(); struct sigaction sa; @@ -712,6 +713,10 @@ int launch_modulator(int argc, char* argv[]) inputTcpReader->Open(inputName); m.inputReader = inputTcpReader.get(); } + else if (inputTransport == "edi") { + inputEdiReader->Open(inputName); + m.inputReader = inputEdiReader.get(); + } else { fprintf(stderr, "Error, invalid input transport %s selected!\n", inputTransport.c_str()); @@ -770,11 +775,11 @@ int launch_modulator(int argc, char* argv[]) m.flowgraph = &flowgraph; m.data.setLength(6144); - shared_ptr input(new InputMemory(&m.data)); - shared_ptr modulator( - new DabModulator(tist_offset_s, tist_delay_stages, - tiiConfig, outputRate, clockRate, dabMode, gainMode, - digitalgain, normalise, filterTapsFilename)); + auto input = make_shared(&m.data); + auto modulator = make_shared( + tist_offset_s, tist_delay_stages, + tiiConfig, outputRate, clockRate, dabMode, gainMode, + digitalgain, normalise, filterTapsFilename); flowgraph.connect(input, modulator); if (format_converter) { -- cgit v1.2.3