OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
ossia::exact_fft Class Reference

Exact-length transforms, including lengths that are not powers of two. More...

Detailed Description

Exact-length transforms, including lengths that are not powers of two.

Construct off the audio thread. Execution does not allocate. Use one plan per concurrent execution.

Public Types

enum class  kind { real_forward , real_inverse , complex_forward , complex_inverse }

Public Member Functions

 exact_fft (std::size_t size, kind mode)
 exact_fft (const exact_fft &)=delete
exact_fft & operator= (const exact_fft &)=delete
void execute (std::span< const float > input, std::span< std::complex< float > > output) noexcept
 N real samples to N/2+1 complex bins (DC through the nonnegative half).
void execute (std::span< const std::complex< float > > input, std::span< float > output, float scale=1.f) noexcept
 N/2+1 Hermitian bins to N real samples. No implicit 1/N normalization.
void execute (std::span< const std::complex< float > > input, std::span< std::complex< float > > output, float scale=1.f) noexcept
 N complex samples to N bins, or an output prefix for a forward transform.

Member Function Documentation

◆ execute()

void ossia::exact_fft::execute ( std::span< const std::complex< float > > input,
std::span< std::complex< float > > output,
float scale = 1.f )
noexcept

N complex samples to N bins, or an output prefix for a forward transform.

The buffers may have the same start but must not otherwise overlap. No implicit 1/N normalization.