Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
#include <QuadBiquad.h>
Public Member Functions | |
QuadBiquad () | |
void * | operator new (size_t sz) |
int | setup (const BiquadCoeff::Settings &settings) |
void | update () |
void | process (float data[kNumFilters]) |
Public Attributes | |
std::array< BiquadCoeffT < float >, kNumFilters > | filters |
Static Public Attributes | |
static unsigned int constexpr | kNumFilters = 4 |
A class which processes four biquad filters in parallel in an optimised way.
These filters use float
data types internally and the process() routine uses NEON intrinsics.
|
inline |
Construct the object.
May fail with std::bad_alloc
if the provided memory is not properly aligned. This may occur when using a version of C++ prior to c++17 and doing heap allocation, e.g.: in an STL container (e.g.: std::vector
). Use new
to guarantee properly aligned memory.
|
inline |
Allocate the object's memory so that it respects the desired alignment
int QuadBiquad::setup | ( | const BiquadCoeff::Settings & | settings | ) |
Initialise the four filters and the QuadBiquad internals.
Alternatively, call setup() on each of the elements of filters and then call update().
void QuadBiquad::update | ( | ) |
|
inline |
Process input data through the filter.
data | input / output. Each element of the vector corresponds to the corresponding filtering channel in filters. |
std::array<BiquadCoeffT<float>, kNumFilters> QuadBiquad::filters |
The four filters whose parameters are used by the QuadBiquad object.
You can set the filtering characteristics for each filter separately. After manipulating one or more of the elements of filters, call update() before calling QuadBiquad::process().