 |
CUGL 1.3
Cornell University Game Library
|
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
155 float __attribute__((__aligned__(16))) _c1[8];
156 float __attribute__((__aligned__(16))) _d1[16];
159 float __attribute__((__aligned__(16))) _c2[16];
160 float __attribute__((__aligned__(16))) _d2[16];
170 #pragma mark SPECIALIZED FILTERS
200 void stride(
float gain,
float* input,
float* output,
size_t size,
unsigned channel);
224 void single(
float gain,
float* input,
float* output,
size_t size);
249 void dual(
float gain,
float* input,
float* output,
size_t size);
277 void trio(
float gain,
float* input,
float* output,
size_t size);
302 void quad(
float gain,
float* input,
float* output,
size_t size);
327 void quart(
float gain,
float* input,
float* output,
size_t size);
330 #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
584 void step(
float gain,
float* input,
float* output);
605 void calculate(
float gain,
float* input,
float* output,
size_t size);
620 size_t flush(
float* output);
static float gain2db(float gain)
static float q2Bandwidth(float qVal)
void setBCoeff(float b0, float b1, float b2)
void setType(Type type, float frequency, float gainDB, float qVal=INV_SQRT2)
Definition: CUBiquadIIR.h:106
static bool VECTORIZE
Definition: CUBiquadIIR.h:139
Type
Definition: CUBiquadIIR.h:115
void setACoeff(float a1, float a2)
const std::vector< float > getBCoeff() const
void calculate(float gain, float *input, float *output, size_t size)
unsigned getChannels() const
Definition: CUBiquadIIR.h:405
void setChannels(unsigned channels)
size_t flush(float *output)
void setCoeff(const std::vector< float > &bvals, const std::vector< float > &avals)
static float db2gain(float gainDB)
void step(float gain, float *input, float *output)
static float bandwidth2q(float width)
const std::vector< float > getACoeff() const