gsm.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. /*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.11 1996/07/05 18:02:56 jutta Exp $*/
  7. #ifndef GSM_H
  8. #define GSM_H
  9. #ifdef __cplusplus
  10. # define NeedFunctionPrototypes 1
  11. #endif
  12. #if __STDC__
  13. # define NeedFunctionPrototypes 1
  14. #endif
  15. #ifdef _NO_PROTO
  16. # undef NeedFunctionPrototypes
  17. #endif
  18. #ifdef NeedFunctionPrototypes
  19. # include <stdio.h> /* for FILE * */
  20. #endif
  21. #undef GSM_P
  22. #if NeedFunctionPrototypes
  23. # define GSM_P( protos ) protos
  24. #else
  25. # define GSM_P( protos ) ( /* protos */ )
  26. #endif
  27. /*
  28. * Interface
  29. */
  30. typedef struct gsm_state * gsm;
  31. typedef short gsm_signal; /* signed 16 bit */
  32. typedef unsigned char gsm_byte;
  33. typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */
  34. #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */
  35. #define GSM_PATCHLEVEL 10
  36. #define GSM_MINOR 0
  37. #define GSM_MAJOR 1
  38. #define GSM_OPT_VERBOSE 1
  39. #define GSM_OPT_FAST 2
  40. #define GSM_OPT_LTP_CUT 3
  41. #define GSM_OPT_WAV49 4
  42. #define GSM_OPT_FRAME_INDEX 5
  43. #define GSM_OPT_FRAME_CHAIN 6
  44. extern gsm gsm_create GSM_P((void));
  45. extern void gsm_destroy GSM_P((gsm));
  46. extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *));
  47. extern int gsm_option GSM_P((gsm, int, int *));
  48. extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *));
  49. extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *));
  50. extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
  51. extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
  52. #undef GSM_P
  53. #endif /* GSM_H */