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

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_tgavl_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 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

Dither mode.

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

GAVL_PUBLIC 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)
GAVL_PUBLIC 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)
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.

Parameters:
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.

Parameters:
opt Audio options
Returns:
The dither mode
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.

Parameters:
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.

Parameters:
opt Audio options
Returns:
The resample mode
GAVL_PUBLIC 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)
GAVL_PUBLIC 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)
GAVL_PUBLIC void gavl_audio_options_set_defaults ( gavl_audio_options_t opt  ) 

Set all options to their defaults.

Parameters:
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.

Parameters:
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.

Parameters:
opt Audio options
Returns:
The user defined mix matrix

Since 1.1.2

GAVL_PUBLIC 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().

GAVL_PUBLIC void gavl_audio_options_copy ( gavl_audio_options_t dst,
const gavl_audio_options_t src 
)

Copy audio options.

Parameters:
dst Destination
src Source
GAVL_PUBLIC void gavl_audio_options_destroy ( gavl_audio_options_t opt  ) 

Destroy audio options.

Parameters:
opt Audio options
Generated on Fri Jun 8 17:27:53 2012 for gavl by  doxygen 1.6.3