Skip to content

daisysp::FIRMemory

More...

#include <fir.h>

Inherited by daisysp::FIRFilterImplGeneric< max_size, max_block >

Public Functions

Name
void Reset()

Protected Functions

Name
FIRMemory()
bool SetCoefs(const float coefs[], size_t size, bool reverse)
constexpr size_t MaxBlock()

Protected Attributes

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

Detailed Description

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

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.

Helper class that defines the memory model - internal or user-provided Not intended to be used directly, so constructor is not exposed

Public Functions Documentation

function Reset

inline void Reset()

Protected Functions Documentation

function FIRMemory

inline FIRMemory()

function SetCoefs

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

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

Return: true if all conditions are met and the filter is configured

Configure the filter coefficients

function MaxBlock

static inline constexpr size_t MaxBlock()

Protected Attributes Documentation

variable state_size_

static constexpr size_t state_size_ = max_size + max_block - 1u;

variable state_

float[state_size_] state_;

variable coefs_

float[max_size] coefs_;

variable size_

size_t size_;

Updated on 2024-01-03 at 19:38:46 +0000