aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabModulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DabModulator.cpp')
-rw-r--r--src/DabModulator.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index 4e0bc33..bebbedd 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -74,7 +74,7 @@ DabModulator::DabModulator(
myNormalise(normalise),
myGainmodeVariance(gainmodeVariance),
myEtiSource(etiSource),
- myFlowgraph(NULL),
+ myFlowgraph(),
myFilterTapsFilename(filterTapsFilename),
myPolyCoefFilename(polyCoefFilename),
myTiiConfig(tiiConfig)
@@ -90,14 +90,6 @@ DabModulator::DabModulator(
}
-DabModulator::~DabModulator()
-{
- PDEBUG("DabModulator::~DabModulator() @ %p\n", this);
-
- delete myFlowgraph;
-}
-
-
void DabModulator::setMode(unsigned mode)
{
switch (mode) {
@@ -145,7 +137,7 @@ int DabModulator::process(Buffer* dataOut)
PDEBUG("DabModulator::process(dataOut: %p)\n", dataOut);
- if (myFlowgraph == NULL) {
+ if (not myFlowgraph) {
unsigned mode = myEtiSource.getMode();
if (myDabMode != 0) {
mode = myDabMode;
@@ -154,7 +146,7 @@ int DabModulator::process(Buffer* dataOut)
}
setMode(mode);
- myFlowgraph = new Flowgraph();
+ myFlowgraph = make_shared<Flowgraph>();
////////////////////////////////////////////////////////////////
// CIF data initialisation
////////////////////////////////////////////////////////////////