summaryrefslogtreecommitdiffstats
path: root/src/MemlessPoly.h
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-06-07 21:11:20 +0100
committerandreas128 <Andreas>2017-06-07 21:11:20 +0100
commite37567081d00778aea70ab42ad294679dff328be (patch)
treec2dfbfb8f6f0a9cd942a28713cf850fcf62a8984 /src/MemlessPoly.h
parent02aa4b6c14506b72eb2fe9d3f4e99b751e2e91c8 (diff)
parent418eb33d0948bb12b7b2ed2179d43ad66258aa72 (diff)
downloaddabmod-e37567081d00778aea70ab42ad294679dff328be.tar.gz
dabmod-e37567081d00778aea70ab42ad294679dff328be.tar.bz2
dabmod-e37567081d00778aea70ab42ad294679dff328be.zip
Merge branch 'next_memless' into next
Diffstat (limited to 'src/MemlessPoly.h')
-rw-r--r--src/MemlessPoly.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/MemlessPoly.h b/src/MemlessPoly.h
new file mode 100644
index 0000000..210b4b4
--- /dev/null
+++ b/src/MemlessPoly.h
@@ -0,0 +1,78 @@
+/*
+ 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& coefs_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;
+
+//TODO to protected
+ std::vector<float> m_coefs;
+
+
+protected:
+ int internal_process(Buffer* const dataIn, Buffer* dataOut);
+ void load_coefficients(const std::string &coefFile);
+
+ std::string m_coefs_file;
+
+ mutable std::mutex m_coefs_mutex;
+};
+