DaisySP
Loading...
Searching...
No Matches
daisysp::FIRMemory< max_size, max_block > Struct Template Reference

#include <fir.h>

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

Public Member Functions

void Reset ()
 

Protected Member Functions

bool SetCoefs (const float coefs[], size_t size, bool reverse)
 

Static Protected Member Functions

static constexpr size_t MaxBlock ()
 

Protected Attributes

float state_ [state_size_]
 
float coefs_ [max_size]
 
size_t size_
 

Static Protected Attributes

static constexpr size_t state_size_ = max_size + max_block - 1u
 

Detailed Description

template<size_t max_size, size_t max_block>
struct daisysp::FIRMemory< max_size, max_block >

Helper class that defines the memory model - internal or user-provided

Parameters
max_size- maximal filter length
max_block- maximal length of the block processing if both parameters are 0, does NOT allocate any memory and instead requires user-provided memory blocks to be passed as parameters.

Not intended to be used directly, so constructor is not exposed

Member Function Documentation

◆ SetCoefs()

template<size_t max_size, size_t max_block>
bool daisysp::FIRMemory< max_size, max_block >::SetCoefs ( const float coefs[],
size_t size,
bool reverse )
inlineprotected

Configure the filter coefficients

Parameters
coefs- pointer to coefficients (tail-first order)
size- number of coefficients pointed by coefs (filter length)
reverse- flag to perform reversing of the filter
Returns
true if all conditions are met and the filter is configured

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