Mercurial > SDL_sound_CoreAudio
comparison alt_audio_convert.h @ 373:24a610dfbbfd
More altcvt updates from Frank.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 29 Jun 2002 04:08:17 +0000 |
parents | 1b463ef9bcc2 |
children | 44ed8bdeba74 |
comparison
equal
deleted
inserted
replaced
372:ee0678efd4a3 | 373:24a610dfbbfd |
---|---|
36 typedef struct{ | 36 typedef struct{ |
37 Sint16 c[16][4*_fsize]; | 37 Sint16 c[16][4*_fsize]; |
38 Uint8 incr[16]; | 38 Uint8 incr[16]; |
39 int denominator; | 39 int denominator; |
40 int numerator; | 40 int numerator; |
41 Uint32 zero; | |
42 int mask; | |
41 } VarFilter; | 43 } VarFilter; |
42 | 44 |
43 typedef struct{ | 45 typedef struct{ |
44 Uint8* buffer; | 46 Uint8* buffer; |
45 int mode; | 47 int mode; |
46 VarFilter *filter; | 48 VarFilter *filter; |
47 } AdapterC; | 49 } AdapterC; |
48 | 50 |
49 /* | |
50 typedef struct{ | 51 typedef struct{ |
51 VarFilter filter; | 52 VarFilter filter; |
52 double mult; // buffer must be len*buf_mult big | 53 int (*adapter[32]) ( AdapterC Data, int length ); |
53 int add; | 54 /* buffer must be len*len_mult(+len_add) big */ |
54 int (*adapter[32]) ( AdapterC Data, int length ); | 55 int len_mult; |
55 } SDL_AudioC; | 56 int len_add; |
57 double add; | |
56 | 58 |
57 */ | 59 /* the following elements are provided for compatibility: */ |
58 | 60 /* the size of the output is approx len*len_ratio */ |
59 /* the len_* variables and the needed variable are not used internally, | 61 double len_ratio; |
60 they are provided for compatibility */ | 62 Uint8* buf; /* input/output buffer */ |
61 | 63 int needed; /* 0 if nothing to be done, 1 otherwise */ |
62 typedef struct{ | 64 int len; /* Length of the input */ |
63 int needed; | |
64 VarFilter filter; | |
65 Uint8* buf; | |
66 int len; /* Length of original audio buffer */ | |
67 int len_cvt; /* Length of converted audio buffer */ | 65 int len_cvt; /* Length of converted audio buffer */ |
68 int len_mult; /* buffer must be len*len_mult big */ | |
69 double len_ratio; /* Given len, final size is len*len_ratio */ | |
70 | |
71 double add; | |
72 double mult; | |
73 int (*adapter[32]) ( AdapterC Data, int length ); | |
74 } Sound_AudioCVT; | 66 } Sound_AudioCVT; |
75 | 67 |
76 #define SDL_AI_Loop 0x01 | 68 #define SDL_SOUND_Loop 0x10 |
77 | 69 |
78 extern DECLSPEC int Sound_ConvertAudio( Sound_AudioCVT *Data ); | 70 extern DECLSPEC int Sound_ConvertAudio( Sound_AudioCVT *Data ); |
79 | 71 |
80 extern DECLSPEC int Sound_BuildAudioCVT( Sound_AudioCVT *Data, | 72 extern DECLSPEC int Sound_BuildAudioCVT( Sound_AudioCVT *Data, |
81 Uint16 src_format, Uint8 src_channels, int src_rate, | 73 Uint16 src_format, Uint8 src_channels, int src_rate, |
82 Uint16 dst_format, Uint8 dst_channels, int dst_rate ); | 74 Uint16 dst_format, Uint8 dst_channels, int dst_rate, Uint32 dst_size ); |
83 | 75 |
84 #endif /* _INCLUDE_AUDIO_CONVERT_H_ */ | 76 #endif /* _INCLUDE_AUDIO_CONVERT_H_ */ |
85 | 77 |