FFT.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  QM DSP Library
5 
6  Centre for Digital Music, Queen Mary, University of London.
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version. See the file
12  COPYING included with this distribution for more information.
13 */
14 
15 #ifndef QM_DSP_FFT_H
16 #define QM_DSP_FFT_H
17 
18 class FFT
19 {
20 public:
26  FFT(int nsamples);
27  ~FFT();
28 
43  void process(bool inverse,
44  const double *realIn, const double *imagIn,
45  double *realOut, double *imagOut);
46 
47 private:
48  class D;
49  D *m_d;
50 };
51 
52 class FFTReal
53 {
54 public:
62  FFTReal(int nsamples);
63  ~FFTReal();
64 
74  void forward(const double *realIn,
75  double *realOut, double *imagOut);
76 
87  void forwardMagnitude(const double *realIn, double *magOut);
88 
103  void inverse(const double *realIn, const double *imagIn,
104  double *realOut);
105 
106 private:
107  class D;
108  D *m_d;
109 };
110 
111 #endif
D * m_d
Definition: FFT.h:107
Definition: FFT.cpp:22
D * m_d
Definition: FFT.h:48
Definition: FFT.h:18
void process(bool inverse, const double *realIn, const double *imagIn, double *realOut, double *imagOut)
Carry out a forward or inverse transform (depending on the value of inverse) of size nsamples...
Definition: FFT.cpp:91
Definition: FFT.h:52
~FFT()
Definition: FFT.cpp:85
FFT(int nsamples)
Construct an FFT object to carry out complex-to-complex transforms of size nsamples.
Definition: FFT.cpp:80