ex_g726.h 770 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. .subclass.codec = AST_FORMAT_G726,
  21. .datalen = sizeof(ex_g726),
  22. .samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
  23. .mallocd = 0,
  24. .offset = 0,
  25. .src = __PRETTY_FUNCTION__,
  26. .data.ptr = ex_g726,
  27. };
  28. return &f;
  29. }