ex_gsm.h 718 B

123456789101112131415161718192021222324252627282930313233
  1. /*! \file
  2. * \brief 8-bit raw data
  3. *
  4. * Copyright (C) 2008, Digium, Inc.
  5. *
  6. * Distributed under the terms of the GNU General Public License
  7. *
  8. */
  9. static uint8_t ex_gsm[] = {
  10. 0xda, 0xa6, 0xac, 0x2d, 0xa3, 0x50, 0x00, 0x49, 0x24, 0x92,
  11. 0x49, 0x24, 0x50, 0x40, 0x49, 0x24, 0x92, 0x37, 0x24, 0x52,
  12. 0x00, 0x49, 0x24, 0x92, 0x47, 0x24, 0x50, 0x80, 0x46, 0xe3,
  13. 0x6d, 0xb8, 0xdc,
  14. };
  15. static struct ast_frame *gsm_sample(void)
  16. {
  17. static struct ast_frame f = {
  18. .frametype = AST_FRAME_VOICE,
  19. .subclass.codec = AST_FORMAT_GSM,
  20. .datalen = sizeof(ex_gsm),
  21. /* All frames are 20 ms long */
  22. .samples = GSM_SAMPLES,
  23. .mallocd = 0,
  24. .offset = 0,
  25. .src = __PRETTY_FUNCTION__,
  26. .data.ptr = ex_gsm,
  27. };
  28. return &f;
  29. }