ex_g726.h 772 B

123456789101112131415161718192021222324252627282930313233
  1. /*! \file
  2. * \brief 4-bit G.726 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_g726[] = {
  10. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  11. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  12. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  13. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  14. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  15. };
  16. static struct ast_frame *g726_sample(void)
  17. {
  18. static struct ast_frame f = {
  19. .frametype = AST_FRAME_VOICE,
  20. .datalen = sizeof(ex_g726),
  21. .samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
  22. .mallocd = 0,
  23. .offset = 0,
  24. .src = __PRETTY_FUNCTION__,
  25. .data.ptr = ex_g726,
  26. };
  27. f.subclass.format = ast_format_g726;
  28. return &f;
  29. }