1SDL_AudioCVT(3)                SDL API Reference               SDL_AudioCVT(3)
2
3
4

NAME

6       SDL_AudioCVT - Audio Conversion Structure
7

STRUCTURE DEFINITION

9       typedef struct{
10         int needed;
11         Uint16 src_format;
12         Uint16 dest_format;
13         double rate_incr;
14         Uint8 *buf;
15         int len;
16         int len_cvt;
17         int len_mult;
18         double len_ratio;
19         void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
20         int filter_index;
21       } SDL_AudioCVT;
22

STRUCTURE DATA

24       needed              Set to one if the conversion is possible
25
26       src_format          Audio format of the source
27
28       dest_format         Audio format of the destination
29
30       rate_incr           Rate conversion increment
31
32       buf                 Audio buffer
33
34       len                 Length of the original audio buffer in bytes
35
36       len_cvt             Length  of  converted audio buffer in bytes (calcu‐
37                           lated)
38
39       len_mult            buf must be len*len_mult bytes in size(calculated)
40
41       len_ratio           Final audio size is len*len_ratio
42
43       filters[10](..)     Pointers to functions needed for this conversion
44
45       filter_index        Current conversion function
46

DESCRIPTION

48       The SDL_AudioCVT is used to convert audio data between  different  for‐
49       mats.  A  SDL_AudioCVT  structure is created with the SDL_BuildAudioCVT
50       function, while the actual conversion is done by  the  SDL_ConvertAudio
51       function.
52
53       Many  of  the fields in the SDL_AudioCVT structure should be considered
54       private and their function will not be discussed here.
55
56       Uint8 *buf
57
58       int len
59
60       int len_mult
61
62       double len_ratio
63

SEE ALSO

65       SDL_BuildAudioCVT, SDL_ConvertAudio, SDL_AudioSpec
66
67
68
69SDL                         Tue 11 Sep 2001, 22:58             SDL_AudioCVT(3)
Impressum