Data Structures | |
struct | gavl_audio_format_t |
Defines | |
#define | GAVL_MAX_CHANNELS 128 |
Maximum number of audio channels. | |
Enumerations | |
enum | gavl_sample_format_t { GAVL_SAMPLE_NONE = 0, GAVL_SAMPLE_U8 = 1, GAVL_SAMPLE_S8 = 2, GAVL_SAMPLE_U16 = 3, GAVL_SAMPLE_S16 = 4, GAVL_SAMPLE_S32 = 5, GAVL_SAMPLE_FLOAT = 6 } |
enum | gavl_interleave_mode_t { GAVL_INTERLEAVE_NONE = 0, GAVL_INTERLEAVE_2 = 1, GAVL_INTERLEAVE_ALL = 2 } |
enum | gavl_channel_id_t { GAVL_CHID_NONE = 0, GAVL_CHID_FRONT_CENTER, GAVL_CHID_FRONT_LEFT, GAVL_CHID_FRONT_RIGHT, GAVL_CHID_FRONT_CENTER_LEFT, GAVL_CHID_FRONT_CENTER_RIGHT, GAVL_CHID_REAR_LEFT, GAVL_CHID_REAR_RIGHT, GAVL_CHID_REAR_CENTER, GAVL_CHID_SIDE_LEFT, GAVL_CHID_SIDE_RIGHT, GAVL_CHID_LFE, GAVL_CHID_AUX } |
Functions | |
const char * | gavl_sample_format_to_string (gavl_sample_format_t format) |
Convert a gavl_sample_format_t to a human readable string. | |
const char * | gavl_channel_id_to_string (gavl_channel_id_t id) |
Convert a gavl_channel_id_t to a human readable string. | |
const char * | gavl_interleave_mode_to_string (gavl_interleave_mode_t mode) |
Convert a gavl_interleave_mode_t to a human readable string. | |
void | gavl_audio_format_dump (const gavl_audio_format_t *format) |
Dump an audio format to stderr. | |
int | gavl_channel_index (const gavl_audio_format_t *format, gavl_channel_id_t id) |
Get the index of a particular channel for a given format. | |
int | gavl_front_channels (const gavl_audio_format_t *format) |
Get number of front channels for a given format. | |
int | gavl_rear_channels (const gavl_audio_format_t *format) |
Get number of rear channels for a given format. | |
int | gavl_side_channels (const gavl_audio_format_t *format) |
Get number of side channels for a given format. | |
int | gavl_aux_channels (const gavl_audio_format_t *format) |
Get number of aux channels for a given format. | |
int | gavl_lfe_channels (const gavl_audio_format_t *format) |
Get number of LFE channels for a given format. | |
void | gavl_audio_format_copy (gavl_audio_format_t *dst, const gavl_audio_format_t *src) |
Copy one audio format to another. | |
int | gavl_audio_formats_equal (const gavl_audio_format_t *format_1, const gavl_audio_format_t *format_2) |
Compare 2 audio formats. | |
void | gavl_set_channel_setup (gavl_audio_format_t *format) |
Set the default channel setup and indices. | |
int | gavl_bytes_per_sample (gavl_sample_format_t format) |
Get the number of bytes per sample for a given sample format. |
#define GAVL_MAX_CHANNELS 128 |
Maximum number of audio channels.
enum gavl_sample_format_t |
Format of one audio sample
For multibyte numbers, the byte order is always machine native endian
enum gavl_channel_id_t |
Audio channel setup
These are the channel locations used to identify the channel order for an audio format
const char* gavl_sample_format_to_string | ( | gavl_sample_format_t | format | ) |
Convert a gavl_sample_format_t to a human readable string.
format | A sample format |
const char* gavl_channel_id_to_string | ( | gavl_channel_id_t | id | ) |
Convert a gavl_channel_id_t to a human readable string.
id | A channel id |
const char* gavl_interleave_mode_to_string | ( | gavl_interleave_mode_t | mode | ) |
Convert a gavl_interleave_mode_t to a human readable string.
mode | An interleave mode |
void gavl_audio_format_dump | ( | const gavl_audio_format_t * | format | ) |
Dump an audio format to stderr.
format | An audio format |
int gavl_channel_index | ( | const gavl_audio_format_t * | format, | |
gavl_channel_id_t | id | |||
) |
Get the index of a particular channel for a given format.
format | An audio format | |
id | A channel id |
int gavl_front_channels | ( | const gavl_audio_format_t * | format | ) |
Get number of front channels for a given format.
format | An audio format |
int gavl_rear_channels | ( | const gavl_audio_format_t * | format | ) |
Get number of rear channels for a given format.
format | An audio format |
int gavl_side_channels | ( | const gavl_audio_format_t * | format | ) |
Get number of side channels for a given format.
format | An audio format |
int gavl_aux_channels | ( | const gavl_audio_format_t * | format | ) |
Get number of aux channels for a given format.
format | An audio format |
int gavl_lfe_channels | ( | const gavl_audio_format_t * | format | ) |
Get number of LFE channels for a given format.
format | An audio format |
void gavl_audio_format_copy | ( | gavl_audio_format_t * | dst, | |
const gavl_audio_format_t * | src | |||
) |
Copy one audio format to another.
dst | Destination format | |
src | Source format |
int gavl_audio_formats_equal | ( | const gavl_audio_format_t * | format_1, | |
const gavl_audio_format_t * | format_2 | |||
) |
Compare 2 audio formats.
format_1 | First format | |
format_2 | Second format |
void gavl_set_channel_setup | ( | gavl_audio_format_t * | format | ) |
Set the default channel setup and indices.
format | An audio format |
int gavl_bytes_per_sample | ( | gavl_sample_format_t | format | ) |
Get the number of bytes per sample for a given sample format.
format | A sample format |