aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabModulator.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 09:47:01 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-12 09:47:01 +0200
commit9bf9469ccdc037d26ccd69ac9e81e64d74fc7008 (patch)
treecac96207e65fb84cd1ee158aa126d6c3ea5a79e3 /src/DabModulator.cpp
parent4fad4de6ec39b2741f8545ed78aa58ea0a6edc6c (diff)
downloaddabmod-9bf9469ccdc037d26ccd69ac9e81e64d74fc7008.tar.gz
dabmod-9bf9469ccdc037d26ccd69ac9e81e64d74fc7008.tar.bz2
dabmod-9bf9469ccdc037d26ccd69ac9e81e64d74fc7008.zip
Handle absence of cifPoly in flowgraph setup
Diffstat (limited to 'src/DabModulator.cpp')
-rw-r--r--src/DabModulator.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index d425f04..4e0bc33 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -367,27 +367,33 @@ int DabModulator::process(Buffer* dataOut)
myFlowgraph->connect(cifOfdm, cifGain);
myFlowgraph->connect(cifGain, cifGuard);
+ auto cifOut = cifPoly ?
+ static_pointer_cast<ModPlugin>(cifPoly) :
+ static_pointer_cast<ModPlugin>(myOutput);
+
if (cifFilter) {
myFlowgraph->connect(cifGuard, cifFilter);
if (cifRes) {
myFlowgraph->connect(cifFilter, cifRes);
- myFlowgraph->connect(cifRes, cifPoly);
+ myFlowgraph->connect(cifRes, cifOut);
}
else {
- myFlowgraph->connect(cifFilter, cifPoly);
+ myFlowgraph->connect(cifFilter, cifOut);
}
}
else {
if (cifRes) {
myFlowgraph->connect(cifGuard, cifRes);
- myFlowgraph->connect(cifRes, cifPoly);
+ myFlowgraph->connect(cifRes, cifOut);
}
else {
- myFlowgraph->connect(cifGuard, cifPoly);
+ myFlowgraph->connect(cifGuard, cifOut);
}
}
- myFlowgraph->connect(cifPoly, myOutput);
+ if (cifPoly) {
+ myFlowgraph->connect(cifPoly, myOutput);
+ }
}
////////////////////////////////////////////////////////////////////