[][src]Function opus_cmake_sys::opus_pcm_soft_clip

pub unsafe extern "C" fn opus_pcm_soft_clip(
    pcm: *mut f32,
    frame_size: c_int,
    channels: c_int,
    softclip_mem: *mut f32
)

Applies soft-clipping to bring a float signal within the [-1,1] range. If the signal is already in that range, nothing is done. If there are values outside of [-1,1], then the signal is clipped as smoothly as possible to both fit in the range and avoid creating excessive distortion in the process. @param [in,out] pcm float*: Input PCM and modified PCM @param [in] frame_size int Number of samples per channel to process @param [in] channels int: Number of channels @param [in,out] softclip_mem float*: State memory for the soft clipping process (one float per channel, initialized to zero)