wav: prettify read_samples() function
[sox.git] / libgsm / gsm.h
blob9052e8d0a9249dc3c8028a42063c6e740a5f1a38
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 */
7 /*$Header: /cvsroot/sox/sox/libgsm/gsm.h,v 1.2 2008/03/21 13:34:21 robs Exp $*/
9 #ifndef GSM_H
10 #define GSM_H
12 #include "aliases.h"
14 #ifdef __cplusplus
15 # define NeedFunctionPrototypes 1
16 #endif
18 #if __STDC__
19 # define NeedFunctionPrototypes 1
20 #endif
22 #ifdef _NO_PROTO
23 # undef NeedFunctionPrototypes
24 #endif
26 #ifdef NeedFunctionPrototypes
27 # include <stdio.h> /* for FILE * */
28 #endif
30 #undef GSM_P
31 #if NeedFunctionPrototypes
32 # define GSM_P( protos ) protos
33 #else
34 # define GSM_P( protos ) ( /* protos */ )
35 #endif
38 * Interface
41 typedef struct gsm_state * gsm;
42 typedef short gsm_signal; /* signed 16 bit */
43 typedef unsigned char gsm_byte;
44 typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */
46 #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */
48 #define GSM_PATCHLEVEL 10
49 #define GSM_MINOR 0
50 #define GSM_MAJOR 1
52 #define GSM_OPT_VERBOSE 1
53 #define GSM_OPT_FAST 2
54 #define GSM_OPT_LTP_CUT 3
55 #define GSM_OPT_WAV49 4
56 #define GSM_OPT_FRAME_INDEX 5
57 #define GSM_OPT_FRAME_CHAIN 6
59 extern gsm gsm_create GSM_P((void));
60 extern void gsm_destroy GSM_P((gsm));
62 extern int gsm_option GSM_P((gsm, int, int *));
64 extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *));
65 extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *));
67 #undef GSM_P
69 #endif /* GSM_H */