55 #ifndef __CU_BIQUAD_IIR_H__
56 #define __CU_BIQUAD_IIR_H__
58 #include <cugl/math/dsp/CUIIRFilter.h>
59 #include <cugl/math/CUMathBase.h>
60 #include <cugl/util/CUAligned.h>
65 #define INV_SQRT2 0.7071067812
156 float __attribute__((__aligned__(16))) _c1[8];
157 float __attribute__((__aligned__(16))) _d1[16];
160 float __attribute__((__aligned__(16))) _c2[16];
161 float __attribute__((__aligned__(16))) _d2[16];
171 #pragma mark SPECIALIZED FILTERS
201 void stride(
float gain,
float* input,
float* output,
size_t size,
unsigned channel);
225 void single(
float gain,
float* input,
float* output,
size_t size);
250 void dual(
float gain,
float* input,
float* output,
size_t size);
278 void trio(
float gain,
float* input,
float* output,
size_t size);
303 void quad(
float gain,
float* input,
float* output,
size_t size);
328 void quart(
float gain,
float* input,
float* output,
size_t size);
331 #pragma mark Constructors
374 BiquadIIR(
unsigned channels,
Type type,
float frequency,
float gainDB,
float qVal=INV_SQRT2);
396 #pragma mark IIR Signature
434 void setCoeff(
const std::vector<float> &bvals,
const std::vector<float> &avals);
447 const std::vector<float>
getBCoeff()
const;
460 const std::vector<float>
getACoeff()
const;
462 #pragma mark Specialized Attributes
472 void setBCoeff(
float b0,
float b1,
float b2);
514 void setType(
Type type,
float frequency,
float gainDB,
float qVal=INV_SQRT2);
527 static float db2gain(
float gainDB);
539 static float gain2db(
float gain);
567 #pragma mark Filter Methods
589 void step(
float gain,
float* input,
float* output);
614 void calculate(
float gain,
float* input,
float* output,
size_t size);
629 size_t flush(
float* output);
void setChannels(unsigned channels)
void calculate(float gain, float *input, float *output, size_t size)
void step(float gain, float *input, float *output)
void setCoeff(const std::vector< float > &bvals, const std::vector< float > &avals)
size_t flush(float *output)
static float bandwidth2q(float width)
static float db2gain(float gainDB)
Definition: CUBiquadIIR.h:107
const std::vector< float > getACoeff() const
const std::vector< float > getBCoeff() const
static float gain2db(float gain)
static float q2Bandwidth(float qVal)
void setBCoeff(float b0, float b1, float b2)
static bool VECTORIZE
Definition: CUBiquadIIR.h:140
void setType(Type type, float frequency, float gainDB, float qVal=INV_SQRT2)
Definition: CUAction.h:51
Type
Definition: CUBiquadIIR.h:116
void setACoeff(float a1, float a2)
unsigned getChannels() const
Definition: CUBiquadIIR.h:405