comparison alt_audio_convert.h @ 360:c984aa6990f7

Fixes and enhancements from Frank Ranostaj.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 12 Jun 2002 08:35:23 +0000
parents 7b9a0f3f030e
children f61eadea1f44
comparison
equal deleted inserted replaced
359:2b7969823778 360:c984aa6990f7
33 #define Sound_AI_Loop 0x2 33 #define Sound_AI_Loop 0x2
34 #define _fsize 64 34 #define _fsize 64
35 35
36 36
37 typedef struct{ 37 typedef struct{
38 short c[16][2*_fsize]; 38 Sint16 c[16][2*_fsize];
39 char incr[16]; 39 char incr[16];
40 int pos_mod; 40 int pos_mod;
41 } VarFilter; 41 } VarFilter;
42 42
43 typedef struct{ 43 typedef struct{
44 short* buffer; 44 Uint8* buffer;
45 int mode; 45 int mode;
46 VarFilter *filter; 46 VarFilter *filter;
47 } AdapterC; 47 } AdapterC;
48
49 /*
50 typedef struct{
51 VarFilter filter;
52 double mult; // buffer must be len*buf_mult big
53 int add;
54 int (*adapter[32]) ( AdapterC Data, int length );
55 } SDL_AudioC;
56
57 */
48 58
49 typedef struct{ 59 typedef struct{
50 int needed; 60 int needed;
51 VarFilter filter; 61 VarFilter filter;
52 double len_mult; /* buffer must be len*len_mult big*/ 62 double len_mult; /* buffer must be len*len_mult big*/
53 Uint8* buf; 63 Uint8* buf;
54 int len; 64 int len;
55 int len_cvt; /* Length of converted audio buffer */ 65 int len_cvt; /* Length of converted audio buffer */
56 int add; 66 int add;
57 int (*adapter[32]) ( AdapterC Data, int length ); 67 int (*adapter[32]) ( AdapterC Data, int length );
58 } Sound_AudioCVT; 68 } Sound_AudioCVT;
59 69
70 #define SDL_AI_Loop 0x01
71
60 extern DECLSPEC int Sound_ConvertAudio( Sound_AudioCVT *Data ); 72 extern DECLSPEC int Sound_ConvertAudio( Sound_AudioCVT *Data );
61 73
62 extern DECLSPEC int Sound_BuildAudioConverter( Sound_AudioCVT *Data, 74 extern DECLSPEC int Sound_BuildAudioCVT( Sound_AudioCVT *Data,
63 Uint16 src_format, Uint8 src_channels, int src_rate, 75 Uint16 src_format, Uint8 src_channels, int src_rate,
64 Uint16 dst_format, Uint8 dst_channels, int dst_rate ); 76 Uint16 dst_format, Uint8 dst_channels, int dst_rate );
65 77
66 #endif /* _INCLUDE_AUDIO_CONVERT_H_ */ 78 #endif /* _INCLUDE_AUDIO_CONVERT_H_ */
67 79