aboutsummaryrefslogtreecommitdiffstats
path: root/src/MemlessPoly.h
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-03-26 13:28:02 +0200
committerandreas128 <Andreas>2017-03-26 13:28:02 +0200
commitb49d5c3898f4a6f03d7cb033508ba1416e30c6f0 (patch)
tree41339282a8691e6a2501cce1eaed37b878374390 /src/MemlessPoly.h
parente45d89bdd7ad54bf4fcd4f3220a35ec1d80e94bf (diff)
downloaddabmod-b49d5c3898f4a6f03d7cb033508ba1416e30c6f0.tar.gz
dabmod-b49d5c3898f4a6f03d7cb033508ba1416e30c6f0.tar.bz2
dabmod-b49d5c3898f4a6f03d7cb033508ba1416e30c6f0.zip
Working pipeline
Diffstat (limited to 'src/MemlessPoly.h')
-rw-r--r--src/MemlessPoly.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/MemlessPoly.h b/src/MemlessPoly.h
new file mode 100644
index 0000000..fe372d8
--- /dev/null
+++ b/src/MemlessPoly.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in
+ Right of Canada (Communications Research Center Canada)
+
+ Copyright (C) 2017
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://opendigitalradio.org
+ */
+/*
+ This file is part of ODR-DabMod.
+
+ ODR-DabMod is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ ODR-DabMod is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include "RemoteControl.h"
+#include "ModPlugin.h"
+#include "PcDebug.h"
+#include "ThreadsafeQueue.h"
+
+#include <sys/types.h>
+#include <complex>
+#include <thread>
+#include <vector>
+#include <time.h>
+#include <cstdio>
+#include <string>
+#include <memory>
+
+#define MEMLESSPOLY_PIPELINE_DELAY 1
+
+typedef std::complex<float> complexf;
+
+class MemlessPoly : public PipelinedModCodec, public RemoteControllable
+{
+public:
+ MemlessPoly(const std::string& taps_file);
+
+ virtual const char* name() { return "MemlessPoly"; }
+
+ /******* REMOTE CONTROL ********/
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
+
+ virtual const std::string get_parameter(
+ const std::string& parameter) const;
+
+
+protected:
+ int internal_process(Buffer* const dataIn, Buffer* dataOut);
+ void load_filter_taps(const std::string &tapsFile);
+
+ std::string m_taps_file;
+
+ mutable std::mutex m_taps_mutex;
+ std::vector<float> m_taps;
+};
+