xtos_ notch_ process
Processes a block of double samples using an initialized notch-filter state.
On this page
Declaration
#include <xtos/signal.h>
int xtos_notch_process(struct xtos_notch_filter *filter,
const double *input,
double *output,
size_t count);Parameters
| Parameter | Type | Description |
|---|---|---|
| filter | struct xtos_notch_filter * | Non-NULL state; do not share it for concurrent writes. |
| input | const double * | Non-NULL input with at least count entries; it may equal output exactly. |
| output | double * | Non-NULL output with at least count entries; do not use partially overlapping arrays. |
| count | size_t | Number 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
| errno | Condition |
|---|---|
| EINVAL | filter, 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.