Mercurial > SDL_sound_CoreAudio
comparison alt_audio_convert.h @ 365:f61eadea1f44
More revisions from Frank.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 18 Jun 2002 21:49:44 +0000 |
parents | c984aa6990f7 |
children | eda146d666d1 |
comparison
equal
deleted
inserted
replaced
364:4bcbc442d145 | 365:f61eadea1f44 |
---|---|
1 /* | 1 /* |
2 Extended Audio Converter for SDL (Simple DirectMedia Layer) | 2 * Extended Audio Converter for SDL (Simple DirectMedia Layer) |
3 Copyright (C) 2002 Frank Ranostaj | 3 * Copyright (C) 2002 Frank Ranostaj |
4 Institute of Applied Physik | 4 * Institute of Applied Physik |
5 Johann Wolfgang Goethe-Universität | 5 * Johann Wolfgang Goethe-Universität |
6 Frankfurt am Main, Germany | 6 * Frankfurt am Main, Germany |
7 * | |
8 * This library is free software; you can redistribute it and/or | |
9 * modify it under the terms of the GNU Library General Public | |
10 * License as published by the Free Software Foundation; either | |
11 * version 2 of the License, or (at your option) any later version. | |
12 * | |
13 * This library is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Library General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Library General Public | |
19 * License along with this library; if not, write to the Free | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 * | |
22 * Frank Ranostaj | |
23 * ranostaj@stud.uni-frankfurt.de | |
24 * | |
25 * (This code blatantly abducted for SDL_sound. Thanks, Frank! --ryan.) | |
26 */ | |
7 | 27 |
8 This library is free software; you can redistribute it and/or | 28 #ifndef _INCLUDE_ALT_AUDIO_CONVERT_H_ |
9 modify it under the terms of the GNU Library General Public | 29 #define _INCLUDE_ALT_AUDIO_CONVERT_H_ |
10 License as published by the Free Software Foundation; either | |
11 version 2 of the License, or (at your option) any later version. | |
12 | |
13 This library is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 Library General Public License for more details. | |
17 | |
18 You should have received a copy of the GNU Library General Public | |
19 License along with this library; if not, write to the Free | |
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | |
22 Frank Ranostaj | |
23 ranostaj@stud.uni-frankfurt.de | |
24 | |
25 (This code blatantly abducted for SDL_sound. Thanks, Frank! --ryan.) | |
26 | |
27 */ | |
28 | |
29 #ifndef _INCLUDE_AUDIO_CONVERT_H_ | |
30 #define _INCLUDE_AUDIO_CONVERT_H_ | |
31 | 30 |
32 #include "SDL_audio.h" | 31 #include "SDL_audio.h" |
33 #define Sound_AI_Loop 0x2 | 32 #define Sound_AI_Loop 0x2 |
34 #define _fsize 64 | 33 #define _fsize 64 |
35 | 34 |
36 | 35 |
37 typedef struct{ | 36 typedef struct{ |
38 Sint16 c[16][2*_fsize]; | 37 Sint16 c[16][2*_fsize]; |
39 char incr[16]; | 38 char incr[16]; |
40 int pos_mod; | 39 int denominator; |
40 int numerator; | |
41 } VarFilter; | 41 } VarFilter; |
42 | 42 |
43 typedef struct{ | 43 typedef struct{ |
44 Uint8* buffer; | 44 Uint8* buffer; |
45 int mode; | 45 int mode; |
73 | 73 |
74 extern DECLSPEC int Sound_BuildAudioCVT( Sound_AudioCVT *Data, | 74 extern DECLSPEC int Sound_BuildAudioCVT( Sound_AudioCVT *Data, |
75 Uint16 src_format, Uint8 src_channels, int src_rate, | 75 Uint16 src_format, Uint8 src_channels, int src_rate, |
76 Uint16 dst_format, Uint8 dst_channels, int dst_rate ); | 76 Uint16 dst_format, Uint8 dst_channels, int dst_rate ); |
77 | 77 |
78 #endif /* _INCLUDE_AUDIO_CONVERT_H_ */ | 78 #endif /* _INCLUDE_ALT_AUDIO_CONVERT_H_ */ |
79 | 79 |