My Project
Loading...
Searching...
No Matches
SDL_AudioCVT Struct Reference

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

#include <SDL_audio.h>

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.

Field Documentation

◆ buf

Uint8* buf

Buffer to hold entire audio data

◆ dst_format

SDL_AudioFormat dst_format

Target audio format

◆ filter_index

int filter_index

Current audio conversion function

◆ filters

SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS+1]

NULL-terminated list of filter functions

◆ len

int len

Length of original audio buffer

◆ len_cvt

int len_cvt

Length of converted audio buffer

◆ len_mult

int len_mult

buffer must be len*len_mult big

◆ len_ratio

double len_ratio

Given len, final size is len*len_ratio

◆ needed

int needed

Set to 1 if conversion possible

◆ rate_incr

double rate_incr

Rate conversion increment

◆ src_format

SDL_AudioFormat src_format

Source audio format


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