ex_lpc10.h 681 B

1234567891011121314151617181920212223242526272829303132
  1. /*! \file
  2. * \brief
  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_lpc10[] = {
  10. 0x01, 0x08, 0x31, 0x08, 0x31, 0x80, 0x30,
  11. };
  12. static struct ast_frame *lpc10_sample(void)
  13. {
  14. static struct ast_frame f = {
  15. .frametype = AST_FRAME_VOICE,
  16. .datalen = sizeof(ex_lpc10),
  17. /* All frames are 22 ms long (maybe a little more -- why did he choose
  18. LPC10_SAMPLES_PER_FRAME sample frames anyway?? */
  19. .samples = LPC10_SAMPLES_PER_FRAME,
  20. .mallocd = 0,
  21. .offset = 0,
  22. .src = __PRETTY_FUNCTION__,
  23. .data.ptr = ex_lpc10,
  24. };
  25. ast_format_set(&f.subclass.format, AST_FORMAT_LPC10, 0);
  26. return &f;
  27. }