42 std::shared_ptr<FFTPlan> m_plan;
67 std::complex<sample_t>* m_inBuffer;
82 std::shared_ptr<std::vector<std::complex<sample_t>>> m_irBuffer;
99 FFTConvolver(std::shared_ptr<std::vector<std::complex<sample_t>>> ir, std::shared_ptr<FFTPlan> plan);
170 void getNextFDL(
const std::complex<sample_t>* inBuffer, std::complex<sample_t>* accBuffer);
181 void getNextFDL(
const sample_t* inBuffer, std::complex<sample_t>* accBuffer,
int& length, fftwf_complex* transformedData);
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition Audaspace.h:119
float sample_t
Sample type.(float samples)
Definition Audaspace.h:126
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition Audaspace.h:93
This class allows to easily convolve a sound using the Fourier transform.
Definition FFTConvolver.h:37
void getTail(int &length, bool &eos, sample_t *buffer)
Gets the internally stored extra data which is result of the convolution.
FFTConvolver(std::shared_ptr< std::vector< std::complex< sample_t > > > ir, std::shared_ptr< FFTPlan > plan)
Creates a new FFTConvolver.
void IFFT_FDL(const fftwf_complex *inBuffer, sample_t *outBuffer, int &length)
Calculates the Inverse Fast Fourier Transform of the input array.
void getNextFDL(const sample_t *inBuffer, std::complex< sample_t > *accBuffer, int &length, fftwf_complex *transformedData)
Transforms an input array of real data to the frequency domain and multiplies it by the impulse respo...
std::shared_ptr< std::vector< std::complex< sample_t > > > getImpulseResponse()
Retrieves the current impulse response being used.
void clear()
Resets the internally stored data so a new convolution can be started.
void getNext(const sample_t *inBuffer, sample_t *outBuffer, int &length)
Convolves the data that is provided with the inpulse response.
void setImpulseResponse(std::shared_ptr< std::vector< std::complex< sample_t > > > ir)
Changes the impulse response and resets the FFTConvolver.
void getNext(const fftwf_complex *inBuffer, sample_t *outBuffer, int &length)
Convolves the data that is provided with the inpulse response.
void getNext(const sample_t *inBuffer, sample_t *outBuffer, int &length, fftwf_complex *transformedData)
Convolves the data that is provided with the inpulse response.
void getNextFDL(const std::complex< sample_t > *inBuffer, std::complex< sample_t > *accBuffer)
Multiplicates a frequency domain input by the impulse response and accumulates the result to a buffer...