summaryrefslogtreecommitdiffstats
path: root/src/DabModulator.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-26 14:58:48 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-26 14:58:48 +0200
commit177eb8d875a5513731e8c9b3019ca44d311e55c3 (patch)
treec88c58f952c4ccb8bc5f2d4eafafc18eb12eb5f3 /src/DabModulator.cpp
parent79274de1247590c7f350d8e6aa1b67f9cc72ab08 (diff)
downloaddabmod-177eb8d875a5513731e8c9b3019ca44d311e55c3.tar.gz
dabmod-177eb8d875a5513731e8c9b3019ca44d311e55c3.tar.bz2
dabmod-177eb8d875a5513731e8c9b3019ca44d311e55c3.zip
Add TII configuration to ini file
Diffstat (limited to 'src/DabModulator.cpp')
-rw-r--r--src/DabModulator.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index 97c36da..dbc6827 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -61,7 +61,8 @@ DabModulator::DabModulator(
unsigned outputRate, unsigned clockRate,
unsigned dabMode, GainMode gainMode,
float digGain, float normalise,
- std::string filterTapsFilename
+ std::string filterTapsFilename,
+ int tiiComb, int tiiPattern
) :
ModCodec(ModFormat(1), ModFormat(0)),
myOutputRate(outputRate),
@@ -73,6 +74,8 @@ DabModulator::DabModulator(
myEtiReader(EtiReader(tist_offset_s, tist_delay_stages, rcs)),
myFlowgraph(NULL),
myFilterTapsFilename(filterTapsFilename),
+ myTiiComb(tiiComb),
+ myTiiPattern(tiiPattern),
myRCs(rcs)
{
PDEBUG("DabModulator::DabModulator(%u, %u, %u, %u) @ %p\n",
@@ -195,8 +198,10 @@ int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
(float)mySpacing * (float)myOutputRate / 2048000.0f,
cic_ratio));
-
- shared_ptr<TII> tii(new TII(myDabMode, 3, 16));
+ shared_ptr<TII> tii;
+ if (myTiiComb != 0) {
+ tii = make_shared<TII>(myDabMode, myTiiPattern, myTiiComb);
+ }
shared_ptr<OfdmGenerator> cifOfdm(
new OfdmGenerator((1 + myNbSymbols), myNbCarriers, mySpacing));
@@ -347,7 +352,10 @@ int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
myFlowgraph->connect(cifFreq, cifDiff);
myFlowgraph->connect(cifNull, cifSig);
myFlowgraph->connect(cifDiff, cifSig);
- myFlowgraph->connect(tii, cifSig);
+ if (tii) {
+ myFlowgraph->connect(tii, cifSig);
+ }
+
if (useCicEq) {
myFlowgraph->connect(cifSig, cifCicEq);
myFlowgraph->connect(cifCicEq, cifOfdm);