| 1 | /*************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. |
| 4 | ** Contact: http://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the examples of the Qt Toolkit. |
| 7 | ** |
| 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/>. |
| 17 | ** |
| 18 | ***************************************************************************/ |
| 19 | |
| 20 | #include "fftreal_wrapper.h" |
| 21 | |
| 22 | // FFTReal code generates quite a lot of 'unused parameter' compiler warnings, |
| 23 | // which we suppress here in order to get a clean build output. |
| 24 | #if defined Q_CC_MSVC |
| 25 | # pragma warning(disable:4100) |
| 26 | #elif defined Q_CC_GNU |
| 27 | # pragma GCC diagnostic ignored "-Wunused-parameter" |
| 28 | #elif defined Q_CC_MWERKS |
| 29 | # pragma warning off (10182) |
| 30 | #endif |
| 31 | |
| 32 | #include "FFTRealFixLen.h" |
| 33 | |
| 34 | class FFTRealWrapperPrivate { |
| 35 | public: |
| 36 | FFTRealFixLen<FFTLengthPowerOfTwo> m_fft; |
| 37 | }; |
| 38 | |
| 39 | |
| 40 | FFTRealWrapper::FFTRealWrapper() |
| 41 | : m_private(new FFTRealWrapperPrivate) |
| 42 | { |
| 43 | |
| 44 | } |
| 45 | |
| 46 | FFTRealWrapper::~FFTRealWrapper() |
| 47 | { |
| 48 | delete m_private; |
| 49 | } |
| 50 | |
| 51 | void FFTRealWrapper::calculateFFT(DataType in[], const DataType out[]) |
| 52 | { |
| 53 | m_private->m_fft.do_fft(f: in, x: out); |
| 54 | } |
| 55 | |