aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-09-18 11:19:17 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-09-18 11:19:17 +0200
commit0e6ca79d9dc6171eeea89d86807c9d7be9bdb305 (patch)
tree2a0721571c2214e24a416fd783e5b596eba68bb2
parent2623ad8c187c61c6c3bad4819683346438529b89 (diff)
downloaddabmod-0e6ca79d9dc6171eeea89d86807c9d7be9bdb305.tar.gz
dabmod-0e6ca79d9dc6171eeea89d86807c9d7be9bdb305.tar.bz2
dabmod-0e6ca79d9dc6171eeea89d86807c9d7be9bdb305.zip
Give RemoteControllers a global lifetime
-rw-r--r--src/DabMod.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 6d67dc4..348f336 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -76,6 +76,10 @@ typedef std::complex<float> complexf;
using namespace std;
+// We need global lifetime for the RemoteControllers because
+// some destructors of long lived objects use it.
+RemoteControllers rcs;
+
volatile sig_atomic_t running = 1;
void signalHandler(int signalNb)
@@ -164,7 +168,6 @@ int launch_modulator(int argc, char* argv[])
shared_ptr<FormatConverter> format_converter;
shared_ptr<ModOutput> output;
- RemoteControllers rcs;
m.rcs = &rcs;
bool run_again = true;