Counter Strike : Global Offensive Source Code
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.

280 lines
16 KiB

  1. /************************************************************************
  2. * *
  3. * dmplugin.h -- This module contains the API for plugins for the *
  4. * DirectMusic performance layer *
  5. * *
  6. * Copyright (c) Microsoft Corporation. All rights reserved. *
  7. * *
  8. ************************************************************************/
  9. #ifndef _DMPLUGIN_
  10. #define _DMPLUGIN_
  11. #include <windows.h>
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #include <mmsystem.h>
  15. #include <dmusici.h>
  16. #include <pshpack8.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. interface IDirectMusicTrack;
  21. interface IDirectMusicTool;
  22. interface IDirectMusicTool8;
  23. interface IDirectMusicTrack8;
  24. interface IDirectMusicPerformance;
  25. interface IDirectMusicPerformance8;
  26. interface IDirectMusicSegment;
  27. interface IDirectMusicSegment8;
  28. interface IDirectMusicSegmentState;
  29. interface IDirectMusicSegmentState8;
  30. interface IDirectMusicGraph;
  31. #ifndef __cplusplus
  32. typedef interface IDirectMusicTrack IDirectMusicTrack;
  33. typedef interface IDirectMusicTool IDirectMusicTool;
  34. typedef interface IDirectMusicTool8 IDirectMusicTool8;
  35. typedef interface IDirectMusicTrack8 IDirectMusicTrack8;
  36. typedef interface IDirectMusicPerformance IDirectMusicPerformance;
  37. typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8;
  38. typedef interface IDirectMusicSegment IDirectMusicSegment;
  39. typedef interface IDirectMusicSegment8 IDirectMusicSegment8;
  40. typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
  41. typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8;
  42. typedef interface IDirectMusicGraph IDirectMusicGraph;
  43. #endif
  44. typedef struct _DMUS_PMSG DMUS_PMSG;
  45. typedef long MUSIC_TIME;
  46. /* Registry location for tools */
  47. #define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools"
  48. /*////////////////////////////////////////////////////////////////////
  49. // IDirectMusicTool */
  50. #undef INTERFACE
  51. #define INTERFACE IDirectMusicTool
  52. DECLARE_INTERFACE_(IDirectMusicTool, IUnknown)
  53. {
  54. /* IUnknown */
  55. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  56. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  57. STDMETHOD_(ULONG,Release) (THIS) PURE;
  58. /* IDirectMusicTool */
  59. STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE;
  60. STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE;
  61. STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
  62. STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes,
  63. DWORD dwNumElements) PURE;
  64. STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf,
  65. DMUS_PMSG* pPMSG) PURE;
  66. STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf,
  67. DMUS_PMSG* pPMSG,
  68. REFERENCE_TIME rtTime) PURE;
  69. };
  70. /*////////////////////////////////////////////////////////////////////
  71. // IDirectMusicTool8 */
  72. #undef INTERFACE
  73. #define INTERFACE IDirectMusicTool8
  74. DECLARE_INTERFACE_(IDirectMusicTool8, IDirectMusicTool)
  75. {
  76. /* IUnknown */
  77. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  78. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  79. STDMETHOD_(ULONG,Release) (THIS) PURE;
  80. /* IDirectMusicTool */
  81. STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE;
  82. STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE;
  83. STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
  84. STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes,
  85. DWORD dwNumElements) PURE;
  86. STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf,
  87. DMUS_PMSG* pPMSG) PURE;
  88. STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf,
  89. DMUS_PMSG* pPMSG,
  90. REFERENCE_TIME rtTime) PURE;
  91. /* IDirectMusicTool8 */
  92. STDMETHOD(Clone) (THIS_ IDirectMusicTool ** ppTool) PURE;
  93. };
  94. /* The following flags are sent in the IDirectMusicTrack::Play() method */
  95. /* inside the dwFlags parameter */
  96. typedef enum enumDMUS_TRACKF_FLAGS
  97. {
  98. DMUS_TRACKF_SEEK = 1, /* set on a seek */
  99. DMUS_TRACKF_LOOP = 2, /* set on a loop (repeat) */
  100. DMUS_TRACKF_START = 4, /* set on first call to Play */
  101. DMUS_TRACKF_FLUSH = 8, /* set when this call is in response to a flush on the perfomance */
  102. DMUS_TRACKF_DIRTY = 0x10, /* set when the track should consider any cached values from a previous call to GetParam to be invalidated */
  103. /* The following flags are DX8 only. */
  104. DMUS_TRACKF_NOTIFY_OFF = 0x20, /* tells track not to send notifications. */
  105. DMUS_TRACKF_PLAY_OFF = 0x40, /* tells track not to play anything (but can still send notifications.) */
  106. DMUS_TRACKF_LOOPEND = 0x80, /* set when the end of range is also a loop end. */
  107. DMUS_TRACKF_STOP = 0x100, /* set when the end of range is also end of playing this segment. */
  108. DMUS_TRACKF_RECOMPOSE = 0x200, /* set to indicate the track should compose. */
  109. DMUS_TRACKF_CLOCK = 0x400, /* set when time parameters are in reference (clock) time. Only valid for PlayEx(). */
  110. } DMUS_TRACKF_FLAGS;
  111. /* The following flags are sent in the IDirectMusicTrack8::GetParamEx() and SetParamEx() methods */
  112. /* inside the dwFlags parameter */
  113. #define DMUS_TRACK_PARAMF_CLOCK 0x01 /* set when the time is measured is in reference (clock) time */
  114. /*////////////////////////////////////////////////////////////////////
  115. // IDirectMusicTrack */
  116. #undef INTERFACE
  117. #define INTERFACE IDirectMusicTrack
  118. DECLARE_INTERFACE_(IDirectMusicTrack, IUnknown)
  119. {
  120. /* IUnknown */
  121. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  122. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  123. STDMETHOD_(ULONG,Release) (THIS) PURE;
  124. /* IDirectMusicTrack */
  125. STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE;
  126. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState,
  127. IDirectMusicPerformance* pPerformance,
  128. void** ppStateData,
  129. DWORD dwVirtualTrackID,
  130. DWORD dwFlags) PURE;
  131. STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE;
  132. STDMETHOD(Play) (THIS_ void* pStateData,
  133. MUSIC_TIME mtStart,
  134. MUSIC_TIME mtEnd,
  135. MUSIC_TIME mtOffset,
  136. DWORD dwFlags,
  137. IDirectMusicPerformance* pPerf,
  138. IDirectMusicSegmentState* pSegSt,
  139. DWORD dwVirtualID) PURE;
  140. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  141. MUSIC_TIME mtTime,
  142. MUSIC_TIME* pmtNext,
  143. void* pParam) PURE;
  144. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  145. MUSIC_TIME mtTime,
  146. void* pParam) PURE;
  147. STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE;
  148. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  149. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  150. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  151. MUSIC_TIME mtEnd,
  152. IDirectMusicTrack** ppTrack) PURE;
  153. };
  154. /*////////////////////////////////////////////////////////////////////
  155. // IDirectMusicTrack8 */
  156. #undef INTERFACE
  157. #define INTERFACE IDirectMusicTrack8
  158. DECLARE_INTERFACE_(IDirectMusicTrack8, IDirectMusicTrack)
  159. {
  160. /* IUnknown */
  161. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  162. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  163. STDMETHOD_(ULONG,Release) (THIS) PURE;
  164. /* IDirectMusicTrack */
  165. STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE;
  166. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState,
  167. IDirectMusicPerformance* pPerformance,
  168. void** ppStateData,
  169. DWORD dwVirtualTrackID,
  170. DWORD dwFlags) PURE;
  171. STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE;
  172. STDMETHOD(Play) (THIS_ void* pStateData,
  173. MUSIC_TIME mtStart,
  174. MUSIC_TIME mtEnd,
  175. MUSIC_TIME mtOffset,
  176. DWORD dwFlags,
  177. IDirectMusicPerformance* pPerf,
  178. IDirectMusicSegmentState* pSegSt,
  179. DWORD dwVirtualID) PURE;
  180. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  181. MUSIC_TIME mtTime,
  182. MUSIC_TIME* pmtNext,
  183. void* pParam) PURE;
  184. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  185. MUSIC_TIME mtTime,
  186. void* pParam) PURE;
  187. STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE;
  188. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  189. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  190. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  191. MUSIC_TIME mtEnd,
  192. IDirectMusicTrack** ppTrack) PURE;
  193. /* IDirectMusicTrack8 */
  194. STDMETHOD(PlayEx) (THIS_ void* pStateData,
  195. REFERENCE_TIME rtStart,
  196. REFERENCE_TIME rtEnd,
  197. REFERENCE_TIME rtOffset,
  198. DWORD dwFlags,
  199. IDirectMusicPerformance* pPerf,
  200. IDirectMusicSegmentState* pSegSt,
  201. DWORD dwVirtualID) PURE;
  202. STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* Command type. */
  203. REFERENCE_TIME rtTime, /* Time, in ref time if dwFlags == DMUS_TRACK_PARAMF_CLOCK. Otherwise, music time. */
  204. REFERENCE_TIME* prtNext, /* Time of next parameter, relative to rtTime, in music or clock time units. */
  205. void* pParam, /* Pointer to the parameter data. */
  206. void * pStateData, /* State data for track instance. */
  207. DWORD dwFlags) PURE; /* Control flags. */
  208. STDMETHOD(SetParamEx) (THIS_ REFGUID rguidType,
  209. REFERENCE_TIME rtTime,
  210. void* pParam, /* Pointer to the parameter data. */
  211. void * pStateData, /* State data for track instance. */
  212. DWORD dwFlags) PURE; /* Control flags. */
  213. STDMETHOD(Compose) (THIS_ IUnknown* pContext, /* Context for composition */
  214. DWORD dwTrackGroup,
  215. IDirectMusicTrack** ppResultTrack) PURE;
  216. STDMETHOD(Join) (THIS_ IDirectMusicTrack* pNewTrack,
  217. MUSIC_TIME mtJoin,
  218. IUnknown* pContext, /* Context for joining */
  219. DWORD dwTrackGroup,
  220. IDirectMusicTrack** ppResultTrack) PURE;
  221. };
  222. /* CLSID's */
  223. DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  224. DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  225. DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  226. DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  227. DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  228. DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  229. DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  230. DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  231. DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  232. DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  233. DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  234. DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  235. /* New CLSID's for DX8 */
  236. DEFINE_GUID(CLSID_DirectMusicScriptTrack,0x4108fa85, 0x3586, 0x11d3, 0x8b, 0xd7, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4108FA85-3586-11d3-8BD7-00600893B1B6} */
  237. DEFINE_GUID(CLSID_DirectMusicMarkerTrack,0x55a8fd00, 0x4288, 0x11d3, 0x9b, 0xd1, 0x8a, 0xd, 0x61, 0xc8, 0x88, 0x35);
  238. DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack, 0xbae4d665, 0x4ea1, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {BAE4D665-4EA1-11d3-8BDA-00600893B1B6} */
  239. DEFINE_GUID(CLSID_DirectMusicLyricsTrack, 0x995c1cf5, 0x54ff, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {995C1CF5-54FF-11d3-8BDA-00600893B1B6} */
  240. DEFINE_GUID(CLSID_DirectMusicParamControlTrack, 0x4be0537b, 0x5c19, 0x11d3, 0x8b, 0xdc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4BE0537B-5C19-11d3-8BDC-00600893B1B6} */
  241. DEFINE_GUID(CLSID_DirectMusicWaveTrack,0xeed36461, 0x9ea5, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  242. /* IID's */
  243. DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  244. DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  245. /* Interface IDs for DX8 */
  246. /* changed interfaces (GUID only) */
  247. DEFINE_GUID(IID_IDirectMusicTool8, 0xe674303, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36);
  248. DEFINE_GUID(IID_IDirectMusicTrack8, 0xe674304, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36);
  249. #ifdef __cplusplus
  250. }; /* extern "C" */
  251. #endif
  252. #include <poppack.h>
  253. #endif /* #ifndef _DMPLUGIN_ */