aboutsummaryrefslogtreecommitdiffstats
path: root/src/Resampler.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-24 17:10:52 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-24 22:22:07 +0200
commitdd429ea2a7d98ba3a6b5806734db347a1bed1924 (patch)
tree1e3f7aa57f1faef63247d5fc3361b9fe860fda61 /src/Resampler.h
parentfc199a7284c5f3a5a84631583ea704748d50b28e (diff)
downloaddabmod-dd429ea2a7d98ba3a6b5806734db347a1bed1924.tar.gz
dabmod-dd429ea2a7d98ba3a6b5806734db347a1bed1924.tar.bz2
dabmod-dd429ea2a7d98ba3a6b5806734db347a1bed1924.zip
Make KISS entirely optional
The Resampler block can also use fftw, and the Makefile only does the kiss fft compilation when --enable-fftw is not given.
Diffstat (limited to 'src/Resampler.h')
-rw-r--r--src/Resampler.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/Resampler.h b/src/Resampler.h
index a19b14e..392d0a6 100644
--- a/src/Resampler.h
+++ b/src/Resampler.h
@@ -1,6 +1,11 @@
/*
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
the Queen in Right of Canada (Communications Research Center Canada)
+
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://opendigitalradio.org
*/
/*
This file is part of ODR-DabMod.
@@ -28,12 +33,19 @@
#include "porting.h"
#include "ModCodec.h"
-#include "kiss_fftsimd.h"
+#if USE_FFTW
+# include <sys/types.h>
+# include <fftw3.h>
+# define FFT_TYPE fftwf_complex
+# define FFT_PLAN fftwf_plan
-#include <sys/types.h>
-#include <kiss_fft.h>
-#include <tools/kiss_fftr.h>
+#else
+# include "kiss_fftsimd.h"
+# include <sys/types.h>
+# include <kiss_fft.h>
+# include <tools/kiss_fftr.h>
+#endif
#include <complex>
typedef std::complex<float> complexf;
@@ -68,5 +80,5 @@ protected:
float myFactor;
};
-
#endif // RESAMPLER_H
+