gsm.h 1.7 KB

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