From 744bea73fb0e661c5f1dfa2b00cfb6940bfc6e37 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 9 Mar 2014 20:06:55 +0100 Subject: Change UHD config device to a std::string --- src/DabMod.cpp | 4 ++-- src/OutputUHD.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 29c0421..6d85c8e 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -413,7 +413,7 @@ int main(int argc, char* argv[]) useFileOutput = 1; } else if (output_selected == "uhd") { - outputuhd_conf.device = pt.get("uhdoutput.device", "").c_str(); + outputuhd_conf.device = pt.get("uhdoutput.device", ""); outputuhd_conf.txgain = pt.get("uhdoutput.txgain", 0); outputuhd_conf.frequency = pt.get("uhdoutput.frequency", 0); std::string chan = pt.get("uhdoutput.channel", ""); @@ -580,7 +580,7 @@ int main(int argc, char* argv[]) fprintf(stderr, " Source: %s\n", inputName.c_str()); fprintf(stderr, "Output\n"); if (useUHDOutput) { - fprintf(stderr, " UHD, Device: %s\n", outputuhd_conf.device); + fprintf(stderr, " UHD, Device: %s\n", outputuhd_conf.device.c_str()); } else if (useFileOutput) { fprintf(stderr, " Name: %s\n", outputName.c_str()); diff --git a/src/OutputUHD.h b/src/OutputUHD.h index 107df2a..29f54d6 100644 --- a/src/OutputUHD.h +++ b/src/OutputUHD.h @@ -148,7 +148,7 @@ class UHDWorker { /* This structure is used as initial configuration for OutputUHD */ struct OutputUHDConfig { - const char* device; + std::string device; unsigned sampleRate; double frequency; int txgain; -- cgit v1.2.3