1 /***************************************************************************
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
6 ** This file is part of the examples of the Qt Toolkit.
8 ** This program is free software: you can redistribute it and/or modify
9 ** it under the terms of the GNU Lesser General Public License as
10 ** published by the Free Software Foundation, either version 2.1. This
11 ** program is distributed in the hope that it will be useful, but WITHOUT
12 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 ** for more details. You should have received a copy of the GNU General
15 ** Public License along with this program. If not, see
16 ** <http://www.gnu.org/licenses/>.
18 ***************************************************************************/
20 #ifndef FFTREAL_WRAPPER_H
21 #define FFTREAL_WRAPPER_H
23 #include <QtCore/QtGlobal>
25 #if defined(FFTREAL_LIBRARY)
26 # define FFTREAL_EXPORT Q_DECL_EXPORT
28 # define FFTREAL_EXPORT Q_DECL_IMPORT
31 class FFTRealWrapperPrivate;
33 // Each pass of the FFT processes 2^X samples, where X is the
35 static const int FFTLengthPowerOfTwo = 12;
38 * Wrapper around the FFTRealFixLen template provided by the FFTReal
41 * This class instantiates a single instance of FFTRealFixLen, using
42 * FFTLengthPowerOfTwo as the template parameter. It then exposes
43 * FFTRealFixLen<FFTLengthPowerOfTwo>::do_fft via the calculateFFT
44 * function, thereby allowing an application to dynamically link
45 * against the FFTReal implementation.
47 * See http://ldesoras.free.fr/prod.html
49 class FFTREAL_EXPORT FFTRealWrapper
55 typedef float DataType;
56 void calculateFFT(DataType in[], const DataType out[]);
59 FFTRealWrapperPrivate* m_private;
62 #endif // FFTREAL_WRAPPER_H