ex_adpcm.h 751 B

123456789101112131415161718192021222324252627282930313233
  1. /*! \file
  2. * \brief 4-bit ADPCM 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_adpcm[] = {
  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 *adpcm_sample(void)
  17. {
  18. static struct ast_frame f = {
  19. .frametype = AST_FRAME_VOICE,
  20. .subclass.codec = AST_FORMAT_ADPCM,
  21. .datalen = sizeof(ex_adpcm),
  22. .samples = ARRAY_LEN(ex_adpcm) * 2,
  23. .mallocd = 0,
  24. .offset = 0,
  25. .src = __PRETTY_FUNCTION__,
  26. .data.ptr = ex_adpcm,
  27. };
  28. return &f;
  29. }