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 | |
GAVL_PUBLIC void | gavl_audio_options_set_quality (gavl_audio_options_t *opt, int quality) |
Set the quality level for the converter. | |
GAVL_PUBLIC int | gavl_audio_options_get_quality (gavl_audio_options_t *opt) |
Get the quality level for a converter. | |
GAVL_PUBLIC 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_PUBLIC gavl_audio_dither_mode_t | gavl_audio_options_get_dither_mode (gavl_audio_options_t *opt) |
Get the dither mode for the converter. | |
GAVL_PUBLIC 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_PUBLIC gavl_resample_mode_t | gavl_audio_options_get_resample_mode (gavl_audio_options_t *opt) |
Get the resample mode for the converter. | |
GAVL_PUBLIC void | gavl_audio_options_set_conversion_flags (gavl_audio_options_t *opt, int flags) |
Set the conversion flags. | |
GAVL_PUBLIC int | gavl_audio_options_get_conversion_flags (gavl_audio_options_t *opt) |
Get the conversion flags. | |
GAVL_PUBLIC void | gavl_audio_options_set_defaults (gavl_audio_options_t *opt) |
Set all options to their defaults. | |
GAVL_PUBLIC void | gavl_audio_options_set_mix_matrix (gavl_audio_options_t *opt, const double **matrix) |
Set a user defined mix matrix. | |
GAVL_PUBLIC const double ** | gavl_audio_options_get_mix_matrix (gavl_audio_options_t *opt) |
Get the mix matrix. | |
GAVL_PUBLIC gavl_audio_options_t * | gavl_audio_options_create () |
Create an options container. | |
GAVL_PUBLIC void | gavl_audio_options_copy (gavl_audio_options_t *dst, const gavl_audio_options_t *src) |
Copy audio options. | |
GAVL_PUBLIC void | gavl_audio_options_destroy (gavl_audio_options_t *opt) |
Destroy audio options. |
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.
Dither mode.
enum gavl_resample_mode_t |
Resample mode.
GAVL_PUBLIC void gavl_audio_options_set_quality | ( | gavl_audio_options_t * | opt, | |
int | quality | |||
) |
Set the quality level for the converter.
opt | Audio options | |
quality | Quality level (see Quality settings) |
GAVL_PUBLIC int gavl_audio_options_get_quality | ( | gavl_audio_options_t * | opt | ) |
Get the quality level for a converter.
opt | Audio options |
GAVL_PUBLIC 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.
opt | Audio options | |
mode | A dither mode |
GAVL_PUBLIC gavl_audio_dither_mode_t gavl_audio_options_get_dither_mode | ( | gavl_audio_options_t * | opt | ) |
Get the dither mode for the converter.
opt | Audio options |
GAVL_PUBLIC void gavl_audio_options_set_resample_mode | ( | gavl_audio_options_t * | opt, | |
gavl_resample_mode_t | mode | |||
) |
Set the resample mode for the converter.
opt | Audio options | |
mode | A resample mode |
GAVL_PUBLIC gavl_resample_mode_t gavl_audio_options_get_resample_mode | ( | gavl_audio_options_t * | opt | ) |
Get the resample mode for the converter.
opt | Audio options |
GAVL_PUBLIC void gavl_audio_options_set_conversion_flags | ( | gavl_audio_options_t * | opt, | |
int | flags | |||
) |
Set the conversion flags.
opt | Audio options | |
flags | Flags (see Audio conversion flags) |
GAVL_PUBLIC int gavl_audio_options_get_conversion_flags | ( | gavl_audio_options_t * | opt | ) |
GAVL_PUBLIC void gavl_audio_options_set_defaults | ( | gavl_audio_options_t * | opt | ) |
Set all options to their defaults.
opt | Audio options |
GAVL_PUBLIC void gavl_audio_options_set_mix_matrix | ( | gavl_audio_options_t * | opt, | |
const double ** | matrix | |||
) |
Set a user defined mix matrix.
opt | Audio options | |
matrix | Mix matrix to use |
The matrix consists of coefficients, where matrix[i][j] is the factor for mixing input channel j to output channel i. The matrix is not copied, so it should be valid at least until the next call to gavl_audio_converter_init.
To clear a previously defined mix matrix (restoring gavls default behaviour) pass NULL.
Since 1.1.2
GAVL_PUBLIC const double** gavl_audio_options_get_mix_matrix | ( | gavl_audio_options_t * | opt | ) |
Get the mix matrix.
opt | Audio options |
Since 1.1.2
GAVL_PUBLIC gavl_audio_options_t* gavl_audio_options_create | ( | ) |
Create an options container.
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().
GAVL_PUBLIC void gavl_audio_options_copy | ( | gavl_audio_options_t * | dst, | |
const gavl_audio_options_t * | src | |||
) |
Copy audio options.
dst | Destination | |
src | Source |
GAVL_PUBLIC void gavl_audio_options_destroy | ( | gavl_audio_options_t * | opt | ) |
Destroy audio options.
opt | Audio options |