XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · VERSION 0.9.0 · BUILD FROM SOURCE
libxtos-signalxtos_notch_process

xtos_notch_process

Processes a block of double samples using an initialized notch-filter state.

On this page

Declaration

c
#include <xtos/signal.h>

int xtos_notch_process(struct xtos_notch_filter *filter,
                       const double *input,
                       double *output,
                       size_t count);

Parameters

ParameterTypeDescription
filterstruct xtos_notch_filter *Non-NULL state; do not share it for concurrent writes.
inputconst double *Non-NULL input with at least count entries; it may equal output exactly.
outputdouble *Non-NULL output with at least count entries; do not use partially overlapping arrays.
countsize_tNumber of elements; zero is allowed and performs no loop.

Return value

Returns 0 on success and -1 on failure. The function updates filter history.

Errors

errnoCondition
EINVALfilter, input, or output is NULL.

Notes

  • Allocates no memory and supports exact in-place processing, but does not check input NaN/Inf.
  • This is a stateful causal IIR, not zero-phase filtering; do not reset state between blocks of one continuous signal.

Example

Source

This reference describes headers and implementation at OpenXTOS commit dd313955ad57542bcd2af8827157d1bbd0cf5e83.