DaisySP
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
daisysp::FIRFilterImplGeneric< max_size, max_block > Class Template Reference

#include <fir.h>

Inheritance diagram for daisysp::FIRFilterImplGeneric< max_size, max_block >:
daisysp::FIRMemory< max_size, max_block >

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
 

Detailed Description

template<size_t max_size, size_t max_block>
class daisysp::FIRFilterImplGeneric< max_size, max_block >

Generic FIR implementation is always available

Parameters
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

Member Function Documentation

◆ Process()

template<size_t max_size, size_t max_block>
float daisysp::FIRFilterImplGeneric< max_size, max_block >::Process ( float in)
inline

Shift the state simulatenously (note: better solutions are available)

◆ SetIR()

template<size_t max_size, size_t max_block>
bool daisysp::FIRFilterImplGeneric< max_size, max_block >::SetIR ( const float * ir,
size_t len,
bool reverse )
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


The documentation for this class was generated from the following file: