hx3d  1
2D/3D Simple Game Framework
fft.hpp
1 /*
2  FFT calculation.
3  Source: http://rosettacode.org/wiki/Fast_Fourier_transform#C.2B.2B
4 
5  Copyright (C) 2015 Denis BOURGE
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
20  USA
21 */
22 
23 #ifndef HX3D_AUDIO_FFT
24 #define HX3D_AUDIO_FFT
25 
26 #include "hx3d/math/constants.hpp"
27 
28 #include <valarray>
29 
30 namespace hx3d {
31 namespace audio {
32 
36 class FFT {
37 public:
38 
46  static void fft(std::valarray<Complex>& vector);
47 
55  static void bfft(std::valarray<Complex>& vector);
56 };
57 
58 } /* audio */
59 } /* hx3d */
60 
61 #endif
static void fft(std::valarray< Complex > &vector)
Cooley–Tukey FFT (in-place, divide-and-conquer)
Definition: fft.cpp:28
hx3d framework namespace
Definition: audio.hpp:26
static void bfft(std::valarray< Complex > &vector)
Cooley-Tukey FFT (in-place, breadth-first, decimation-in-frequency)
Definition: fft.cpp:50
FFT calculation helpers and methods.
Definition: fft.hpp:36