spandsp: noise.h File Reference

spandsp 0.0.6

noise.h File Reference

Go to the source code of this file.

## Typedefs
typedef struct noise_state_s | noise_state_t

## Enumerations
enum | { NOISE_CLASS_AWGN = 1 , NOISE_CLASS_HOTH }

## Functions
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.
noise_state_t * | noise_init_dbov (noise_state_t *s, int seed, float level, int class_of_noise, int quality)
int | noise_release (noise_state_t *s)
int | noise_free (noise_state_t *s)
int16_t | noise (noise_state_t *s)
| Generate a sample of audio noise.

## Typedef Documentation

## ◆ noise_state_t

typedef struct noise_state_s noise_state_t

Noise generator descriptor. This contains all the state information for an instance of the noise generator.

## 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.