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.

362 lines
8.5 KiB

  1. //
  2. // DMCompP.H
  3. //
  4. // Private include for DMCompos.DLL
  5. //
  6. // Copyright (c) 1997-1998 Microsoft Corporation
  7. //
  8. //
  9. #ifndef _DMCOMPP_
  10. #define _DMCOMPP_
  11. #define ALL_TRACK_GROUPS 0xffffffff
  12. extern long g_cComponent;
  13. // Class factory
  14. //
  15. class CDirectMusicPersonalityFactory : public IClassFactory
  16. {
  17. public:
  18. // IUnknown
  19. //
  20. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  21. virtual STDMETHODIMP_(ULONG) AddRef();
  22. virtual STDMETHODIMP_(ULONG) Release();
  23. // Interface IClassFactory
  24. //
  25. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  26. virtual STDMETHODIMP LockServer(BOOL bLock);
  27. // Constructor
  28. //
  29. CDirectMusicPersonalityFactory() : m_cRef(1) {}
  30. // Destructor
  31. // ~CDirectMusicPersonalityFactory() {}
  32. private:
  33. long m_cRef;
  34. };
  35. class CDirectMusicComposerFactory : public IClassFactory
  36. {
  37. public:
  38. // IUnknown
  39. //
  40. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  41. virtual STDMETHODIMP_(ULONG) AddRef();
  42. virtual STDMETHODIMP_(ULONG) Release();
  43. // Interface IClassFactory
  44. //
  45. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  46. virtual STDMETHODIMP LockServer(BOOL bLock);
  47. // Constructor
  48. //
  49. CDirectMusicComposerFactory() : m_cRef(1) {}
  50. // Destructor
  51. // ~CDirectMusicComposerFactory() {}
  52. private:
  53. long m_cRef;
  54. };
  55. class CDirectMusicTemplateFactory : public IClassFactory
  56. {
  57. public:
  58. // IUnknown
  59. //
  60. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  61. virtual STDMETHODIMP_(ULONG) AddRef();
  62. virtual STDMETHODIMP_(ULONG) Release();
  63. // Interface IClassFactory
  64. //
  65. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  66. virtual STDMETHODIMP LockServer(BOOL bLock);
  67. // Constructor
  68. //
  69. CDirectMusicTemplateFactory() : m_cRef(1) {}
  70. // Destructor
  71. // ~CDirectMusicTemplateFactory() {}
  72. private:
  73. long m_cRef;
  74. };
  75. class CDirectMusicSignPostTrackFactory : public IClassFactory
  76. {
  77. public:
  78. // IUnknown
  79. //
  80. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  81. virtual STDMETHODIMP_(ULONG) AddRef();
  82. virtual STDMETHODIMP_(ULONG) Release();
  83. // Interface IClassFactory
  84. //
  85. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  86. virtual STDMETHODIMP LockServer(BOOL bLock);
  87. // Constructor
  88. //
  89. CDirectMusicSignPostTrackFactory() : m_cRef(1) {}
  90. // Destructor
  91. // ~CDirectMusicSignPostTrackFactory() {}
  92. private:
  93. long m_cRef;
  94. };
  95. class CDirectMusicPersonalityTrackFactory : public IClassFactory
  96. {
  97. public:
  98. // IUnknown
  99. //
  100. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  101. virtual STDMETHODIMP_(ULONG) AddRef();
  102. virtual STDMETHODIMP_(ULONG) Release();
  103. // Interface IClassFactory
  104. //
  105. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
  106. virtual STDMETHODIMP LockServer(BOOL bLock);
  107. // Constructor
  108. //
  109. CDirectMusicPersonalityTrackFactory() : m_cRef(1) {}
  110. // Destructor
  111. // ~CDirectMusicPersonalityTrackFactory() {}
  112. private:
  113. long m_cRef;
  114. };
  115. // private interfaces
  116. interface IDMPers : IUnknown
  117. {
  118. virtual HRESULT STDMETHODCALLTYPE GetPersonalityStruct(void** ppPersonality)=0;
  119. };
  120. interface IDMTempl : IUnknown
  121. {
  122. virtual HRESULT STDMETHODCALLTYPE CreateSegment(IDirectMusicSegment* pSegment)=0;
  123. virtual HRESULT STDMETHODCALLTYPE Init(void* pTemplate)=0;
  124. };
  125. // private CLSIDs and IIDs (some IIDs should no longer be needed...)
  126. const CLSID CLSID_DMTempl = {0xD30BCC65,0x60E8,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}};
  127. const IID IID_IDMPers = {0x93BE9414,0x5C4E,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}};
  128. //const IID IID_IDMCompos = {0x6724A8C0,0x60C3,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}};
  129. const IID IID_IDMTempl = {0xD30BCC64,0x60E8,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}};
  130. //const IID IID_ISPstTrk = {0xB65019E0,0x61B6,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}};
  131. /*
  132. // stuff that will move to dmusici.h
  133. DEFINE_GUID(CLSID_DirectMusicPersonalityTrack,
  134. 0xf1edefe1, 0xae0f, 0x11d1, 0xa7, 0xce, 0x0, 0xa0, 0xc9, 0x13, 0xf7, 0x3c);
  135. DEFINE_GUID(GUID_PersonalityTrack,
  136. 0xf1edefe2, 0xae0f, 0x11d1, 0xa7, 0xce, 0x0, 0xa0, 0xc9, 0x13, 0xf7, 0x3c);
  137. */
  138. /*
  139. // stuff that will move to dmusicf.h
  140. // personalities
  141. // runtime chunks
  142. #define FOURCC_PERSONALITY mmioFOURCC('D','M','P','R')
  143. #define FOURCC_IOPERSONALITY mmioFOURCC('p','e','r','h')
  144. #define DM_FOURCC_GUID_CHUNK mmioFOURCC('g','u','i','d')
  145. #define DM_FOURCC_INFO_LIST mmioFOURCC('I','N','F','O')
  146. #define DM_FOURCC_VERSION_CHUNK mmioFOURCC('v','e','r','s')
  147. #define FOURCC_SUBCHORD mmioFOURCC('c','h','d','t')
  148. #define FOURCC_CHORDENTRY mmioFOURCC('c','h','e','h')
  149. #define FOURCC_SUBCHORDID mmioFOURCC('s','b','c','n')
  150. #define FOURCC_IONEXTCHORD mmioFOURCC('n','c','r','d')
  151. #define FOURCC_NEXTCHORDSEQ mmioFOURCC('n','c','s','q')
  152. #define FOURCC_IOSIGNPOST mmioFOURCC('s','p','s','h')
  153. #define FOURCC_CHORDNAME mmioFOURCC('I','N','A','M')
  154. // runtime list chunks
  155. #define FOURCC_LISTCHORDENTRY mmioFOURCC('c','h','o','e')
  156. #define FOURCC_LISTCHORDMAP mmioFOURCC('c','m','a','p')
  157. #define FOURCC_LISTCHORD mmioFOURCC('c','h','r','d')
  158. #define FOURCC_LISTCHORDPALETTE mmioFOURCC('c','h','p','l')
  159. #define FOURCC_LISTCADENCE mmioFOURCC('c','a','d','e')
  160. #define FOURCC_LISTSIGNPOSTITEM mmioFOURCC('s','p','s','t')
  161. #define FOURCC_SIGNPOSTLIST mmioFOURCC('s','p','s','q')
  162. // constants
  163. const int MaxSubChords = 4;
  164. // run time data structs
  165. struct ioPersonality
  166. {
  167. char szLoadName[20];
  168. DWORD dwScalePattern;
  169. DWORD dwFlags;
  170. };
  171. struct ioSubChord
  172. {
  173. DWORD dwChordPattern;
  174. DWORD dwScalePattern;
  175. DWORD dwInvertPattern;
  176. BYTE bChordRoot;
  177. BYTE bScaleRoot;
  178. WORD wCFlags;
  179. DWORD dwLevels; // parts or which subchord levels this chord supports
  180. };
  181. struct ioChordEntry
  182. {
  183. DWORD dwFlags;
  184. WORD wConnectionID; // replaces runtime "pointer to this"
  185. };
  186. struct ioNextChord
  187. {
  188. DWORD dwFlags;
  189. WORD nWeight;
  190. WORD wMinBeats;
  191. WORD wMaxBeats;
  192. WORD wConnectionID; // points to an ioChordEntry
  193. };
  194. struct ioSignPost
  195. {
  196. DWORD dwChords; // 1bit per group
  197. DWORD dwFlags;
  198. };
  199. ///*
  200. RIFF
  201. (
  202. 'DMPR'
  203. <perh-ck> // Personality header chunk
  204. [<guid-ck>] // guid chunk
  205. [<vers-ck>] // version chunk (two DWORDS)
  206. <INFO-list> // standard MS Info chunk
  207. <chdt-ck> // subchord database
  208. <chpl-list> // chord palette
  209. <cmap-list> // chord map
  210. <spst-list> // signpost list
  211. [<ceed-ck>] // optional chordmap position data
  212. )
  213. <chdt> ::= chdt(<cbChordSize::WORD> <ioSubChord> ... )
  214. <chpl-list> ::= LIST('chpl'
  215. <chrd-list> ... // chord definition
  216. )
  217. <chrd-list> ::= LIST('chrd'
  218. <INAM-ck> // name of chord in wide char format
  219. <sbcn-ck> // list of subchords composing chord
  220. [<ched-ck>] // optional chord edit flags
  221. )
  222. <cmap-list> ::= LIST('cmap' <choe-list> )
  223. <choe-list> ::= LIST('choe'
  224. <cheh-ck> // chord entry data
  225. <chrd-list> // chord definition
  226. <ncsq-ck> // connecting(next) chords
  227. )
  228. <spst-list> ::= LIST('spst'
  229. <spsh-ck>
  230. <chrd-list>
  231. [<cade-list>]
  232. )
  233. <cade-list> ::= LIST('cade' <chrd-list> ...)
  234. <sbcn-ck> ::= sbcn(<cSubChordID:WORD>)
  235. <ceed-ck> ::= ceed(ioChordEntryEdit)
  236. <ched-ck> ::= ched(DMChordEdit)
  237. <cheh-ck> ::= cheh(i<ioChordEntry>)
  238. <ncrd-ck> ::= ncrd(<ioNextChord>)
  239. <ncsq-ck> ::= ncsq(<wNextChordSize:WORD> <ioNextChord>...)
  240. <spsh-ck> ::= spsh(<ioSignPost>)
  241. ///
  242. // Signpost tracks
  243. #define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK mmioFOURCC( 's', 'g', 'n', 'p' )
  244. struct ioDMSignPost
  245. {
  246. MUSIC_TIME m_mtTime;
  247. DWORD m_dwChords;
  248. WORD m_wMeasure;
  249. };
  250. ///*
  251. // <sgnp-list>
  252. 'sgnp'
  253. (
  254. //sizeof ioDMSignPost, followed by a number of <ioDMSignPost>
  255. )
  256. ///
  257. // Personality tracks
  258. #define DMUS_FOURCC_PERF_TRACK_LIST mmioFOURCC('p', 'f', 't', 'r')
  259. #define DMUS_FOURCC_PERF_REF_LIST mmioFOURCC('p', 'f', 'r', 'f')
  260. #define DMUS_FOURCC_TIME_STAMP_CHUNK mmioFOURCC('s', 't', 'm', 'p')
  261. ///*
  262. // <pftr-list>
  263. LIST('pftr'
  264. (
  265. // some number of <pfrf-list>
  266. )
  267. // <pfrf-list>
  268. LIST('pfrf'
  269. (
  270. <stmp-ck>
  271. <DMRF>
  272. )
  273. // <stmp-ck>
  274. 'stmp'
  275. (
  276. // time:DWORD
  277. )
  278. ///
  279. */
  280. #endif