opus_pcm_soft_clip method

void opus_pcm_soft_clip(
  1. Pointer<Float> pcm,
  2. int frame_size,
  3. int channels,
  4. Pointer<Float> softclip_mem,
)

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)

Implementation

void opus_pcm_soft_clip(
  ffi.Pointer<ffi.Float> pcm,
  int frame_size,
  int channels,
  ffi.Pointer<ffi.Float> softclip_mem,
) {
  _opus_pcm_soft_clip(pcm, frame_size, channels, softclip_mem);
}