Class PassthroughFilter

A no-op filter that returns input samples unmodified.

Inheritance
PassthroughFilter
Implements
Namespace: MOSAIC.Components.SignalProcessing
Assembly: MOSAIC.dll
Syntax
public class PassthroughFilter : IOnlineFilter
Remarks

Useful as a default or placeholder when a filter slot must be populated but no actual filtering is desired. All methods are zero-cost pass-throughs with no internal state.

Unlike FirFilter and IirFilter, this implementation is inherently thread-safe since it holds no mutable state.

Methods

ProcessSample(double)

Processes a single input sample and returns the filtered output.

Declaration
public double ProcessSample(double sample)
Parameters
Type Name Description
double sample

The input sample value.

Returns
Type Description
double

The filtered output sample.

ProcessSamples(double[])

Processes an array of input samples sequentially and returns the filtered outputs.

Declaration
public double[] ProcessSamples(double[] samples)
Parameters
Type Name Description
double[] samples

The input sample array.

Returns
Type Description
double[]

A new array of the same length containing the filtered output samples.

Remarks

Returns the original array instance (no copy is made).

Reset()

Resets all internal filter state (delay lines, history buffers), as if no samples had been processed.

Declaration
public void Reset()
Remarks

No-op — there is no internal state to clear.

Implements

IOnlineFilter

Search documentation

Start typing to search the documentation.