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.
13 #include <kissfft/kiss_fftr.h>
15 //! \brief Class performing a RFFT of interleaved stereo data.
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
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
);
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