ex_adpcm.h 753 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. .datalen = sizeof(ex_adpcm),
  21. .samples = ARRAY_LEN(ex_adpcm) * 2,
  22. .mallocd = 0,
  23. .offset = 0,
  24. .src = __PRETTY_FUNCTION__,
  25. .data.ptr = ex_adpcm,
  26. };
  27. f.subclass.format = ast_format_adpcm;
  28. return &f;
  29. }