- Main Page
- Modules
- Data Structures
- Files
- Directories
- Related Pages

# Audio conversion options
[Audio]

## Modules
| Audio conversion flags
## Typedefs
typedef struct gavl_audio_options_s | gavl_audio_options_t
| Opaque container for audio conversion options.
## Enumerations
enum | gavl_audio_dither_mode_t { GAVL_AUDIO_DITHER_NONE = 0, GAVL_AUDIO_DITHER_AUTO = 1, GAVL_AUDIO_DITHER_RECT = 2, GAVL_AUDIO_DITHER_TRI = 3, GAVL_AUDIO_DITHER_SHAPED = 4 }
| Dither mode. More...
enum | gavl_resample_mode_t { GAVL_RESAMPLE_AUTO = 0, GAVL_RESAMPLE_ZOH = 1, GAVL_RESAMPLE_LINEAR = 2, GAVL_RESAMPLE_SINC_FAST = 3, GAVL_RESAMPLE_SINC_MEDIUM = 4, GAVL_RESAMPLE_SINC_BEST = 5 }
| Resample mode. More...
## Functions
void | gavl_audio_options_set_quality (gavl_audio_options_t *opt, int quality)
| Set the quality level for the converter.
int | gavl_audio_options_get_quality (gavl_audio_options_t *opt)
| Get the quality level for a converter.
void | gavl_audio_options_set_dither_mode (gavl_audio_options_t *opt, gavl_audio_dither_mode_t mode)
| Set the dither mode for the converter.
gavl_audio_dither_mode_t | gavl_audio_options_get_dither_mode (gavl_audio_options_t *opt)
| Get the dither mode for the converter.
void | gavl_audio_options_set_resample_mode (gavl_audio_options_t *opt, gavl_resample_mode_t mode)
| Set the resample mode for the converter.
gavl_resample_mode_t | gavl_audio_options_get_resample_mode (gavl_audio_options_t *opt)
| Get the resample mode for the converter.
void | gavl_audio_options_set_conversion_flags (gavl_audio_options_t *opt, int flags)
| Set the conversion flags.
int | gavl_audio_options_get_conversion_flags (gavl_audio_options_t *opt)
| Get the conversion flags.
void | gavl_audio_options_set_defaults (gavl_audio_options_t *opt)
| Set all options to their defaults.
gavl_audio_options_t * | gavl_audio_options_create ()
| Create an options container.
void | gavl_audio_options_copy (gavl_audio_options_t *dst, const gavl_audio_options_t *src)
| Copy audio options.
void | gavl_audio_options_destroy (gavl_audio_options_t *opt)
| Destroy audio options.

## Typedef Documentation

typedef struct gavl_audio_options_s gavl_audio_options_t

Opaque container for audio conversion options.

You don't want to know what's inside.

## Enumeration Type Documentation

enum gavl_audio_dither_mode_t

Dither mode.

enum gavl_resample_mode_t

Resample mode.

Enumerator:

  GAVL_RESAMPLE_AUTO | Set from quality
  GAVL_RESAMPLE_ZOH | Zero order hold interpolator, very fast, poor quality.
  GAVL_RESAMPLE_LINEAR | Linear interpolator, very fast, poor quality.
  GAVL_RESAMPLE_SINC_FAST | Band limited sinc interpolation, fastest, 97dB SNR, 80% BW.
  GAVL_RESAMPLE_SINC_MEDIUM | Band limited sinc interpolation, medium quality, 97dB SNR, 90% BW.
  GAVL_RESAMPLE_SINC_BEST | Band limited sinc interpolation, best quality, 97dB SNR, 96% BW.

## Function Documentation

void gavl_audio_options_set_quality | ( | gavl_audio_options_t * | opt,
|  | int | quality |
| ) |  |  |

Set the quality level for the converter.

Parameters:

  | opt | Audio options
  | quality | Quality level (see Quality settings)

int gavl_audio_options_get_quality | ( | gavl_audio_options_t * | opt | ) |

Get the quality level for a converter.

Parameters:

  | opt | Audio options

Returns:
  Quality level (see Quality settings)

void gavl_audio_options_set_dither_mode | ( | gavl_audio_options_t * | opt,
|  | gavl_audio_dither_mode_t | mode |
| ) |  |  |

Set the dither mode for the converter.

Parameters:

  | opt | Audio options
  | mode | A dither mode

gavl_audio_dither_mode_t gavl_audio_options_get_dither_mode | ( | gavl_audio_options_t * | opt | ) |

Get the dither mode for the converter.

Parameters:

  | opt | Audio options

Returns:
  The dither mode

void gavl_audio_options_set_resample_mode | ( | gavl_audio_options_t * | opt,
|  | gavl_resample_mode_t | mode |
| ) |  |  |

Set the resample mode for the converter.

Parameters:

  | opt | Audio options
  | mode | A resample mode

gavl_resample_mode_t gavl_audio_options_get_resample_mode | ( | gavl_audio_options_t * | opt | ) |

Get the resample mode for the converter.

Parameters:

  | opt | Audio options

Returns:
  The resample mode

void gavl_audio_options_set_conversion_flags | ( | gavl_audio_options_t * | opt,
|  | int | flags |
| ) |  |  |

Set the conversion flags.

Parameters:

  | opt | Audio options
  | flags | Flags (see Audio conversion flags)

int gavl_audio_options_get_conversion_flags | ( | gavl_audio_options_t * | opt | ) |

Get the conversion flags.

Parameters:

  | opt | Audio options

Returns:
  Flags (see Audio conversion flags)

void gavl_audio_options_set_defaults | ( | gavl_audio_options_t * | opt | ) |

Set all options to their defaults.

Parameters:

  | opt | Audio options

gavl_audio_options_t* gavl_audio_options_create | ( |  | ) |

Create an options container.

Returns:
  Newly allocated udio options with default values

Use this to store options, which will apply for more than one converter instance. Applying the options will be done by gavl_*_get_options() followed by gavl_audio_options_copy().

void gavl_audio_options_copy | ( | gavl_audio_options_t * | dst,
|  | const gavl_audio_options_t * | src |
| ) |  |  |

Copy audio options.

Parameters:

  | dst | Destination
  | src | Source

void gavl_audio_options_destroy | ( | gavl_audio_options_t * | opt | ) |

Destroy audio options.

Parameters:

  | opt | Audio options