Data Structures | |
union | gavl_audio_samples_t |
Container for interleaved audio samples. More... | |
union | gavl_audio_channels_t |
Container for noninterleaved audio samples. More... | |
struct | gavl_audio_frame_t |
Generic container for audio samples. More... | |
Functions | |
gavl_audio_frame_t * | gavl_audio_frame_create (const gavl_audio_format_t *format) |
Create audio frame. | |
void | gavl_audio_frame_null (gavl_audio_frame_t *frame) |
Zero all pointers in the audio frame. | |
void | gavl_audio_frame_destroy (gavl_audio_frame_t *frame) |
Destroy an audio frame. | |
void | gavl_audio_frame_mute (gavl_audio_frame_t *frame, const gavl_audio_format_t *format) |
Mute an audio frame. | |
void | gavl_audio_frame_mute_samples (gavl_audio_frame_t *frame, const gavl_audio_format_t *format, int num_samples) |
Mute a number of samples at the start of an audio frame. | |
void | gavl_audio_frame_mute_channel (gavl_audio_frame_t *frame, const gavl_audio_format_t *format, int channel) |
Mute a single channel of an audio frame. | |
int | gavl_audio_frame_copy (const gavl_audio_format_t *format, gavl_audio_frame_t *dst, const gavl_audio_frame_t *src, int dst_pos, int src_pos, int dst_size, int src_size) |
Copy audio data from one frame to another. |
gavl_audio_frame_t* gavl_audio_frame_create | ( | const gavl_audio_format_t * | format | ) |
Create audio frame.
format | Format of the data to be stored in this frame or NULL |
void gavl_audio_frame_null | ( | gavl_audio_frame_t * | frame | ) |
Zero all pointers in the audio frame.
frame | An audio frame |
void gavl_audio_frame_destroy | ( | gavl_audio_frame_t * | frame | ) |
Destroy an audio frame.
frame | An audio frame |
void gavl_audio_frame_mute | ( | gavl_audio_frame_t * | frame, | |
const gavl_audio_format_t * | format | |||
) |
Mute an audio frame.
frame | An audio frame | |
format | The format of the frame |
void gavl_audio_frame_mute_samples | ( | gavl_audio_frame_t * | frame, | |
const gavl_audio_format_t * | format, | |||
int | num_samples | |||
) |
Mute a number of samples at the start of an audio frame.
frame | An audio frame | |
format | The format of the frame | |
num_samples | Number of samples to mute |
void gavl_audio_frame_mute_channel | ( | gavl_audio_frame_t * | frame, | |
const gavl_audio_format_t * | format, | |||
int | channel | |||
) |
Mute a single channel of an audio frame.
frame | An audio frame | |
format | The format of the frame | |
channel | The channel to mute |
int gavl_audio_frame_copy | ( | const gavl_audio_format_t * | format, | |
gavl_audio_frame_t * | dst, | |||
const gavl_audio_frame_t * | src, | |||
int | dst_pos, | |||
int | src_pos, | |||
int | dst_size, | |||
int | src_size | |||
) |
Copy audio data from one frame to another.
format | Format, must be equal for source and destination frames | |
dst | Destination frame | |
src | Source frame | |
dst_pos | Offset (in samples) in the destination frame | |
src_pos | Offset (in samples) in the source frame | |
dst_size | Available samples in the destination frame | |
src_size | Available samples in the source frame |
You can use this function for creating a simple but effective audio buffer.