From 215e8143e3feefd69a76d0b6eaf36ed42a7a904f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 23 Dec 2017 07:59:14 +0100 Subject: Add OFDM windowing to config file --- src/ConfigParser.cpp | 6 +++++- src/ConfigParser.h | 2 ++ src/DabModulator.cpp | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 1cc94c0..2c93a57 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -159,8 +159,12 @@ static void parse_configfile( mod_settings.dabMode = pt.get("modulator.mode", mod_settings.dabMode); mod_settings.clockRate = pt.get("modulator.dac_clk_rate", (size_t)0); - mod_settings.digitalgain = pt.get("modulator.digital_gain", mod_settings.digitalgain); + mod_settings.digitalgain = pt.get("modulator.digital_gain", + mod_settings.digitalgain); + mod_settings.outputRate = pt.get("modulator.rate", mod_settings.outputRate); + mod_settings.ofdmWindowOverlap = pt.get("modulator.ofdmwindowing", + mod_settings.ofdmWindowOverlap); // FIR Filter parameters: if (pt.get("firfilter.enabled", 0) == 1) { diff --git a/src/ConfigParser.h b/src/ConfigParser.h index a8d7837..0be3558 100644 --- a/src/ConfigParser.h +++ b/src/ConfigParser.h @@ -82,6 +82,8 @@ struct mod_settings_t { float cfrClip = 1.0f; float cfrErrorClip = 1.0f; + // Settings for the OFDM windowing + unsigned ofdmWindowOverlap = 0; #if defined(HAVE_OUTPUT_UHD) OutputUHDConfig outputuhd_conf; diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp index cded280..0818f4f 100644 --- a/src/DabModulator.cpp +++ b/src/DabModulator.cpp @@ -201,7 +201,8 @@ int DabModulator::process(Buffer* dataOut) rcs.enrol(cifGain.get()); auto cifGuard = make_shared( - myNbSymbols, mySpacing, myNullSize, mySymSize); + myNbSymbols, mySpacing, myNullSize, mySymSize, + m_settings.ofdmWindowOverlap); rcs.enrol(cifGuard.get()); shared_ptr cifFilter; -- cgit v1.2.3