aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 08:27:45 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 08:27:45 +0200
commit64e77f042402b5f881fb99b28bd15fe343e51494 (patch)
treedbbd56a20b732b9bd991a2fa0d2437ba2ebe381c
parent2b877e304d52c406720050aa55eed97b6f7869be (diff)
downloaddabmod-64e77f042402b5f881fb99b28bd15fe343e51494.tar.gz
dabmod-64e77f042402b5f881fb99b28bd15fe343e51494.tar.bz2
dabmod-64e77f042402b5f881fb99b28bd15fe343e51494.zip
Initialise flowgraph correctly with FIRFilter
-rw-r--r--src/DabModulator.cpp50
1 files changed, 23 insertions, 27 deletions
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index 8e3af8a..d425f04 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -360,42 +360,38 @@ int DabModulator::process(Buffer* dataOut)
if (useCicEq) {
myFlowgraph->connect(cifSig, cifCicEq);
myFlowgraph->connect(cifCicEq, cifOfdm);
- } else {
+ }
+ else {
myFlowgraph->connect(cifSig, cifOfdm);
}
myFlowgraph->connect(cifOfdm, cifGain);
myFlowgraph->connect(cifGain, cifGuard);
-#warning "Flowgraph logic incomplete (skips FIRFilter)!"
- //if (cifFilter) {
- // myFlowgraph->connect(cifGuard, cifFilter);
- // if (cifRes) {
- // myFlowgraph->connect(cifFilter, cifRes);
- // myFlowgraph->connect(cifRes, myOutput);
- // } else {
- // myFlowgraph->connect(cifFilter, myOutput);
- // }
- //}
- //else { //no filtering
- // if (cifRes) {
- // myFlowgraph->connect(cifGuard, cifRes);
- // myFlowgraph->connect(cifRes, myOutput);
- // } else {
- // myFlowgraph->connect(cifGuard, myOutput);
- // }
- //}
- if (cifRes) {
- myFlowgraph->connect(cifGuard, cifRes);
- myFlowgraph->connect(cifRes, cifPoly);
- myFlowgraph->connect(cifPoly, myOutput);
- } else {
- myFlowgraph->connect(cifGuard, cifPoly);
- myFlowgraph->connect(cifPoly, myOutput);
+ if (cifFilter) {
+ myFlowgraph->connect(cifGuard, cifFilter);
+ if (cifRes) {
+ myFlowgraph->connect(cifFilter, cifRes);
+ myFlowgraph->connect(cifRes, cifPoly);
+ }
+ else {
+ myFlowgraph->connect(cifFilter, cifPoly);
+ }
}
+ else {
+ if (cifRes) {
+ myFlowgraph->connect(cifGuard, cifRes);
+ myFlowgraph->connect(cifRes, cifPoly);
+ }
+ else {
+ myFlowgraph->connect(cifGuard, cifPoly);
+ }
+ }
+
+ myFlowgraph->connect(cifPoly, myOutput);
}
////////////////////////////////////////////////////////////////////
- // Proccessing data
+ // Processing data
////////////////////////////////////////////////////////////////////
return myFlowgraph->run();
}