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: /cvsroot/sox/sox/libgsm/gsm.h,v 1.2 2008/03/21 13:34:21 robs Exp $*/ 8 9 #ifndef GSM_H 10 #define GSM_H 11 12 #include "aliases.h" 13 14 #ifdef __cplusplus 15 # define NeedFunctionPrototypes 1 16 #endif 17 18 #if __STDC__ 19 # define NeedFunctionPrototypes 1 20 #endif 21 22 #ifdef _NO_PROTO 23 # undef NeedFunctionPrototypes 24 #endif 25 26 #ifdef NeedFunctionPrototypes 27 # include <stdio.h> /* for FILE * */ 28 #endif 29 30 #undef GSM_P 31 #if NeedFunctionPrototypes 32 # define GSM_P( protos ) protos 33 #else 34 # define GSM_P( protos ) ( /* protos */ ) 35 #endif 36 37 /* 38 * Interface 39 */ 40 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 */ 45 46 #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */ 47 48 #define GSM_PATCHLEVEL 10 49 #define GSM_MINOR 0 50 #define GSM_MAJOR 1 51 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 58 59 extern gsm gsm_create GSM_P((void)); 60 extern void gsm_destroy GSM_P((gsm)); 61 62 extern int gsm_option GSM_P((gsm, int, int *)); 63 64 extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *)); 65 extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *)); 66 67 #undef GSM_P 68 69 #endif /* GSM_H */ 70