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.

385 lines
16 KiB

  1. #ifndef _TOOLS_H_
  2. #define _TOOLS_H_
  3. #include <windows.h>
  4. #define COM_NO_WINDOWS_H
  5. #include <objbase.h>
  6. #include <pshpack8.h>
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /* Time unit types. This is used by various tools to define the format for units of time. */
  11. #define DMUS_TIME_UNIT_MS 0 /* Milliseconds. */
  12. #define DMUS_TIME_UNIT_MTIME 1 /* Music Time. */
  13. #define DMUS_TIME_UNIT_GRID 2 /* Grid size in current time signature. */
  14. #define DMUS_TIME_UNIT_BEAT 3 /* Beat size in current time signature. */
  15. #define DMUS_TIME_UNIT_BAR 4 /* Measure size in current time signature. */
  16. #define DMUS_TIME_UNIT_64T 5 /* 64th note triplet. */
  17. #define DMUS_TIME_UNIT_64 6 /* 64th note. */
  18. #define DMUS_TIME_UNIT_32T 7 /* 32nd note triplet. */
  19. #define DMUS_TIME_UNIT_32 8 /* 32nd note. */
  20. #define DMUS_TIME_UNIT_16T 9 /* 16th note triplet. */
  21. #define DMUS_TIME_UNIT_16 10 /* 16th note. */
  22. #define DMUS_TIME_UNIT_8T 11 /* 8th note tripplet. */
  23. #define DMUS_TIME_UNIT_8 12 /* 8th note. */
  24. #define DMUS_TIME_UNIT_4T 13 /* Quarter note triplet. */
  25. #define DMUS_TIME_UNIT_4 14 /* Quarter note. */
  26. #define DMUS_TIME_UNIT_2T 15 /* Half note triplet. */
  27. #define DMUS_TIME_UNIT_2 16 /* Half note. */
  28. #define DMUS_TIME_UNIT_1T 17 /* Whole note triplet. */
  29. #define DMUS_TIME_UNIT_1 18 /* Whole note. */
  30. #define DMUS_TIME_UNIT_COUNT 19 /* Number of time unit types. */
  31. interface IDirectMusicEchoTool;
  32. #ifndef __cplusplus
  33. typedef interface IDirectMusicEchoTool IDirectMusicEchoTool;
  34. #endif
  35. #undef INTERFACE
  36. #define INTERFACE IDirectMusicEchoTool
  37. DECLARE_INTERFACE_(IDirectMusicEchoTool, IUnknown)
  38. {
  39. /* IUnknown */
  40. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  41. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  42. STDMETHOD_(ULONG,Release) (THIS) PURE;
  43. /* IDirectMusicEchoTool */
  44. STDMETHOD(SetRepeat) (THIS_ DWORD dwRepeat) PURE;
  45. STDMETHOD(SetDecay) (THIS_ DWORD dwDecay) PURE;
  46. STDMETHOD(SetTimeUnit) (THIS_ DWORD dwTimeUnit) PURE;
  47. STDMETHOD(SetDelay) (THIS_ DWORD dwDelay) PURE;
  48. STDMETHOD(SetGroupOffset) (THIS_ DWORD dwGroupOffset) PURE;
  49. STDMETHOD(SetType) (THIS_ DWORD dwType) PURE;
  50. STDMETHOD(GetRepeat) (THIS_ DWORD * pdwRepeat) PURE;
  51. STDMETHOD(GetDecay) (THIS_ DWORD * pdwDecay) PURE;
  52. STDMETHOD(GetTimeUnit) (THIS_ DWORD * pdwTimeUnit) PURE;
  53. STDMETHOD(GetDelay) (THIS_ DWORD * pdwDelay) PURE;
  54. STDMETHOD(GetGroupOffset) (THIS_ DWORD * pdwGroupOffset) PURE;
  55. STDMETHOD(GetType) (THIS_ DWORD * pdwType) PURE;
  56. };
  57. /* IMediaParams parameter control */
  58. #define DMUS_ECHO_REPEAT 0 /* How many times to repeat. */
  59. #define DMUS_ECHO_DECAY 1 /* Decay, in decibels, between repeats. */
  60. #define DMUS_ECHO_TIMEUNIT 2 /* Time unit used for converting the delay into music time. */
  61. #define DMUS_ECHO_DELAY 3 /* Duration of time between echoes, in music time. */
  62. #define DMUS_ECHO_GROUPOFFSET 4 /* Offset to add to PChannel in multiples of 16 for routing each echo to a separate output Pchannel. */
  63. #define DMUS_ECHO_TYPE 5 /* Type of echo. (See DMUS_ECHOT_ values.) */
  64. #define DMUS_ECHO_PARAMCOUNT 6 /* Number of parameters (above.) */
  65. /* Echo types. */
  66. #define DMUS_ECHOT_FALLING 0 /* Regular echo, decreases in velocity with each one. */
  67. #define DMUS_ECHOT_FALLING_CLIP 1 /* Regular echo, truncate notes lengths to just under decay time. */
  68. #define DMUS_ECHOT_RISING 2 /* Echo starts quiet, increases to full velocity. */
  69. #define DMUS_ECHOT_RISING_CLIP 3 /* Rising echo, truncate the lengths. */
  70. #define FOURCC_ECHO_CHUNK mmioFOURCC('e','c','h','o')
  71. typedef struct _DMUS_IO_ECHO_HEADER
  72. {
  73. DWORD dwRepeat; /* How many times to repeat. */
  74. DWORD dwDecay; /* Decay, in decibels, between repeats. */
  75. DWORD dwTimeUnit; /* Time format used for dwDelay. */
  76. DWORD dwDelay; /* Duration of time between echoes, in units defined by dwTimeUnit. */
  77. DWORD dwGroupOffset; /* Offset to add to PChannel for routing each echo. */
  78. DWORD dwType; /* Type of echo. (See DMUS_ECHOT_ values.) */
  79. } DMUS_IO_ECHO_HEADER;
  80. interface IDirectMusicTransposeTool;
  81. #ifndef __cplusplus
  82. typedef interface IDirectMusicTransposeTool IDirectMusicTransposeTool;
  83. #endif
  84. #undef INTERFACE
  85. #define INTERFACE IDirectMusicTransposeTool
  86. DECLARE_INTERFACE_(IDirectMusicTransposeTool, IUnknown)
  87. {
  88. /* IUnknown */
  89. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  90. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  91. STDMETHOD_(ULONG,Release) (THIS) PURE;
  92. /* IDirectMusicTransposeTool */
  93. STDMETHOD(SetTranspose) (THIS_ long lTranspose) PURE;
  94. STDMETHOD(SetType) (THIS_ DWORD dwType) PURE;
  95. STDMETHOD(GetTranspose) (THIS_ long * plTranspose) PURE;
  96. STDMETHOD(GetType) (THIS_ DWORD * pdwType) PURE;
  97. };
  98. /* IMediaParams parameter control */
  99. #define DMUS_TRANSPOSE_AMOUNT 0 /* How far up or down to transpose. */
  100. #define DMUS_TRANSPOSE_TYPE 1 /* Transpose style (linear vs in scale.) */
  101. #define DMUS_TRANSPOSE_PARAMCOUNT 2 /* Number of parameters (above.) */
  102. /* Transposition types. */
  103. #define DMUS_TRANSPOSET_LINEAR 0 /* Transpose in linear increments. */
  104. #define DMUS_TRANSPOSET_SCALE 1 /* Transpose in scale. */
  105. #define FOURCC_TRANSPOSE_CHUNK mmioFOURCC('t','r','a','n')
  106. typedef struct _DMUS_IO_TRANSPOSE_HEADER
  107. {
  108. long lTranspose; /* Transpose amount. */
  109. DWORD dwType; /* Type of echo. (See DMUS_ECHOT_ values.) */
  110. } DMUS_IO_TRANSPOSE_HEADER;
  111. interface IDirectMusicDurationTool;
  112. #ifndef __cplusplus
  113. typedef interface IDirectMusicDurationTool IDirectMusicDurationTool;
  114. #endif
  115. #undef INTERFACE
  116. #define INTERFACE IDirectMusicDurationTool
  117. DECLARE_INTERFACE_(IDirectMusicDurationTool, IUnknown)
  118. {
  119. /* IUnknown */
  120. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  121. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  122. STDMETHOD_(ULONG,Release) (THIS) PURE;
  123. /* IDirectMusicDurationTool */
  124. STDMETHOD(SetScale) (THIS_ float flScale) PURE;
  125. STDMETHOD(GetScale) (THIS_ float * pflScale) PURE;
  126. };
  127. /* IMediaParams parameter control */
  128. #define DMUS_DURATION_SCALE 0 /* Duration multiplier. */
  129. #define DMUS_DURATION_PARAMCOUNT 1 /* Number of parameters (above.) */
  130. #define FOURCC_DURATION_CHUNK mmioFOURCC('d','u','r','a')
  131. typedef struct _DMUS_IO_DURATION_HEADER
  132. {
  133. float flScale; /* Duration multiplier. */
  134. } DMUS_IO_DURATION_HEADER;
  135. interface IDirectMusicQuantizeTool;
  136. #ifndef __cplusplus
  137. typedef interface IDirectMusicQuantizeTool IDirectMusicQuantizeTool;
  138. #endif
  139. #undef INTERFACE
  140. #define INTERFACE IDirectMusicQuantizeTool
  141. DECLARE_INTERFACE_(IDirectMusicQuantizeTool, IUnknown)
  142. {
  143. /* IUnknown */
  144. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  145. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  146. STDMETHOD_(ULONG,Release) (THIS) PURE;
  147. /* IDirectMusicQuantizeTool */
  148. STDMETHOD(SetStrength) (THIS_ DWORD dwStrength) PURE;
  149. STDMETHOD(SetTimeUnit) (THIS_ DWORD dwTimeUnit) PURE;
  150. STDMETHOD(SetResolution) (THIS_ DWORD dwResolution) PURE;
  151. STDMETHOD(SetType) (THIS_ DWORD dwType) PURE;
  152. STDMETHOD(GetStrength) (THIS_ DWORD * pdwStrength) PURE;
  153. STDMETHOD(GetTimeUnit) (THIS_ DWORD * pdwTimeUnit) PURE;
  154. STDMETHOD(GetResolution) (THIS_ DWORD * pdwResolution) PURE;
  155. STDMETHOD(GetType) (THIS_ DWORD * pdwType) PURE;
  156. };
  157. /* IMediaParams parameter control */
  158. #define DMUS_QUANTIZE_STRENGTH 0 /* Strength of quantization (0 to 1.) */
  159. #define DMUS_QUANTIZE_TIMEUNIT 1 /* Unit of time used to calculate resolution. */
  160. #define DMUS_QUANTIZE_RESOLUTION 2 /* Quantization resolution in time format defined by dwTimeUnit. */
  161. #define DMUS_QUANTIZE_TYPE 3 /* Flags for quantize start and/or duration. */
  162. #define DMUS_QUANTIZE_PARAMCOUNT 4 /* Number of parameters (above.) */
  163. /* Quantize types. */
  164. #define DMUS_QUANTIZET_START 0 /* Quantize just start time. */
  165. #define DMUS_QUANTIZET_LENGTH 1 /* Quantize just duration. */
  166. #define DMUS_QUANTIZET_ALL 2 /* Quantize start and duration. */
  167. #define FOURCC_QUANTIZE_CHUNK mmioFOURCC('q','u','n','t')
  168. typedef struct _DMUS_IO_QUANTIZE_HEADER
  169. {
  170. DWORD dwStrength; /* Quantize multiplier. */
  171. DWORD dwTimeUnit; /* Unit of time used to calculate resolution. */
  172. DWORD dwResolution; /* Quantization resolution in time format defined by dwTimeUnit. */
  173. DWORD dwType; /* Flags for quantize start and/or duration. */
  174. } DMUS_IO_QUANTIZE_HEADER;
  175. interface IDirectMusicTimeShiftTool;
  176. #ifndef __cplusplus
  177. typedef interface IDirectMusicTimeShiftTool IDirectMusicTimeShiftTool;
  178. #endif
  179. #undef INTERFACE
  180. #define INTERFACE IDirectMusicTimeShiftTool
  181. DECLARE_INTERFACE_(IDirectMusicTimeShiftTool, IUnknown)
  182. {
  183. /* IUnknown */
  184. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  185. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  186. STDMETHOD_(ULONG,Release) (THIS) PURE;
  187. /* IDirectMusicTimeShiftTool */
  188. STDMETHOD(SetTimeUnit) (THIS_ DWORD dwTimeUnit) PURE;
  189. STDMETHOD(SetRange) (THIS_ DWORD dwRange) PURE;
  190. STDMETHOD(SetOffset) (THIS_ long lOffset) PURE;
  191. STDMETHOD(GetTimeUnit) (THIS_ DWORD * pdwTimeUnit) PURE;
  192. STDMETHOD(GetRange) (THIS_ DWORD * pdwRange) PURE;
  193. STDMETHOD(GetOffset) (THIS_ long * plOffset) PURE;
  194. };
  195. /* IMediaParams parameter control */
  196. #define DMUS_TIMESHIFT_TIMEUNIT 0 /* Units for time offset and random range */
  197. #define DMUS_TIMESHIFT_RANGE 1 /* Range for random time offset */
  198. #define DMUS_TIMESHIFT_OFFSET 2 /* Straight offset to add to the note's time. */
  199. #define DMUS_TIMESHIFT_PARAMCOUNT 3 /* Number of parameters (above.) */
  200. #define FOURCC_TIMESHIFT_CHUNK mmioFOURCC('t','i','m','s')
  201. typedef struct _DMUS_IO_TIMESHIFT_HEADER
  202. {
  203. DWORD dwTimeUnit; /* Unit of time used to calculate resolution. */
  204. DWORD dwRange; /* Range for random time offset */
  205. long lOffset; /* Straight offset to add to the note's time. */
  206. } DMUS_IO_TIMESHIFT_HEADER;
  207. interface IDirectMusicSwingTool;
  208. #ifndef __cplusplus
  209. typedef interface IDirectMusicSwingTool IDirectMusicSwingTool;
  210. #endif
  211. #undef INTERFACE
  212. #define INTERFACE IDirectMusicSwingTool
  213. DECLARE_INTERFACE_(IDirectMusicSwingTool, IUnknown)
  214. {
  215. /* IUnknown */
  216. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  217. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  218. STDMETHOD_(ULONG,Release) (THIS) PURE;
  219. /* IDirectMusicSwingTool */
  220. STDMETHOD(SetStrength) (THIS_ DWORD dwStrength) PURE;
  221. STDMETHOD(GetStrength) (THIS_ DWORD * pdwStrength) PURE;
  222. };
  223. /* IMediaParams parameter control */
  224. #define DMUS_SWING_STRENGTH 0 /* Strength of swing (0 to 100%) */
  225. #define DMUS_SWING_PARAMCOUNT 1 /* Number of parameters (above.) */
  226. #define FOURCC_SWING_CHUNK mmioFOURCC('q','u','n','t')
  227. typedef struct _DMUS_IO_SWING_HEADER
  228. {
  229. DWORD dwStrength; /* Swing multiplier. */
  230. } DMUS_IO_SWING_HEADER;
  231. interface IDirectMusicVelocityTool;
  232. #ifndef __cplusplus
  233. typedef interface IDirectMusicVelocityTool IIDirectMusicVelocityTool;
  234. #endif
  235. #undef INTERFACE
  236. #define INTERFACE IDirectMusicVelocityTool
  237. DECLARE_INTERFACE_(IDirectMusicVelocityTool, IUnknown)
  238. {
  239. /* IUnknown */
  240. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  241. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  242. STDMETHOD_(ULONG,Release) (THIS) PURE;
  243. /* IDirectMusicVelocityTool */
  244. STDMETHOD(SetStrength) (THIS_ long lStrength) PURE;
  245. STDMETHOD(SetLowLimit) (THIS_ long lVelocityOut) PURE;
  246. STDMETHOD(SetHighLimit) (THIS_ long lVelocityOut) PURE;
  247. STDMETHOD(SetCurveStart) (THIS_ long lVelocityIn) PURE;
  248. STDMETHOD(SetCurveEnd) (THIS_ long lVelocityIn) PURE;
  249. STDMETHOD(GetStrength) (THIS_ long * plStrength) PURE;
  250. STDMETHOD(GetLowLimit) (THIS_ long * plVelocityOut) PURE;
  251. STDMETHOD(GetHighLimit) (THIS_ long * plVelocityOut) PURE;
  252. STDMETHOD(GetCurveStart) (THIS_ long * plVelocityIn) PURE;
  253. STDMETHOD(GetCurveEnd) (THIS_ long * plVelocityIn) PURE;
  254. };
  255. /* IMediaParams parameter control */
  256. #define DMUS_VELOCITY_STRENGTH 0 /* Strength of velocity modifier (0 to 100%) */
  257. #define DMUS_VELOCITY_LOWLIMIT 1 /* Minimum value for output velocity */
  258. #define DMUS_VELOCITY_HIGHLIMIT 2 /* Maximum value for output velocity */
  259. #define DMUS_VELOCITY_CURVESTART 3 /* Velocity curve starts at low limit and this input velocity */
  260. #define DMUS_VELOCITY_CURVEEND 4 /* Velocity curve ends at this input velocity and high limit */
  261. #define DMUS_VELOCITY_PARAMCOUNT 5 /* Number of parameters (above.) */
  262. #define FOURCC_VELOCITY_CHUNK mmioFOURCC('v','e','l','o')
  263. typedef struct _DMUS_IO_VELOCITY_HEADER
  264. {
  265. long lStrength; /* Strength of transformation. */
  266. long lLowLimit; /* Minimum value for output velocity */
  267. long lHighLimit; /* Maximum value for output velocity */
  268. long lCurveStart; /* Velocity curve starts at low limit and this input velocity */
  269. long lCurveEnd; /* Velocity curve ends at this input velocity and high limit */
  270. } DMUS_IO_VELOCITY_HEADER;
  271. /* Class IDs for tools. */
  272. DEFINE_GUID(CLSID_DirectMusicEchoTool, 0x64e49fa4, 0xbacf, 0x11d2, 0x87, 0x2c, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  273. DEFINE_GUID(CLSID_DirectMusicTransposeTool, 0xbb8d0702, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  274. DEFINE_GUID(CLSID_DirectMusicSwingTool, 0xbb8d0703, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  275. DEFINE_GUID(CLSID_DirectMusicQuantizeTool, 0xbb8d0704, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  276. DEFINE_GUID(CLSID_DirectMusicVelocityTool, 0xbb8d0705, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  277. DEFINE_GUID(CLSID_DirectMusicDurationTool, 0xbb8d0706, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  278. DEFINE_GUID(CLSID_DirectMusicTimeShiftTool, 0xbb8d0707, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  279. DEFINE_GUID(CLSID_DirectMusicMuteTool, 0xbb8d0708, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  280. DEFINE_GUID(CLSID_DirectMusicChordSequenceTool, 0xbb8d0709, 0x9c43, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  281. /* Interface IDs for tools. */
  282. DEFINE_GUID(IID_IDirectMusicEchoTool, 0x81f60d22, 0x9d10, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  283. DEFINE_GUID(IID_IDirectMusicTransposeTool,0x173803f4, 0x4fd5, 0x4ba1, 0x9e, 0x50, 0xdd, 0x5f, 0x56, 0x69, 0xd2, 0x25);
  284. DEFINE_GUID(IID_IDirectMusicDurationTool,0xc6897cfb, 0x9a43, 0x420f, 0xb6, 0xdb, 0xdd, 0x32, 0xc1, 0x82, 0xe8, 0x33);
  285. DEFINE_GUID(IID_IDirectMusicQuantizeTool,0x652e5667, 0x210d, 0x4d06, 0x83, 0x2a, 0xbc, 0x17, 0x92, 0x7e, 0x51, 0x42);
  286. DEFINE_GUID(IID_IDirectMusicTimeShiftTool,0xc39abaf0, 0xc4f0, 0x4c6b, 0x83, 0x4a, 0xcf, 0x21, 0x7c, 0xbe, 0x95, 0x6d);
  287. DEFINE_GUID(IID_IDirectMusicSwingTool,0xd876ffee, 0x3a6f, 0x43db, 0xa3, 0x5c, 0x68, 0x7b, 0x38, 0x6a, 0x71, 0x65);
  288. DEFINE_GUID(IID_IDirectMusicVelocityTool,0xb15eb722, 0xfb50, 0x4e1f, 0xb2, 0x1, 0xa6, 0x99, 0xe0, 0x47, 0x79, 0x54);
  289. DEFINE_GUID(IID_IDirectMusicMuteTool,0x20cc9511, 0x5802, 0x49a0, 0xba, 0x91, 0x8b, 0x29, 0xb0, 0xf7, 0x22, 0xab);
  290. DEFINE_GUID(IID_IDirectMusicChordSequenceTool,0xc32c1b34, 0xe604, 0x48c1, 0xba, 0x8c, 0x7b, 0x50, 0x10, 0x17, 0xbd, 0x68);
  291. #ifdef __cplusplus
  292. }; /* extern "C" */
  293. #endif
  294. #include <poppack.h>
  295. #endif // _TOOLS_H_