DaisySP
|
#include <fir.h>
Public Member Functions | |
float | Process (float in) |
void | ProcessBlock (const float *pSrc, float *pDst, size_t block) |
bool | SetIR (const float *ir, size_t len, bool reverse) |
template<typename... Args> | |
auto | Init (Args &&... args) -> decltype(SetIR(std::forward< Args >(args)...)) |
void | Reset () |
Public Member Functions inherited from daisysp::FIRMemory< max_size, max_block > | |
void | Reset () |
Static Public Member Functions | |
static constexpr size_t | GetLatency () |
Protected Attributes | |
float | coefs_ [max_size] |
size_t | size_ |
float | state_ [state_size_] |
Protected Attributes inherited from daisysp::FIRMemory< max_size, max_block > | |
float | state_ [state_size_] |
float | coefs_ [max_size] |
size_t | size_ |
Additional Inherited Members | |
Protected Member Functions inherited from daisysp::FIRMemory< max_size, max_block > | |
bool | SetCoefs (const float coefs[], size_t size, bool reverse) |
Static Protected Member Functions inherited from daisysp::FIRMemory< max_size, max_block > | |
static constexpr size_t | MaxBlock () |
Static Protected Attributes inherited from daisysp::FIRMemory< max_size, max_block > | |
static constexpr size_t | state_size_ = max_size + max_block - 1u |
Generic FIR implementation is always available
max_size | - maximal filter length |
max_block | - maximal block size for ProcessBlock() if both parameters are 0 (via FIRFILTER_USER_MEMORY macro) Assumes the user will provide own memory buffers via SetIR() and SetStateBuffer() functions Otherwise statically allocates the necessary buffers itself |
|
inline |
Shift the state simulatenously (note: better solutions are available)
|
inline |
Set filter coefficients (aka Impulse Response) Coefficients need to be in reversed order (tail-first) If internal storage is used, makes a local copy and allows reversing the impulse response