ex_speex.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*! \file
  2. * \brief Random 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_speex[] = {
  10. 0x2e, 0x8e, 0x0f, 0x9a, 0x20, 0000, 0x01, 0x7f, 0xff, 0xff,
  11. 0xff, 0xff, 0xff, 0x91, 0000, 0xbf, 0xff, 0xff, 0xff, 0xff,
  12. 0xff, 0xdc, 0x80, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  13. 0x98, 0x7f, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xf7, 0x80,
  14. };
  15. static struct ast_frame *speex_sample(void)
  16. {
  17. static struct ast_frame f = {
  18. .frametype = AST_FRAME_VOICE,
  19. .datalen = sizeof(ex_speex),
  20. /* All frames are 20 ms long */
  21. .samples = SPEEX_SAMPLES,
  22. .mallocd = 0,
  23. .offset = 0,
  24. .src = __PRETTY_FUNCTION__,
  25. .data.ptr = ex_speex,
  26. };
  27. f.subclass.format = ast_format_speex;
  28. return &f;
  29. }
  30. static uint8_t ex_speex16[] = {
  31. 0x3f, 0x78, 0x89, 0x14, 0x4a, 0x00, 0x00, 0x7f, 0xff, 0xff,
  32. 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x92,
  33. 0x06, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  34. 0xff, 0xff, 0xff, 0xc0, 0x30, 0x5f, 0xff, 0xfd, 0xbb, 0xee,
  35. 0x30, 0x56, 0xff, 0xf8, 0x74, 0x54, 0x31, 0xe6, 0xfe, 0x71,
  36. 0xdc, 0xca, 0x44, 0x6a, 0x43, 0x75, 0xae, 0x31, 0x7a, 0x50,
  37. 0xd9, 0xfc, 0x93, 0x13, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
  38. 0xab, 0xab, 0xab, 0xab, 0x3a, 0xba, 0xba, 0xba, 0xba, 0xba,
  39. 0xba, 0xba, 0xba, 0xba, 0xb0, 0xab, 0xab, 0xab, 0xd9, 0x37,
  40. 0xab, 0xab, 0xb4, 0x34, 0xe9, 0x0b, 0xd4, 0x2f, 0x13, 0x4c,
  41. 0xf0, 0xef, 0x8d, 0xdd, 0x99, 0xc7
  42. };
  43. static struct ast_frame *speex16_sample(void)
  44. {
  45. static struct ast_frame f = {
  46. .frametype = AST_FRAME_VOICE,
  47. .datalen = sizeof(ex_speex16),
  48. /* All frames are 20 ms long */
  49. .samples = SPEEX_SAMPLES,
  50. .mallocd = 0,
  51. .offset = 0,
  52. .src = __PRETTY_FUNCTION__,
  53. .data.ptr = ex_speex16,
  54. };
  55. f.subclass.format = ast_format_speex16;
  56. return &f;
  57. }