gavl: gavl_audio_frame_t Struct Reference

gavl

Data Fields
gavl_audio_frame_t Struct Reference
Audio » Audio frame

Generic container for audio samples. More...

`#include <gavl.h>`

## Data Fields
gavl_audio_samples_t | samples
gavl_audio_channels_t | channels
int | valid_samples
int64_t | timestamp
int | channel_stride
int | buf_idx

## Detailed Description

Generic container for audio samples.

This is the main container structure for audio data. The data are stored in unions, so you can access the matching pointer type without the need for casts. If you have noninterleaved channels, the i'th channel will be in channels[i].f (if you use floating point samples). For noninterleaved formats, use the samples member. valid_samples must be set by the source to the number of actually valid samples in this frame.

Audio frames are created with gavl_audio_frame_create and destroyed with gavl_audio_frame_destroy. The memory can either be allocated by gavl (memory aligned) or by the caller.

## Field Documentation

## ◆ samples

gavl_audio_samples_t gavl_audio_frame_t::samples

Sample pointer for interleaved formats

## ◆ channels

gavl_audio_channels_t gavl_audio_frame_t::channels

Channel pointer for non interleaved formats

## ◆ valid_samples

int gavl_audio_frame_t::valid_samples

Number of actually valid samples

## ◆ timestamp

int64_t gavl_audio_frame_t::timestamp

Timestamp in samplerate tics

## ◆ channel_stride

int gavl_audio_frame_t::channel_stride

Byte offset between channels. Total allocated size is always num_channels * channel_stride

The documentation for this struct was generated from the following file:

- gavl.h