20template<u
int16_t Size>
26 void set_table(
const float* table) { table_ = table; }
36 if (x > 1.0f) x = 1.0f;
37 if (x < -1.0f) x = -1.0f;
41 float norm = x * 0.5f + 0.5f;
42 uint32_t phase =
static_cast<uint32_t
>(norm * 4294967040.0f);
50 void process(
float* buf, uint16_t frames)
const {
51 for (uint16_t i = 0; i < frames; ++i) {
57 const float* table_ =
nullptr;
float process(float x) const
Process a single sample through the transfer function.
void process(float *buf, uint16_t frames) const
Process a block of samples in-place.
void set_table(const float *table)
Set the transfer function table (Size+1 entries with guard)
uint16_t lookup_linear(const uint16_t *table, uint32_t phase)
DSP atoms for audio signal processing.