Wayverb
fft.h
1 #pragma once
2 
3 #include <complex>
4 #include <memory>
5 #include <vector>
6 
7 namespace frequency_domain {
8 
9 class dft_1d final {
10 public:
11  enum class direction { forwards, backwards };
12 
13  dft_1d(direction dir, size_t size);
14  ~dft_1d() noexcept;
15 
16  dft_1d(const dft_1d&) = delete;
17  dft_1d(dft_1d&&) noexcept = delete;
18 
19  dft_1d& operator=(const dft_1d&) = delete;
20  dft_1d& operator=(dft_1d&&) noexcept = delete;
21 
22  std::vector<std::complex<float>> run(
23  const std::complex<float>* begin,
24  const std::complex<float>* end);
25 
26 private:
27  class impl;
28  std::unique_ptr<impl> pimpl_;
29 };
30 
31 std::vector<std::complex<float>> run(dft_1d& fft,
32  const std::complex<float>* begin,
33  const std::complex<float>* end);
34 std::vector<std::complex<float>> run(dft_1d& fft,
35  const float* begin,
36  const float* end);
37 
38 } // namespace frequency_domain
Definition: buffer.h:5
Definition: dir.h:9
Definition: fft.h:9
Definition: fft.cpp:27