spandsp: noise.c File Reference

spandsp 0.0.6

Functions
noise.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <inttypes.h>`
`#include <memory.h>`
`#include "floating_fudge.h"`
`#include "spandsp/telephony.h"`
`#include "spandsp/fast_convert.h"`
`#include "spandsp/saturated.h"`
`#include "spandsp/noise.h"`
`#include "spandsp/private/noise.h"`

## Functions
int16_t | noise (noise_state_t *s)
| Generate a sample of audio noise.
noise_state_t * | noise_init_dbov (noise_state_t *s, int seed, float level, int class_of_noise, int quality)
noise_state_t * | noise_init_dbm0 (noise_state_t *s, int seed, float level, int class_of_noise, int quality)
| Initialise an audio noise generator.
int | noise_release (noise_state_t *s)
int | noise_free (noise_state_t *s)

## Function Documentation

## ◆ noise()

int16_t noise | ( | noise_state_t * | s | ) |

Generate a sample of audio noise.

Generate a sample of audio noise.

Parameters

  s | The noise generator context.

Returns
  The generated sample.

## ◆ noise_init_dbm0()

noise_state_t * noise_init_dbm0 | ( | noise_state_t * | s,
|  | int | seed,
|  | float | level,
|  | int | class_of_noise,
|  | int | quality
| ) |  |

Initialise an audio noise generator.

Initialise an audio noise generator.

Parameters

  s | The noise generator context.
  seed | A seed for the underlying random number generator.
  level | The noise power level in dBmO.
  class_of_noise | The class of noise (e.g. AWGN).
  quality | A parameter which permits speed and accuracy of the noise generation to be adjusted.

Returns
  A pointer to the noise generator context.