ex_gsm.h 720 B

12345678910111213141516171819202122232425262728293031323334
  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. .datalen = sizeof(ex_gsm),
  20. /* All frames are 20 ms long */
  21. .samples = GSM_SAMPLES,
  22. .mallocd = 0,
  23. .offset = 0,
  24. .src = __PRETTY_FUNCTION__,
  25. .data.ptr = ex_gsm,
  26. };
  27. f.subclass.format = ast_format_gsm;
  28. return &f;
  29. }