#include <TOouraFFT.hpp>
|
using | uchar = unsigned char |
|
using | uint = unsigned int |
|
Definition at line 10 of file TOouraFFT.hpp.
◆ uchar
◆ uint
◆ FFTOoura()
tklb::FFTOoura::FFTOoura |
( |
uint |
size = 0 | ) |
|
|
inline |
◆ back()
Frequency domain back to time domain.
- Parameters
-
input | Buffer with 2 channels. channel 0 for real and 1 for imaginary |
result | Single channel output buffer. Needs to be twice the size of the imput buffer |
Definition at line 88 of file TOouraFFT.hpp.
90 const T* real = input[0];
91 const T* imaginary = input[1];
94 while (processed < input.validSize()) {
98 double* bEnd = b +
mSize;
99 const uint processedHalf = processed / 2;
100 const T* r = real + processedHalf;
101 const T* i = imaginary + processedHalf;
111 const T volume = 2.0 / T(
mSize);
112 if (std::is_same<T, double>::value) {
117 const double* buf =
mBuffer[0];
119 out[i + processed] = buf[i] * volume;
#define TKLB_ASSERT(condition)
Wrap assertions.
void multiply(const AudioBufferTpl< T2, STORAGE2 > &buffer, Size length=0, Size offsetSrc=0, Size offsetDst=0)
Multiply two buffers.
Size put(T2 *target, Size length=0, const uchar channel=0, const Size offset=0) const
Fill the provided array with the contents of this buffer.
HeapBuffer< int, 16 > mIp
AudioBufferDouble mBuffer
◆ forward()
timedomain to frequency domain
- Parameters
-
input | Input buffer, validSize needs to be a multiple of 2 |
output | Output buffer, must have 2 channel for real and imaginary. Half the length of thie input buffer |
converts or copies the data we shouldn't use the original buffer since mBuffer gets written to by ooura
Definition at line 45 of file TOouraFFT.hpp.
48 while (processed < input.validSize()) {
49 const uint processedHalf = processed / 2;
50 T* real = result[0] + processedHalf;
51 T* imaginary = result[1] + processedHalf;
52 const T* in = input[0] + processed;
65 double* bEnd = b +
mSize;
73 const size_t size2 =
mSize / 2;
void set(const T2 *samples, Size length, const uchar channel=0, const Size offsetDst=0)
Set a single channel from an array.
◆ resize()
void tklb::FFTOoura::resize |
( |
uint |
size | ) |
|
|
inline |
Definition at line 27 of file TOouraFFT.hpp.
28 if (size ==
mSize) {
return; }
29 mIp.resize(2 +
int(std::sqrt(
double(size))));
34 const int size4 = size / 4;
35 ooura::makewt(size4,
mIp.data(),
mW[0]);
36 ooura::makect(size4,
mIp.data(),
mW[0] + size4);
bool resize(const Size length, uchar channels)
! Will not keep the contents! Resizes the buffer to the desired length and channel count.
◆ mBuffer
◆ mIp
◆ mSize
uint tklb::FFTOoura::mSize |
|
private |
◆ mW
The documentation for this class was generated from the following file: