Mercurial > hg > audiostuff
comparison intercom/gsm/gsm.h @ 2:13be24d74cd2
import intercom-0.4.1
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 09:57:52 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:9cadc470e3da | 2:13be24d74cd2 |
---|---|
1 /* | |
2 * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische | |
3 * Universitaet Berlin. See the accompanying file "COPYRIGHT" for | |
4 * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. | |
5 */ | |
6 | |
7 /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.5 1994/01/25 22:20:48 jutta Exp $*/ | |
8 | |
9 #ifndef GSM_H | |
10 #define GSM_H | |
11 | |
12 #ifndef NeedFunctionPrototypes | |
13 #if defined(__cplusplus) || defined(__STDC__) || defined(VMS) | |
14 # define NeedFunctionPrototypes 1 | |
15 #endif | |
16 #endif | |
17 | |
18 /* The above 5 lines used to be several #if ... it was changed to avoid | |
19 * silly warnings and sintax errors of some compilers and to automate | |
20 * symbol definition for VMS! | |
21 * #ifdef __cplusplus | |
22 * # define NeedFunctionPrototypes 1 | |
23 * #endif | |
24 * | |
25 * #if __STDC__ | |
26 * # define NeedFunctionPrototypes 1 | |
27 * #endif | |
28 */ | |
29 | |
30 #ifdef _NO_PROTO | |
31 # undef NeedFunctionPrototypes | |
32 #endif | |
33 | |
34 #ifdef GSM_P | |
35 #undef GSM_P /* somewhere else may have defined this... */ | |
36 #endif | |
37 | |
38 #ifdef NeedFunctionPrototypes | |
39 # define GSM_P( protos ) protos | |
40 #else | |
41 # define GSM_P( protos ) ( /* protos */ ) | |
42 #endif | |
43 | |
44 #ifdef NeedFunctionPrototypes | |
45 # include <stdio.h> /* for FILE * */ | |
46 #endif | |
47 | |
48 /* | |
49 * Interface | |
50 */ | |
51 | |
52 typedef struct gsm_state *gsm; | |
53 typedef short gsm_signal; /* signed 16 bit */ | |
54 typedef unsigned char gsm_byte; | |
55 typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */ | |
56 | |
57 #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */ | |
58 | |
59 #define GSM_PATCHLEVEL 3 | |
60 #define GSM_MINOR 0 | |
61 #define GSM_MAJOR 1 | |
62 | |
63 #define GSM_OPT_VERBOSE 1 | |
64 #define GSM_OPT_FAST 2 | |
65 | |
66 | |
67 /* | |
68 * Prototypes generated automatically by cproto ... | |
69 */ | |
70 | |
71 /* Prototypes for functions defined in file add.c */ | |
72 extern word gsm_add GSM_P((word a, word b)); | |
73 word gsm_sub GSM_P((word a, word b)); | |
74 word gsm_mult GSM_P((word a, word b)); | |
75 word gsm_mult_r GSM_P((word a, word b)); | |
76 word gsm_abs GSM_P((word a)); | |
77 longword gsm_L_mult GSM_P((word a, word b)); | |
78 longword gsm_L_add GSM_P((longword a, longword b)); | |
79 longword gsm_L_sub GSM_P((longword a, longword b)); | |
80 word gsm_norm GSM_P((longword a)); | |
81 longword gsm_L_asl GSM_P((longword a, int n)); | |
82 word gsm_asl GSM_P((word a, int n)); | |
83 longword gsm_L_asr GSM_P((longword a, int n)); | |
84 word gsm_asr GSM_P((word a, int n)); | |
85 word gsm_div GSM_P((word num, word denum)); | |
86 | |
87 /* Prototypes for functions defined in file code.c */ | |
88 void Gsm_Coder GSM_P((struct gsm_state * S, word * s, word * LARc, | |
89 word * Nc, word * bc, word * Mc, word * xmaxc, word * xMc)); | |
90 | |
91 /* Prototypes for functions defined in file decode.c */ | |
92 void Gsm_Decoder GSM_P((struct gsm_state * S, word * LARcr, word * Ncr, | |
93 word * bcr, word * Mcr, word * xmaxcr, word * xMcr, word * s)); | |
94 | |
95 /* Prototypes for functions defined in file long_term.c */ | |
96 void Gsm_Long_Term_Predictor GSM_P((struct gsm_state * S, word * d, | |
97 word * dp, word * e, word * dpp, word * Nc, word * bc)); | |
98 void Gsm_Long_Term_Synthesis_Filtering GSM_P((struct gsm_state * S, | |
99 word Ncr, word bcr, register word * erp, register word * drp)); | |
100 | |
101 /* Prototypes for functions defined in file lpc.c */ | |
102 void Gsm_LPC_Analysis GSM_P((struct gsm_state * S, word * s, | |
103 word * LARc)); | |
104 | |
105 /* Prototypes for functions defined in file preprocess.c */ | |
106 void Gsm_Preprocess GSM_P((struct gsm_state * S, word * s, word * so)); | |
107 | |
108 /* Prototypes for functions defined in file rpe.c */ | |
109 void Gsm_RPE_Encoding GSM_P((struct gsm_state * S, word * e, | |
110 word * xmaxc, word * Mc, word * xMc)); | |
111 void Gsm_RPE_Decoding GSM_P((struct gsm_state * S, word xmaxcr, | |
112 word Mcr, word * xMcr, word * erp)); | |
113 | |
114 /* Prototypes for functions defined in file gsm_destroy.c */ | |
115 void gsm_destroy GSM_P((gsm S)); | |
116 | |
117 /* Prototypes for functions defined in file gsm_decode.c */ | |
118 int gsm_decode GSM_P((gsm s, gsm_byte * c, gsm_signal * target)); | |
119 | |
120 /* Prototypes for functions defined in file gsm_encode.c */ | |
121 void gsm_encode GSM_P((gsm s, gsm_signal * source, gsm_byte * c)); | |
122 | |
123 /* Prototypes for functions defined in file gsm_explode.c */ | |
124 int gsm_explode GSM_P((gsm s, gsm_byte * c, gsm_signal * target)); | |
125 | |
126 /* Prototypes for functions defined in file gsm_implode.c */ | |
127 void gsm_implode GSM_P((gsm s, gsm_signal * source, gsm_byte * c)); | |
128 | |
129 /* Prototypes for functions defined in file gsm_create.c */ | |
130 gsm gsm_create GSM_P((void)); | |
131 | |
132 /* Prototypes for functions defined in file gsm_print.c */ | |
133 int gsm_print GSM_P((FILE * f, gsm s, gsm_byte * c)); | |
134 | |
135 /* Prototypes for functions defined in file gsm_option.c */ | |
136 int gsm_option GSM_P((gsm r, int opt, int *val)); | |
137 | |
138 /* Prototypes for functions defined in file short_term.c */ | |
139 void Gsm_Short_Term_Analysis_Filter GSM_P((struct gsm_state * S, | |
140 word * LARc, word * s)); | |
141 void Gsm_Short_Term_Synthesis_Filter GSM_P((struct gsm_state * S, | |
142 word * LARcr, word * wt, word * s)); | |
143 | |
144 /* These prototypes only when debugging is enabled! */ | |
145 #ifndef NDEBUG | |
146 void gsm_debug_words GSM_P((char *name, int from, int to, word * ptr)); | |
147 void gsm_debug_longwords GSM_P((char *name, int from, int to, | |
148 longword * ptr)); | |
149 void gsm_debug_longword GSM_P((char *name, longword value)); | |
150 void gsm_debug_word GSM_P((char *name, word value)); | |
151 #endif | |
152 | |
153 #undef GSM_P | |
154 | |
155 #endif /* GSM_H */ |