Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.4 KiB

  1. /******************************************************************************
  2. * FeedChain.h *
  3. *-------------*
  4. * This is the header file for the CFeedChain implementation.
  5. *------------------------------------------------------------------------------
  6. * Copyright (C) 1999 Microsoft Corporation Date: 03/01/99
  7. * All Rights Reserved
  8. *
  9. *********************************************************************** MC ****/
  10. #ifndef FeedChain_H
  11. #define FeedChain_H
  12. #ifndef SPDebug_h
  13. #include <spdebug.h>
  14. #endif
  15. #ifndef SPCollec_h
  16. #include <SPCollec.h>
  17. #endif
  18. // Maximum posody breakpoints for each phon
  19. typedef enum KNOTSLEN
  20. {
  21. KNOTS_PER_PHON = 20
  22. }KNOTSLEN;
  23. //-----------------------------------------------------
  24. // This is the unit data the BE gets fron the FE
  25. //-----------------------------------------------------
  26. typedef struct UNITINFO
  27. {
  28. ULONG UnitID; // Inventory table ID
  29. float duration; // Duration in seconds
  30. float amp; // Abs amplitude
  31. float ampRatio; // Amplitude gain
  32. ULONG nKnots; // Number of prosody breakpoints
  33. float pTime[KNOTS_PER_PHON]; // Breakpoint length
  34. float pF0[KNOTS_PER_PHON]; // Pitch breakpoint
  35. float pAmp[KNOTS_PER_PHON]; // Amplitude gain breakpoint
  36. ULONG PhonID; // Phoneme ID
  37. ULONG SenoneID; // Context offset from PhonID
  38. USHORT AlloID;
  39. USHORT NextAlloID;
  40. USHORT AlloFeatures; // for viseme
  41. ULONG flags; // Misc flags
  42. ULONG csamplesOut; // Number of rendered samples
  43. float speechRate;
  44. //-- Event data
  45. ULONG srcPosition; // Position for WORD events
  46. ULONG srcLen; // Length for WORD events
  47. ULONG sentencePosition; // Position for SENTENCE events
  48. ULONG sentenceLen; // Length for SENTENCE events
  49. void *pBMObj; // Ptr to bookmark list
  50. //-- Control data
  51. ULONG user_Volume; // Output volume level
  52. bool hasSpeech;
  53. //-- Debug output
  54. enum SILENCE_SOURCE silenceSource;
  55. CHAR szUnitName[15];
  56. long ctrlFlags;
  57. /*long cur_TIME;
  58. long decompress_TIME;
  59. long prosody_TIME;
  60. long stretch_TIME;
  61. long lpc_TIME;*/
  62. } UNITINFO;
  63. //-------------------------------------------------
  64. // Since bookmarks can be stacked, we need to
  65. // save each individually into a list
  66. //-------------------------------------------------
  67. typedef struct
  68. {
  69. LPARAM pBMItem; // Ptr to text data
  70. } BOOKMARK_ITEM;
  71. class CBookmarkList
  72. {
  73. public:
  74. //----------------------------------------
  75. // Needs destructor to dealloc
  76. // 'BOOKMARK_ITEM' memory
  77. //----------------------------------------
  78. ~CBookmarkList();
  79. //----------------------------------------
  80. // Linked list bookmark items
  81. //----------------------------------------
  82. CSPList<BOOKMARK_ITEM*, BOOKMARK_ITEM*> m_BMList;
  83. };
  84. //---------------------------------------------------
  85. // Speech states
  86. //---------------------------------------------------
  87. enum SPEECH_STATE
  88. {
  89. SPEECH_CONTINUE,
  90. SPEECH_DONE
  91. };
  92. class CFeedChain
  93. {
  94. public:
  95. virtual HRESULT NextData( void **pData, SPEECH_STATE *pSpeechState ) = 0;
  96. };
  97. #endif //--- This must be the last line in the file