SDL_AudioCVT Struct Reference

A structure to hold a set of audio conversion filters and buffers. More...

`#include <SDL_audio.h>`

Collaboration diagram for SDL_AudioCVT:
[legend]

## Data Fields

int | needed
SDL_AudioFormat | src_format
SDL_AudioFormat | dst_format
double | rate_incr
Uint8 * | buf
int | len
int | len_cvt
int | len_mult
double | len_ratio
SDL_AudioFilter | filters [SDL_AUDIOCVT_MAX_FILTERS+1]
int | filter_index

## Detailed Description

A structure to hold a set of audio conversion filters and buffers.

Note that various parts of the conversion pipeline can take advantage of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require you to pass it aligned data, but can possibly run much faster if you set both its (buf) field to a pointer that is aligned to 16 bytes, and its (len) field to something that's a multiple of 16, if possible.

Definition at line 228 of file SDL_audio.h.

## Field Documentation

## buf

Uint8* SDL_AudioCVT::buf

Buffer to hold entire audio data

Definition at line 234 of file SDL_audio.h.

## dst_format

SDL_AudioFormat SDL_AudioCVT::dst_format

Target audio format

Definition at line 232 of file SDL_audio.h.

## filter_index

int SDL_AudioCVT::filter_index

Current audio conversion function

Definition at line 240 of file SDL_audio.h.

## filters

SDL_AudioFilter SDL_AudioCVT::filters[SDL_AUDIOCVT_MAX_FILTERS+1]

NULL-terminated list of filter functions

Definition at line 239 of file SDL_audio.h.

## len

int SDL_AudioCVT::len

Length of original audio buffer

Definition at line 235 of file SDL_audio.h.

## len_cvt

int SDL_AudioCVT::len_cvt

Length of converted audio buffer

Definition at line 236 of file SDL_audio.h.

## len_mult

int SDL_AudioCVT::len_mult

buffer must be len*len_mult big

Definition at line 237 of file SDL_audio.h.

## len_ratio

double SDL_AudioCVT::len_ratio

Given len, final size is len*len_ratio

Definition at line 238 of file SDL_audio.h.

## needed

int SDL_AudioCVT::needed

Set to 1 if conversion possible

Definition at line 230 of file SDL_audio.h.

## rate_incr

double SDL_AudioCVT::rate_incr

Rate conversion increment

Definition at line 233 of file SDL_audio.h.

## src_format

SDL_AudioFormat SDL_AudioCVT::src_format

Source audio format

Definition at line 231 of file SDL_audio.h.

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

- SDL_audio.h