[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / utils / rfft.h
blobce54d63a2452a0706a40d20b3950948a9f0134a4
1 /*
2 * Copyright (C) 2015-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include <vector>
13 #include <kissfft/kiss_fftr.h>
15 //! \brief Class performing a RFFT of interleaved stereo data.
16 class RFFT
18 public:
19 //! \brief The constructor creates a RFFT plan.
20 //! \brief size Length of time data for a single channel.
21 //! \brief windowed Whether or not to apply a Hann window to data.
22 RFFT(int size, bool windowed=false);
24 //! \brief Free the RFFT plan
25 ~RFFT();
27 //! \brief Calculate FFTs
28 //! \param input Input data of size 2*m_size
29 //! \param output Output data of size m_size.
30 void calc(const float* input, float* output);
31 protected:
32 //! \brief Apply a Hann window to a buffer.
33 //! \param data Vector with data to apply window to.
34 static void hann(std::vector<kiss_fft_scalar>& data);
36 size_t m_size; //!< Size for a single channel.
37 bool m_windowed; //!< Whether or not a Hann window is applied.
38 kiss_fftr_cfg m_cfg; //!< FFT plan