• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.11 1996/07/05 18:02:56 jutta Exp $*/
8 
9 #ifndef	GSM_H
10 #define	GSM_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #ifdef __cplusplus
17 #	define	NeedFunctionPrototypes	1
18 #endif
19 
20 #if __STDC__
21 #	define	NeedFunctionPrototypes	1
22 #endif
23 
24 #ifdef _NO_PROTO
25 #	undef	NeedFunctionPrototypes
26 #endif
27 
28 #ifdef NeedFunctionPrototypes
29 #   include	<stdio.h>		/* for FILE * 	*/
30 #endif
31 
32 #undef GSM_P
33 #if NeedFunctionPrototypes
34 #	define	GSM_P( protos )	protos
35 #else
36 #	define  GSM_P( protos )	( /* protos */ )
37 #endif
38 
39 /*
40  *	Interface
41  */
42 
43 typedef struct gsm_state * 	gsm;
44 typedef short		   	gsm_signal;		/* signed 16 bit */
45 typedef unsigned char		gsm_byte;
46 typedef gsm_byte 		gsm_frame[33];		/* 33 * 8 bits	 */
47 
48 #define	GSM_MAGIC		0xD		  	/* 13 kbit/s RPE-LTP */
49 
50 #define	GSM_PATCHLEVEL		19
51 #define	GSM_MINOR		0
52 #define	GSM_MAJOR		1
53 
54 #define	GSM_OPT_VERBOSE		1
55 #define	GSM_OPT_FAST		2
56 #define	GSM_OPT_LTP_CUT		3
57 #define	GSM_OPT_WAV49		4
58 #define	GSM_OPT_FRAME_INDEX	5
59 #define	GSM_OPT_FRAME_CHAIN	6
60 
61 extern gsm  gsm_create 	GSM_P((void));
62 extern void gsm_destroy GSM_P((gsm));
63 
64 extern int  gsm_print   GSM_P((FILE *, gsm, gsm_byte  *));
65 extern int  gsm_option  GSM_P((gsm, int, int *));
66 
67 extern void gsm_encode  GSM_P((gsm, gsm_signal *, gsm_byte  *));
68 extern int  gsm_decode  GSM_P((gsm, gsm_byte   *, gsm_signal *));
69 
70 extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
71 extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
72 
73 #undef	GSM_P
74 
75 #ifdef __cplusplus
76 }  // extern "C"
77 #endif
78 
79 #endif	/* GSM_H */
80