aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli (think) <matthias@mpb.li>2012-08-17 11:33:02 +0200
committerMatthias P. Braendli (think) <matthias@mpb.li>2012-08-17 11:33:02 +0200
commitd4a1f755a9e5426187fe6e80eb32c299f81104dd (patch)
treeb65bd65db58b277ac04a416da169b74da51099d8 /src/DabMod.cpp
parent63f6e31cad0276352dd508394742b3161dde77bf (diff)
downloaddabmod-d4a1f755a9e5426187fe6e80eb32c299f81104dd.tar.gz
dabmod-d4a1f755a9e5426187fe6e80eb32c299f81104dd.tar.bz2
dabmod-d4a1f755a9e5426187fe6e80eb32c299f81104dd.zip
crc-dabmod: remote control for FIRFilter
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 83fb210..1de320d 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -42,6 +42,7 @@
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <complex>
+#include <string>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
@@ -49,7 +50,6 @@
#include <sys/stat.h>
#include <stdexcept>
#include <signal.h>
-#include <string.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
@@ -174,7 +174,7 @@ int main(int argc, char* argv[])
GainMode gainMode = GAIN_VAR;
Buffer data;
- const char* filterTapsFilename = NULL;
+ std::string filterTapsFilename = "";
// Two configuration sources exist: command line and (new) INI file
bool use_configuration_cmdline = false;
@@ -368,7 +368,7 @@ int main(int argc, char* argv[])
// FIR Filter parameters:
if (pt.get("firfilter.enabled", 0) == 1) {
try {
- filterTapsFilename = pt.get<std::string>("firfilter.enabled").c_str();
+ filterTapsFilename = pt.get<std::string>("firfilter.filtertapsfile");
}
catch (std::exception &e) {
std::cerr << "Error: " << e.what() << "\n";
@@ -455,7 +455,7 @@ int main(int argc, char* argv[])
// When using the FIRFilter, increase the modulator offset pipelining delay
// by the correct amount
- if (filterTapsFilename != NULL) {
+ if (filterTapsFilename != "") {
modconf.delay_calculation_pipeline_stages += FIRFILTER_PIPELINE_DELAY;
}
@@ -543,7 +543,7 @@ int main(int argc, char* argv[])
flowgraph = new Flowgraph();
data.setLength(6144);
input = new InputMemory(&data);
- modulator = new DabModulator(modconf, outputRate, clockRate,
+ modulator = new DabModulator(modconf, rc, outputRate, clockRate,
dabMode, gainMode, amplitude, filterTapsFilename);
flowgraph->connect(input, modulator);
flowgraph->connect(modulator, output);