00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef GSM_H
00010 #define GSM_H
00011
00012 #ifdef __cplusplus
00013 # define NeedFunctionPrototypes 1
00014 #endif
00015
00016 #if __STDC__
00017 # define NeedFunctionPrototypes 1
00018 #endif
00019
00020 #ifdef _NO_PROTO
00021 # undef NeedFunctionPrototypes
00022 #endif
00023
00024 #ifdef NeedFunctionPrototypes
00025 # include <stdio.h>
00026 #endif
00027
00028 #undef GSM_P
00029 #if NeedFunctionPrototypes
00030 # define GSM_P( protos ) protos
00031 #else
00032 # define GSM_P( protos ) ( )
00033 #endif
00034
00035
00036
00037
00038
00039 typedef struct gsm_state * gsm;
00040 typedef short gsm_signal;
00041 typedef unsigned char gsm_byte;
00042 typedef gsm_byte gsm_frame[33];
00043
00044 #define GSM_MAGIC 0xD
00045
00046 #define GSM_PATCHLEVEL 10
00047 #define GSM_MINOR 0
00048 #define GSM_MAJOR 1
00049
00050 #define GSM_OPT_VERBOSE 1
00051 #define GSM_OPT_FAST 2
00052 #define GSM_OPT_LTP_CUT 3
00053 #define GSM_OPT_WAV49 4
00054 #define GSM_OPT_FRAME_INDEX 5
00055 #define GSM_OPT_FRAME_CHAIN 6
00056
00057 #define GSM_SAMPLES_PER_FRAME 160
00058
00059 extern gsm gsm_create GSM_P((void));
00060 extern void gsm_destroy GSM_P((gsm));
00061
00062 extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *));
00063 extern int gsm_option GSM_P((gsm, int, int *));
00064
00065 extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *));
00066 extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *));
00067
00068 extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
00069 extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
00070
00071 #undef GSM_P
00072
00073 #endif