clamp

Files: clamp.h, clamp.c

Performs a clamp operation on an input signal.
This module performs what is known as a "clamp" operation, which sets the bounds of a signal in between a minimum and a maximum value. Anything exceeding the bounds in either direction will be set to the closest valid value. In other words: if x is less than minimum, set x to the minimum; if x is greater than the maximum, set x to be the maximum.

Functions

sp_clamp_create(sp_clamp **clamp)
sp_clamp_init(sp_data *sp, sp_clamp *clamp)
sp_clamp_compute(sp_data *sp, sp_clamp *clamp, SPFLOAT *input, SPFLOAT *out)
sp_clamp_destroy(sp_clamp **clamp)

Optional Parameters

min: Minimum value.
(Default value: 0)
max: Maximum value.
(Default value: 1)

Inputs

input: Input audio signal.

Outputs

out: Output audio signal.