PageRenderTime 54ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/common/dx9/include/dmusici.h

https://bitbucket.org/ayufan/ayuine2b
C Header | 1883 lines | 1397 code | 198 blank | 288 comment | 0 complexity | b047a014fb70ce92d3cb2f6787283126 MD5 | raw file
  1. /************************************************************************
  2. * *
  3. * dmusici.h -- This module contains the API for the *
  4. * DirectMusic performance layer *
  5. * *
  6. * Copyright (c) Microsoft Corporation. All rights reserved. *
  7. * *
  8. ************************************************************************/
  9. #ifndef _DMUSICI_
  10. #define _DMUSICI_
  11. #include <windows.h>
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #include <mmsystem.h>
  15. #include <dmusicc.h>
  16. /* plugin (track and tool) interfaces. This #include will eventually go away. */
  17. #include <dmplugin.h>
  18. #include <pshpack8.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. typedef WORD TRANSITION_TYPE;
  23. typedef __int64 REFERENCE_TIME;
  24. typedef long MUSIC_TIME;
  25. #define MT_MIN 0x80000000 /* Minimum music time value. */
  26. #define MT_MAX 0x7FFFFFFF /* Maximum music time value. */
  27. #define DMUS_PPQ 768 /* parts per quarter note */
  28. interface IDirectMusicTrack;
  29. interface IDirectMusicPerformance;
  30. interface IDirectMusicPerformance8;
  31. interface IDirectMusicTool;
  32. interface IDirectMusicSegment;
  33. interface IDirectMusicSegment8;
  34. interface IDirectMusicSegmentState;
  35. interface IDirectMusicSegmentState8;
  36. interface IDirectMusicGraph;
  37. interface IDirectMusicBuffer;
  38. interface IDirectMusicInstrument;
  39. interface IDirectMusicDownloadedInstrument;
  40. interface IDirectMusicBand;
  41. interface IDirectMusicChordMap;
  42. interface IDirectMusicLoader;
  43. interface IDirectMusicLoader8;
  44. interface IDirectMusicScript;
  45. interface IDirectMusicObject;
  46. interface IDirectMusicStyle8;
  47. interface IDirectMusicPatternTrack;
  48. interface IDirectMusicContainer;
  49. interface IDirectMusicTool8;
  50. interface IDirectMusicTrack8;
  51. interface IDirectMusicAudioPath;
  52. #ifndef __cplusplus
  53. typedef interface IDirectMusicTrack IDirectMusicTrack;
  54. typedef interface IDirectMusicPerformance IDirectMusicPerformance;
  55. typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8;
  56. typedef interface IDirectMusicTool IDirectMusicTool;
  57. typedef interface IDirectMusicSegment IDirectMusicSegment;
  58. typedef interface IDirectMusicSegment8 IDirectMusicSegment8;
  59. typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
  60. typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8;
  61. typedef interface IDirectMusicGraph IDirectMusicGraph;
  62. typedef interface IDirectMusicBuffer IDirectMusicBuffer;
  63. typedef interface IDirectMusicInstrument IDirectMusicInstrument;
  64. typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
  65. typedef interface IDirectMusicBand IDirectMusicBand;
  66. typedef interface IDirectMusicChordMap IDirectMusicChordMap;
  67. typedef interface IDirectMusicObject IDirectMusicObject;
  68. typedef interface IDirectMusicLoader IDirectMusicLoader;
  69. typedef interface IDirectMusicLoader8 IDirectMusicLoader8;
  70. typedef interface IDirectMusicScript IDirectMusicScript;
  71. typedef interface IDirectMusicStyle8 IDirectMusicStyle8;
  72. typedef interface IDirectMusicPatternTrack IDirectMusicPatternTrack;
  73. typedef interface IDirectMusicContainer IDirectMusicContainer;
  74. typedef interface IDirectMusicTool8 IDirectMusicTool8;
  75. typedef interface IDirectMusicTrack8 IDirectMusicTrack8;
  76. typedef interface IDirectMusicAudioPath IDirectMusicAudioPath;
  77. #endif
  78. typedef enum enumDMUS_STYLET_TYPES
  79. {
  80. DMUS_STYLET_PATTERN = 0,
  81. DMUS_STYLET_MOTIF = 1,
  82. } DMUS_STYLET_TYPES;
  83. typedef enum enumDMUS_COMMANDT_TYPES
  84. {
  85. DMUS_COMMANDT_GROOVE = 0,
  86. DMUS_COMMANDT_FILL = 1,
  87. DMUS_COMMANDT_INTRO = 2,
  88. DMUS_COMMANDT_BREAK = 3,
  89. DMUS_COMMANDT_END = 4,
  90. DMUS_COMMANDT_ENDANDINTRO = 5
  91. } DMUS_COMMANDT_TYPES;
  92. typedef enum enumDMUS_SHAPET_TYPES
  93. {
  94. DMUS_SHAPET_FALLING = 0,
  95. DMUS_SHAPET_LEVEL = 1,
  96. DMUS_SHAPET_LOOPABLE = 2,
  97. DMUS_SHAPET_LOUD = 3,
  98. DMUS_SHAPET_QUIET = 4,
  99. DMUS_SHAPET_PEAKING = 5,
  100. DMUS_SHAPET_RANDOM = 6,
  101. DMUS_SHAPET_RISING = 7,
  102. DMUS_SHAPET_SONG = 8
  103. } DMUS_SHAPET_TYPES;
  104. typedef enum enumDMUS_COMPOSEF_FLAGS
  105. {
  106. DMUS_COMPOSEF_NONE = 0,
  107. DMUS_COMPOSEF_ALIGN = 0x1,
  108. DMUS_COMPOSEF_OVERLAP = 0x2,
  109. DMUS_COMPOSEF_IMMEDIATE = 0x4,
  110. DMUS_COMPOSEF_GRID = 0x8,
  111. DMUS_COMPOSEF_BEAT = 0x10,
  112. DMUS_COMPOSEF_MEASURE = 0x20,
  113. DMUS_COMPOSEF_AFTERPREPARETIME = 0x40,
  114. DMUS_COMPOSEF_VALID_START_BEAT = 0x80, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any beat. */
  115. DMUS_COMPOSEF_VALID_START_GRID = 0x100, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any grid. */
  116. DMUS_COMPOSEF_VALID_START_TICK = 0x200, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur any time. */
  117. DMUS_COMPOSEF_SEGMENTEND = 0x400, /* Play the transition at the end of the current segment. */
  118. DMUS_COMPOSEF_MARKER = 0x800, /* Play the transition at the next marker in the current segment. */
  119. DMUS_COMPOSEF_MODULATE = 0x1000,
  120. DMUS_COMPOSEF_LONG = 0x2000,
  121. DMUS_COMPOSEF_ENTIRE_TRANSITION = 0x4000, /* play the entire transition pattern */
  122. DMUS_COMPOSEF_1BAR_TRANSITION = 0x8000, /* play one bar of the transition pattern */
  123. DMUS_COMPOSEF_ENTIRE_ADDITION = 0x10000, /* play the additional pattern in its entirety */
  124. DMUS_COMPOSEF_1BAR_ADDITION = 0x20000, /* play one bar of the additional pattern */
  125. DMUS_COMPOSEF_VALID_START_MEASURE = 0x40000, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any bar. */
  126. DMUS_COMPOSEF_DEFAULT = 0x80000, /* Use segment's default boundary */
  127. DMUS_COMPOSEF_NOINVALIDATE = 0x100000, /* Play without invalidating the currently playing segment(s) */
  128. DMUS_COMPOSEF_USE_AUDIOPATH = 0x200000, /* Uses the audio paths that are embedded in the segments */
  129. DMUS_COMPOSEF_INVALIDATE_PRI = 0x400000 /* Invalidate only the current primary seg state */
  130. } DMUS_COMPOSEF_FLAGS;
  131. #define DMUS_PMSG_PART \
  132. DWORD dwSize; \
  133. REFERENCE_TIME rtTime; /* real time (in 100 nanosecond increments) */ \
  134. MUSIC_TIME mtTime; /* music time */ \
  135. DWORD dwFlags; /* various bits (see DMUS_PMSGF_FLAGS enumeration) */ \
  136. DWORD dwPChannel; /* Performance Channel. The Performance can */ \
  137. /* use this to determine the port/channel. */ \
  138. DWORD dwVirtualTrackID; /* virtual track ID */ \
  139. IDirectMusicTool* pTool; /* tool interface pointer */ \
  140. IDirectMusicGraph* pGraph; /* tool graph interface pointer */ \
  141. DWORD dwType; /* PMSG type (see DMUS_PMSGT_TYPES defines) */ \
  142. DWORD dwVoiceID; /* unique voice id which allows synthesizers to */ \
  143. /* identify a specific event. For DirectX 6.0, */ \
  144. /* this field should always be 0. */ \
  145. DWORD dwGroupID; /* Track group id */ \
  146. IUnknown* punkUser; /* user com pointer, auto released upon PMSG free */
  147. /* every DMUS_PMSG is based off of this structure. The Performance needs
  148. to access these members consistently in every PMSG that goes through it. */
  149. typedef struct _DMUS_PMSG
  150. {
  151. /* begin DMUS_PMSG_PART */
  152. DMUS_PMSG_PART
  153. /* end DMUS_PMSG_PART */
  154. } DMUS_PMSG;
  155. #define DMUS_PCHANNEL_BROADCAST_PERFORMANCE 0xFFFFFFFF /* PMsg is sent on all PChannels of the performance. */
  156. #define DMUS_PCHANNEL_BROADCAST_AUDIOPATH 0xFFFFFFFE /* PMsg is sent on all PChannels of the audio path. */
  157. #define DMUS_PCHANNEL_BROADCAST_SEGMENT 0xFFFFFFFD /* PMsg is sent on all PChannels of the segment. */
  158. #define DMUS_PCHANNEL_BROADCAST_GROUPS 0xFFFFFFFC /* A duplicate PMsg is for each Channels Groups in the performance. */
  159. /* The DMUS_PATH constants are used in conjunction with GetObjectInPath to find a requested
  160. interface at a particular stage in the audio path.
  161. */
  162. #define DMUS_PATH_SEGMENT 0x1000 /* Get the segment itself (from a segment state.) */
  163. #define DMUS_PATH_SEGMENT_TRACK 0x1100 /* Look in Track List of Segment. */
  164. #define DMUS_PATH_SEGMENT_GRAPH 0x1200 /* Get the segment's tool graph. */
  165. #define DMUS_PATH_SEGMENT_TOOL 0x1300 /* Look in Tool Graph of Segment. */
  166. #define DMUS_PATH_AUDIOPATH 0x2000 /* Get the audiopath itself (from a segment state.) */
  167. #define DMUS_PATH_AUDIOPATH_GRAPH 0x2200 /* Get the audiopath's tool graph. */
  168. #define DMUS_PATH_AUDIOPATH_TOOL 0x2300 /* Look in Tool Graph of Audio Path. */
  169. #define DMUS_PATH_PERFORMANCE 0x3000 /* Access the performance. */
  170. #define DMUS_PATH_PERFORMANCE_GRAPH 0x3200 /* Get the performance's tool graph. */
  171. #define DMUS_PATH_PERFORMANCE_TOOL 0x3300 /* Look in Tool Graph of Performance. */
  172. #define DMUS_PATH_PORT 0x4000 /* Access the synth. */
  173. #define DMUS_PATH_BUFFER 0x6000 /* Look in DirectSoundBuffer. */
  174. #define DMUS_PATH_BUFFER_DMO 0x6100 /* Access a DMO in the buffer. */
  175. #define DMUS_PATH_MIXIN_BUFFER 0x7000 /* Look in a global mixin buffer. */
  176. #define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100 /* Access a DMO in a global mixin buffer. */
  177. #define DMUS_PATH_PRIMARY_BUFFER 0x8000 /* Access the primary buffer. */
  178. /* To ignore PChannels when calling GetObjectInPath(), use the DMUS_PCHANNEL_ALL constant. */
  179. #define DMUS_PCHANNEL_ALL 0xFFFFFFFB
  180. /* The DMUS_APATH types are used in conjunction with CreateStandardAudioPath to
  181. build default path types. _SHARED_ means the same buffer is shared across multiple
  182. instantiations of the audiopath type. _DYNAMIC_ means a unique buffer is created
  183. every time.
  184. */
  185. #define DMUS_APATH_SHARED_STEREOPLUSREVERB 1 /* A standard music set up with stereo outs and reverb. */
  186. #define DMUS_APATH_DYNAMIC_3D 6 /* An audio path with one dynamic bus from the synth feeding to a dynamic 3d buffer. Does not send to env reverb. */
  187. #define DMUS_APATH_DYNAMIC_MONO 7 /* An audio path with one dynamic bus from the synth feeding to a dynamic mono buffer. */
  188. #define DMUS_APATH_DYNAMIC_STEREO 8 /* An audio path with two dynamic buses from the synth feeding to a dynamic stereo buffer. */
  189. typedef struct _DMUS_AUDIOPARAMS
  190. {
  191. DWORD dwSize; /* Size of this structure. */
  192. BOOL fInitNow; /* If true, the sink and synth are created immediately and results returned in this structure. */
  193. DWORD dwValidData; /* Flags indicating which fields below are valid. */
  194. DWORD dwFeatures; /* Required DMUS_AUDIOF features. */
  195. DWORD dwVoices; /* Required number of voices. */
  196. DWORD dwSampleRate; /* Sample rate of synths and sink. */
  197. CLSID clsidDefaultSynth; /* Class ID of default synthesizer. */
  198. } DMUS_AUDIOPARAMS;
  199. /* dwFeatures flags. These indicate which features are required for the audio environment. */
  200. #define DMUS_AUDIOF_3D 0x1 /* Require 3D buffers. */
  201. #define DMUS_AUDIOF_ENVIRON 0x2 /* Require environmental modeling. */
  202. #define DMUS_AUDIOF_EAX 0x4 /* Require use of EAX effects. */
  203. #define DMUS_AUDIOF_DMOS 0x8 /* Require use of additional DMOs. */
  204. #define DMUS_AUDIOF_STREAMING 0x10 /* Require support for streaming waves. */
  205. #define DMUS_AUDIOF_BUFFERS 0x20 /* Require support for multiple buffers (all above cases need this.) */
  206. #define DMUS_AUDIOF_ALL 0x3F /* Requires everything. */
  207. /* dwValidData flags. These indicate which fields in DMUS_AUDIOPARAMS have been filled in. If fInitNow is set, these also return what was allocated. */
  208. #define DMUS_AUDIOPARAMS_FEATURES 0x00000001
  209. #define DMUS_AUDIOPARAMS_VOICES 0x00000002
  210. #define DMUS_AUDIOPARAMS_SAMPLERATE 0x00000004
  211. #define DMUS_AUDIOPARAMS_DEFAULTSYNTH 0x00000008
  212. /* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */
  213. typedef enum enumDMUS_PMSGF_FLAGS
  214. {
  215. DMUS_PMSGF_REFTIME = 1, /* if rtTime is valid */
  216. DMUS_PMSGF_MUSICTIME = 2, /* if mtTime is valid */
  217. DMUS_PMSGF_TOOL_IMMEDIATE = 4, /* if PMSG should be processed immediately */
  218. DMUS_PMSGF_TOOL_QUEUE = 8, /* if PMSG should be processed a little early, at Queue time */
  219. DMUS_PMSGF_TOOL_ATTIME = 0x10, /* if PMSG should be processed at the time stamp */
  220. DMUS_PMSGF_TOOL_FLUSH = 0x20, /* if PMSG is being flushed */
  221. DMUS_PMSGF_LOCKTOREFTIME = 0x40, /* if rtTime can not be overriden by a tempo change. */
  222. DMUS_PMSGF_DX8 = 0x80 /* if the message has DX8 or later extensions. */
  223. /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */
  224. /* DMUS_PMSG's dwFlags member. */
  225. } DMUS_PMSGF_FLAGS;
  226. /* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */
  227. typedef enum enumDMUS_PMSGT_TYPES
  228. {
  229. DMUS_PMSGT_MIDI = 0, /* MIDI short message */
  230. DMUS_PMSGT_NOTE = 1, /* Interactive Music Note */
  231. DMUS_PMSGT_SYSEX = 2, /* MIDI long message (system exclusive message) */
  232. DMUS_PMSGT_NOTIFICATION = 3, /* Notification message */
  233. DMUS_PMSGT_TEMPO = 4, /* Tempo message */
  234. DMUS_PMSGT_CURVE = 5, /* Control change / pitch bend, etc. curve */
  235. DMUS_PMSGT_TIMESIG = 6, /* Time signature */
  236. DMUS_PMSGT_PATCH = 7, /* Patch changes */
  237. DMUS_PMSGT_TRANSPOSE = 8, /* Transposition messages */
  238. DMUS_PMSGT_CHANNEL_PRIORITY = 9, /* Channel priority */
  239. DMUS_PMSGT_STOP = 10, /* Stop message */
  240. DMUS_PMSGT_DIRTY = 11, /* Tells Tools that cache GetParam() info to refresh */
  241. DMUS_PMSGT_WAVE = 12, /* Carries control information for playing a wave. */
  242. DMUS_PMSGT_LYRIC = 13, /* Lyric message from lyric track. */
  243. DMUS_PMSGT_SCRIPTLYRIC = 14, /* Lyric message sent by a script with the Trace function. */
  244. DMUS_PMSGT_USER = 255 /* User message */
  245. } DMUS_PMSGT_TYPES;
  246. /* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */
  247. typedef enum enumDMUS_SEGF_FLAGS
  248. {
  249. DMUS_SEGF_REFTIME = 1<<6, /* 0x40 Time parameter is in reference time */
  250. DMUS_SEGF_SECONDARY = 1<<7, /* 0x80 Secondary segment */
  251. DMUS_SEGF_QUEUE = 1<<8, /* 0x100 Queue at the end of the primary segment queue (primary only) */
  252. DMUS_SEGF_CONTROL = 1<<9, /* 0x200 Play as a control track (secondary segments only) */
  253. DMUS_SEGF_AFTERPREPARETIME = 1<<10, /* 0x400 Play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */
  254. DMUS_SEGF_GRID = 1<<11, /* 0x800 Play on grid boundary */
  255. DMUS_SEGF_BEAT = 1<<12, /* 0x1000 Play on beat boundary */
  256. DMUS_SEGF_MEASURE = 1<<13, /* 0x2000 Play on measure boundary */
  257. DMUS_SEGF_DEFAULT = 1<<14, /* 0x4000 Use segment's default boundary */
  258. DMUS_SEGF_NOINVALIDATE = 1<<15, /* 0x8000 Play without invalidating the currently playing segment(s) */
  259. DMUS_SEGF_ALIGN = 1<<16, /* 0x10000 Align segment with requested boundary, but switch at first valid point */
  260. DMUS_SEGF_VALID_START_BEAT = 1<<17, /* 0x20000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any beat. */
  261. DMUS_SEGF_VALID_START_GRID = 1<<18, /* 0x40000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any grid. */
  262. DMUS_SEGF_VALID_START_TICK = 1<<19, /* 0x80000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur any time. */
  263. DMUS_SEGF_AUTOTRANSITION = 1<<20, /* 0x100000 Compose and play a transition segment, using the transition template. */
  264. DMUS_SEGF_AFTERQUEUETIME = 1<<21, /* 0x200000 Make sure to play after the queue time. This is default for primary segments */
  265. DMUS_SEGF_AFTERLATENCYTIME = 1<<22, /* 0x400000 Make sure to play after the latency time. This is true for all segments, so this is a nop */
  266. DMUS_SEGF_SEGMENTEND = 1<<23, /* 0x800000 Play at the next end of segment. */
  267. DMUS_SEGF_MARKER = 1<<24, /* 0x1000000 Play at next marker in the primary segment. If there are no markers, default to any other resolution requests. */
  268. DMUS_SEGF_TIMESIG_ALWAYS = 1<<25, /* 0x2000000 Even if there is no primary segment, align start time with current time signature. */
  269. DMUS_SEGF_USE_AUDIOPATH = 1<<26, /* 0x4000000 Uses the audio path that is embedded in the segment. */
  270. DMUS_SEGF_VALID_START_MEASURE = 1<<27, /* 0x8000000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any bar. */
  271. DMUS_SEGF_INVALIDATE_PRI = 1<<28 /* 0x10000000 invalidate only the current primary seg state */
  272. } DMUS_SEGF_FLAGS;
  273. #define DMUS_SEG_REPEAT_INFINITE 0xFFFFFFFF /* For IDirectMusicSegment::SetRepeat*/
  274. #define DMUS_SEG_ALLTRACKS 0x80000000 /* For IDirectMusicSegment::SetParam() and SetTrackConfig() - selects all tracks instead on nth index. */
  275. #define DMUS_SEG_ANYTRACK 0x80000000 /* For IDirectMusicSegment::GetParam() - checks each track until it finds one that returns data (not DMUS_E_NOT_FOUND.) */
  276. /* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */
  277. /* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */
  278. /* are intentionally the same */
  279. typedef enum enumDMUS_TIME_RESOLVE_FLAGS
  280. {
  281. DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME,
  282. DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME,
  283. DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME,
  284. DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID,
  285. DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT,
  286. DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE,
  287. DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER,
  288. DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND,
  289. } DMUS_TIME_RESOLVE_FLAGS;
  290. /* The following flags are sent inside the DMUS_CHORD_KEY.dwFlags parameter */
  291. typedef enum enumDMUS_CHORDKEYF_FLAGS
  292. {
  293. DMUS_CHORDKEYF_SILENT = 1, /* is the chord silent? */
  294. } DMUS_CHORDKEYF_FLAGS;
  295. #define DMUS_MAXSUBCHORD 8
  296. typedef struct _DMUS_SUBCHORD
  297. {
  298. DWORD dwChordPattern; /* Notes in the subchord */
  299. DWORD dwScalePattern; /* Notes in the scale */
  300. DWORD dwInversionPoints; /* Where inversions can occur */
  301. DWORD dwLevels; /* Which levels are supported by this subchord */
  302. BYTE bChordRoot; /* Root of the subchord */
  303. BYTE bScaleRoot; /* Root of the scale */
  304. } DMUS_SUBCHORD;
  305. typedef struct _DMUS_CHORD_KEY
  306. {
  307. WCHAR wszName[16]; /* Name of the chord */
  308. WORD wMeasure; /* Measure this falls on */
  309. BYTE bBeat; /* Beat this falls on */
  310. BYTE bSubChordCount; /* Number of chords in the list of subchords */
  311. DMUS_SUBCHORD SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */
  312. DWORD dwScale; /* Scale underlying the entire chord */
  313. BYTE bKey; /* Key underlying the entire chord */
  314. BYTE bFlags; /* Miscelaneous flags */
  315. } DMUS_CHORD_KEY;
  316. /* DMUS_NOTE_PMSG */
  317. typedef struct _DMUS_NOTE_PMSG
  318. {
  319. /* begin DMUS_PMSG_PART */
  320. DMUS_PMSG_PART
  321. /* end DMUS_PMSG_PART */
  322. MUSIC_TIME mtDuration; /* duration */
  323. WORD wMusicValue; /* Description of note in chord and key. */
  324. WORD wMeasure; /* Measure in which this note occurs */
  325. short nOffset; /* Offset from grid at which this note occurs */
  326. BYTE bBeat; /* Beat (in measure) at which this note occurs */
  327. BYTE bGrid; /* Grid offset from beat at which this note occurs */
  328. BYTE bVelocity; /* Note velocity */
  329. BYTE bFlags; /* see DMUS_NOTEF_FLAGS */
  330. BYTE bTimeRange; /* Range to randomize time. */
  331. BYTE bDurRange; /* Range to randomize duration. */
  332. BYTE bVelRange; /* Range to randomize velocity. */
  333. BYTE bPlayModeFlags; /* Play mode */
  334. BYTE bSubChordLevel; /* Which subchord level this note uses. */
  335. BYTE bMidiValue; /* The MIDI note value, converted from wMusicValue */
  336. char cTranspose; /* Transposition to add to midi note value after converted from wMusicValue. */
  337. } DMUS_NOTE_PMSG;
  338. typedef enum enumDMUS_NOTEF_FLAGS
  339. {
  340. DMUS_NOTEF_NOTEON = 1, /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */
  341. /* DX8 flags: */
  342. DMUS_NOTEF_NOINVALIDATE = 2, /* Don't invalidate this note off. */
  343. DMUS_NOTEF_NOINVALIDATE_INSCALE = 4,/* Don't invalidate if still within the scale. */
  344. DMUS_NOTEF_NOINVALIDATE_INCHORD = 8,/* Don't invalidate if still within the chord. */
  345. DMUS_NOTEF_REGENERATE = 0x10, /* Regenerate the note on an invalidate. */
  346. } DMUS_NOTEF_FLAGS;
  347. /* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
  348. into the appropriate bMidiValue.
  349. */
  350. typedef enum enumDMUS_PLAYMODE_FLAGS
  351. {
  352. DMUS_PLAYMODE_KEY_ROOT = 1, /* Transpose on top of the key root. */
  353. DMUS_PLAYMODE_CHORD_ROOT = 2, /* Transpose on top of the chord root. */
  354. DMUS_PLAYMODE_SCALE_INTERVALS = 4, /* Use scale intervals from scale pattern. */
  355. DMUS_PLAYMODE_CHORD_INTERVALS = 8, /* Use chord intervals from chord pattern. */
  356. DMUS_PLAYMODE_NONE = 16, /* No mode. Indicates the parent part's mode should be used. */
  357. } DMUS_PLAYMODE_FLAGS;
  358. /* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
  359. in various ways:
  360. */
  361. /* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
  362. notes that should not be transposed by the chord or scale.
  363. */
  364. #define DMUS_PLAYMODE_FIXED 0
  365. /* In fixed to key, the musicvalue is again a fixed MIDI value, but it
  366. is transposed on top of the key root.
  367. */
  368. #define DMUS_PLAYMODE_FIXEDTOKEY DMUS_PLAYMODE_KEY_ROOT
  369. /* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
  370. is transposed on top of the chord root.
  371. */
  372. #define DMUS_PLAYMODE_FIXEDTOCHORD DMUS_PLAYMODE_CHORD_ROOT
  373. /* In Pedalpoint, the key root is used and the notes only track the intervals in
  374. the scale. The chord root and intervals are completely ignored. This is useful
  375. for melodic lines that play relative to the key root.
  376. */
  377. #define DMUS_PLAYMODE_PEDALPOINT (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  378. /* In the Melodic mode, the chord root is used but the notes only track the intervals in
  379. the scale. The key root and chord intervals are completely ignored. This is useful
  380. for melodic lines that play relative to the chord root.
  381. */
  382. #define DMUS_PLAYMODE_MELODIC (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  383. /* Normal chord mode is the prevalent playback mode.
  384. The notes track the intervals in the chord, which is based on the chord root.
  385. If there is a scale component to the MusicValue, the additional intervals
  386. are pulled from the scale and added.
  387. If the chord does not have an interval to match the chord component of
  388. the MusicValue, the note is silent.
  389. */
  390. #define DMUS_PLAYMODE_NORMALCHORD (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  391. /* If it is desirable to play a note that is above the top of the chord, the
  392. always play mode (known as "purpleized" in a former life) finds a position
  393. for the note by using intervals from the scale. Essentially, this mode is
  394. a combination of the Normal and Melodic playback modes, where a failure
  395. in Normal causes a second try in Melodic mode.
  396. */
  397. #define DMUS_PLAYMODE_ALWAYSPLAY (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
  398. /* These playmodes are new for dx8. */
  399. /* In PedalpointChord, the key root is used and the notes only track the intervals in
  400. the chord. The chord root and scale intervals are completely ignored. This is useful
  401. for chordal lines that play relative to the key root.
  402. */
  403. #define DMUS_PLAYMODE_PEDALPOINTCHORD (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  404. /* For completeness, here's a mode that tries for pedalpointchord, but if it fails
  405. uses scale intervals
  406. */
  407. #define DMUS_PLAYMODE_PEDALPOINTALWAYS (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD)
  408. /* Legacy names for modes... */
  409. #define DMUS_PLAYMODE_PURPLEIZED DMUS_PLAYMODE_ALWAYSPLAY
  410. #define DMUS_PLAYMODE_SCALE_ROOT DMUS_PLAYMODE_KEY_ROOT
  411. #define DMUS_PLAYMODE_FIXEDTOSCALE DMUS_PLAYMODE_FIXEDTOKEY
  412. /* DMUS_MIDI_PMSG */
  413. typedef struct _DMUS_MIDI_PMSG
  414. {
  415. /* begin DMUS_PMSG_PART */
  416. DMUS_PMSG_PART
  417. /* end DMUS_PMSG_PART */
  418. BYTE bStatus;
  419. BYTE bByte1;
  420. BYTE bByte2;
  421. BYTE bPad[1];
  422. } DMUS_MIDI_PMSG;
  423. /* DMUS_PATCH_PMSG */
  424. typedef struct _DMUS_PATCH_PMSG
  425. {
  426. /* begin DMUS_PMSG_PART */
  427. DMUS_PMSG_PART
  428. /* end DMUS_PMSG_PART */
  429. BYTE byInstrument;
  430. BYTE byMSB;
  431. BYTE byLSB;
  432. BYTE byPad[1];
  433. } DMUS_PATCH_PMSG;
  434. /* DMUS_TRANSPOSE_PMSG */
  435. typedef struct _DMUS_TRANSPOSE_PMSG
  436. {
  437. /* begin DMUS_PMSG_PART */
  438. DMUS_PMSG_PART
  439. /* end DMUS_PMSG_PART */
  440. short nTranspose;
  441. /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
  442. WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
  443. } DMUS_TRANSPOSE_PMSG;
  444. /* DMUS_CHANNEL_PRIORITY_PMSG */
  445. typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
  446. {
  447. /* begin DMUS_PMSG_PART */
  448. DMUS_PMSG_PART
  449. /* end DMUS_PMSG_PART */
  450. DWORD dwChannelPriority;
  451. } DMUS_CHANNEL_PRIORITY_PMSG;
  452. /* DMUS_TEMPO_PMSG */
  453. typedef struct _DMUS_TEMPO_PMSG
  454. {
  455. /* begin DMUS_PMSG_PART */
  456. DMUS_PMSG_PART
  457. /* end DMUS_PMSG_PART */
  458. double dblTempo; /* the tempo */
  459. } DMUS_TEMPO_PMSG;
  460. #define DMUS_TEMPO_MAX 1000
  461. #define DMUS_TEMPO_MIN 1
  462. #define DMUS_MASTERTEMPO_MAX 100.0f
  463. #define DMUS_MASTERTEMPO_MIN 0.01f
  464. /* DMUS_SYSEX_PMSG */
  465. typedef struct _DMUS_SYSEX_PMSG
  466. {
  467. /* begin DMUS_PMSG_PART */
  468. DMUS_PMSG_PART
  469. /* end DMUS_PMSG_PART */
  470. DWORD dwLen; /* length of the data */
  471. BYTE abData[1]; /* array of data, length equal to dwLen */
  472. } DMUS_SYSEX_PMSG;
  473. /* DMUS_CURVE_PMSG */
  474. typedef struct _DMUS_CURVE_PMSG
  475. {
  476. /* begin DMUS_PMSG_PART */
  477. DMUS_PMSG_PART
  478. /* end DMUS_PMSG_PART */
  479. MUSIC_TIME mtDuration; /* how long this curve lasts */
  480. MUSIC_TIME mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */
  481. MUSIC_TIME mtResetDuration; /* how long after the curve is finished to allow a flush or
  482. invalidation to reset to the reset value, nResetValue */
  483. short nStartValue; /* curve's start value */
  484. short nEndValue; /* curve's end value */
  485. short nResetValue; /* curve's reset value, set when a flush or invalidation
  486. occurs within mtDuration + mtResetDuration */
  487. WORD wMeasure; /* Measure in which this curve occurs */
  488. short nOffset; /* Offset from grid at which this curve occurs */
  489. BYTE bBeat; /* Beat (in measure) at which this curve occurs */
  490. BYTE bGrid; /* Grid offset from beat at which this curve occurs */
  491. BYTE bType; /* type of curve */
  492. BYTE bCurveShape; /* shape of curve */
  493. BYTE bCCData; /* CC# if this is a control change type */
  494. BYTE bFlags; /* Curve reset and start from current value flags. */
  495. /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
  496. WORD wParamType; /* RPN or NRPN parameter number. */
  497. WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
  498. } DMUS_CURVE_PMSG;
  499. typedef enum enumDMUS_CURVE_FLAGS
  500. {
  501. DMUS_CURVE_RESET = 1, /* When set, the nResetValue must be sent when the
  502. time is reached or an invalidate occurs because
  503. of a transition. If not set, the curve stays
  504. permanently stuck at the new value. */
  505. DMUS_CURVE_START_FROM_CURRENT = 2/* Ignore Start, start the curve at the current value.
  506. This only works for volume, expression, and pitchbend. */
  507. } DMUS_CURVE_FLAGS;
  508. #define DMUS_CURVE_RESET 1
  509. /* Curve shapes */
  510. enum
  511. {
  512. DMUS_CURVES_LINEAR = 0,
  513. DMUS_CURVES_INSTANT = 1,
  514. DMUS_CURVES_EXP = 2,
  515. DMUS_CURVES_LOG = 3,
  516. DMUS_CURVES_SINE = 4
  517. };
  518. /* curve types */
  519. #define DMUS_CURVET_PBCURVE 0x03 /* Pitch bend curve. */
  520. #define DMUS_CURVET_CCCURVE 0x04 /* Control change curve. */
  521. #define DMUS_CURVET_MATCURVE 0x05 /* Mono aftertouch curve. */
  522. #define DMUS_CURVET_PATCURVE 0x06 /* Poly aftertouch curve. */
  523. #define DMUS_CURVET_RPNCURVE 0x07 /* RPN curve with curve type in wParamType. */
  524. #define DMUS_CURVET_NRPNCURVE 0x08 /* NRPN curve with curve type in wParamType. */
  525. /* DMUS_TIMESIG_PMSG */
  526. typedef struct _DMUS_TIMESIG_PMSG
  527. {
  528. /* begin DMUS_PMSG_PART */
  529. DMUS_PMSG_PART
  530. /* end DMUS_PMSG_PART */
  531. /* Time signatures define how many beats per measure, which note receives */
  532. /* the beat, and the grid resolution. */
  533. BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
  534. BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
  535. /* we can assume that 0 means 256th note */
  536. WORD wGridsPerBeat; /* grids per beat */
  537. } DMUS_TIMESIG_PMSG;
  538. /* notification type values */
  539. /* The following correspond to GUID_NOTIFICATION_SEGMENT */
  540. #define DMUS_NOTIFICATION_SEGSTART 0
  541. #define DMUS_NOTIFICATION_SEGEND 1
  542. #define DMUS_NOTIFICATION_SEGALMOSTEND 2
  543. #define DMUS_NOTIFICATION_SEGLOOP 3
  544. #define DMUS_NOTIFICATION_SEGABORT 4
  545. /* The following correspond to GUID_NOTIFICATION_PERFORMANCE */
  546. #define DMUS_NOTIFICATION_MUSICSTARTED 0
  547. #define DMUS_NOTIFICATION_MUSICSTOPPED 1
  548. #define DMUS_NOTIFICATION_MUSICALMOSTEND 2
  549. /* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */
  550. #define DMUS_NOTIFICATION_MEASUREBEAT 0
  551. /* The following corresponds to GUID_NOTIFICATION_CHORD */
  552. #define DMUS_NOTIFICATION_CHORD 0
  553. /* The following correspond to GUID_NOTIFICATION_COMMAND */
  554. #define DMUS_NOTIFICATION_GROOVE 0
  555. #define DMUS_NOTIFICATION_EMBELLISHMENT 1
  556. /* The following corresponds to GUID_NOTIFICATION_RECOMPOSE */
  557. #define DMUS_NOTIFICATION_RECOMPOSE 0
  558. /* DMUS_NOTIFICATION_PMSG */
  559. typedef struct _DMUS_NOTIFICATION_PMSG
  560. {
  561. /* begin DMUS_PMSG_PART */
  562. DMUS_PMSG_PART
  563. /* end DMUS_PMSG_PART */
  564. GUID guidNotificationType;
  565. DWORD dwNotificationOption;
  566. DWORD dwField1;
  567. DWORD dwField2;
  568. } DMUS_NOTIFICATION_PMSG;
  569. /* DMUS_WAVE_PMSG */
  570. typedef struct _DMUS_WAVE_PMSG
  571. {
  572. /* begin DMUS_PMSG_PART */
  573. DMUS_PMSG_PART
  574. /* end DMUS_PMSG_PART */
  575. REFERENCE_TIME rtStartOffset; /* How far into the wave to start, in reference time units only. */
  576. REFERENCE_TIME rtDuration; /* Duration of the wave, in either reference time or music time. */
  577. long lOffset; /* Offset from actual time to logical time, in music or ref time. */
  578. long lVolume; /* Initial volume, in 100ths of a dB. */
  579. long lPitch; /* Initial pitch, in 100ths of a semitone. */
  580. BYTE bFlags; /* Flags, including DMUS_WAVEF_OFF... */
  581. } DMUS_WAVE_PMSG;
  582. #define DMUS_WAVEF_OFF 1 /* If wave is playing and this is the off message. */
  583. #define DMUS_WAVEF_STREAMING 2 /* If wave is streaming. */
  584. #define DMUS_WAVEF_NOINVALIDATE 4 /* Don't invalidate this wave. */
  585. #define DMUS_WAVEF_NOPREROLL 8 /* Don't preroll any wave data. */
  586. #define DMUS_WAVEF_IGNORELOOPS 0x20 /* Ignore segment looping. */
  587. /* DMUS_LYRIC_PMSG */
  588. typedef struct _DMUS_LYRIC_PMSG
  589. {
  590. /* begin DMUS_PMSG_PART */
  591. DMUS_PMSG_PART
  592. /* end DMUS_PMSG_PART */
  593. WCHAR wszString[1]; /* null-terminated Unicode lyric string (structure is actually larger than size 1) */
  594. } DMUS_LYRIC_PMSG;
  595. #define DMUS_MAX_NAME 64 /* Maximum object name length. */
  596. #define DMUS_MAX_CATEGORY 64 /* Maximum object category name length. */
  597. #define DMUS_MAX_FILENAME MAX_PATH
  598. typedef struct _DMUS_VERSION {
  599. DWORD dwVersionMS;
  600. DWORD dwVersionLS;
  601. }DMUS_VERSION, FAR *LPDMUS_VERSION;
  602. /* Time Signature structure, used by IDirectMusicStyle */
  603. /* Also used as a parameter for GetParam() and SetParam */
  604. typedef struct _DMUS_TIMESIGNATURE
  605. {
  606. MUSIC_TIME mtTime;
  607. BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
  608. BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
  609. /* we can assume that 0 means 256th note */
  610. WORD wGridsPerBeat; /* grids per beat */
  611. } DMUS_TIMESIGNATURE;
  612. typedef struct _DMUS_VALID_START_PARAM
  613. {
  614. MUSIC_TIME mtTime; /* Time of the first legal start
  615. point after (or including) the requested time.
  616. This is a returned value.
  617. Time format is the relative offset from requested time. */
  618. } DMUS_VALID_START_PARAM;
  619. typedef struct _DMUS_PLAY_MARKER_PARAM
  620. {
  621. MUSIC_TIME mtTime; /* Time of the first legal segment play
  622. marker before (or including) the requested time.
  623. This is a returned value.
  624. Time format is the relative offset from requested time. */
  625. } DMUS_PLAY_MARKER_PARAM;
  626. /* The DMUSOBJECTDESC structure is used to communicate everything you could */
  627. /* possibly use to describe a DirectMusic object. */
  628. typedef struct _DMUS_OBJECTDESC
  629. {
  630. DWORD dwSize; /* Size of this structure. */
  631. DWORD dwValidData; /* Flags indicating which fields below are valid. */
  632. GUID guidObject; /* Unique ID for this object. */
  633. GUID guidClass; /* GUID for the class of object. */
  634. FILETIME ftDate; /* Last edited date of object. */
  635. DMUS_VERSION vVersion; /* Version. */
  636. WCHAR wszName[DMUS_MAX_NAME]; /* Name of object. */
  637. WCHAR wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */
  638. WCHAR wszFileName[DMUS_MAX_FILENAME]; /* File path. */
  639. LONGLONG llMemLength; /* Size of Memory data. */
  640. LPBYTE pbMemData; /* Memory pointer for data. */
  641. IStream * pStream; /* Stream with data. */
  642. } DMUS_OBJECTDESC;
  643. typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC;
  644. /* Flags for dwValidData. When set, a flag indicates that the */
  645. /* corresponding field in DMUSOBJECTDESC holds valid data. */
  646. #define DMUS_OBJ_OBJECT (1 << 0) /* Object GUID is valid. */
  647. #define DMUS_OBJ_CLASS (1 << 1) /* Class GUID is valid. */
  648. #define DMUS_OBJ_NAME (1 << 2) /* Name is valid. */
  649. #define DMUS_OBJ_CATEGORY (1 << 3) /* Category is valid. */
  650. #define DMUS_OBJ_FILENAME (1 << 4) /* File path is valid. */
  651. #define DMUS_OBJ_FULLPATH (1 << 5) /* Path is full path. */
  652. #define DMUS_OBJ_URL (1 << 6) /* Path is URL. */
  653. #define DMUS_OBJ_VERSION (1 << 7) /* Version is valid. */
  654. #define DMUS_OBJ_DATE (1 << 8) /* Date is valid. */
  655. #define DMUS_OBJ_LOADED (1 << 9) /* Object is currently loaded in memory. */
  656. #define DMUS_OBJ_MEMORY (1 << 10) /* Object is pointed to by pbMemData. */
  657. #define DMUS_OBJ_STREAM (1 << 11) /* Object is stored in pStream. */
  658. /* The DMUS_SCRIPT_ERRORINFO structure describes an error that occurred in a script.
  659. It is returned by methods in IDirectMusicScript. */
  660. typedef struct _DMUS_SCRIPT_ERRORINFO
  661. {
  662. DWORD dwSize; /* Size of this structure. */
  663. HRESULT hr;
  664. ULONG ulLineNumber;
  665. LONG ichCharPosition;
  666. WCHAR wszSourceFile[DMUS_MAX_FILENAME];
  667. WCHAR wszSourceComponent[DMUS_MAX_FILENAME];
  668. WCHAR wszDescription[DMUS_MAX_FILENAME];
  669. WCHAR wszSourceLineText[DMUS_MAX_FILENAME];
  670. } DMUS_SCRIPT_ERRORINFO;
  671. /* Track configuration flags, used with IDirectMusicSegment8::SetTrackConfig() */
  672. #define DMUS_TRACKCONFIG_OVERRIDE_ALL 1 /* This track should get parameters from this segment before controlling and primary tracks. */
  673. #define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY 2 /* This track should get parameters from this segment before the primary segment tracks. */
  674. #define DMUS_TRACKCONFIG_FALLBACK 4 /* This track should get parameters from this segment if the primary and controlling segments don't succeed. */
  675. #define DMUS_TRACKCONFIG_CONTROL_ENABLED 8 /* GetParam() enabled for this track. */
  676. #define DMUS_TRACKCONFIG_PLAY_ENABLED 0x10 /* Play() enabled for this track. */
  677. #define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED 0x20 /* Notifications enabled for this track. */
  678. #define DMUS_TRACKCONFIG_PLAY_CLOCKTIME 0x40 /* This track plays in clock time, not music time. */
  679. #define DMUS_TRACKCONFIG_PLAY_COMPOSE 0x80 /* This track should regenerate data each time it starts playing. */
  680. #define DMUS_TRACKCONFIG_LOOP_COMPOSE 0x100 /* This track should regenerate data each time it repeats. */
  681. #define DMUS_TRACKCONFIG_COMPOSING 0x200 /* This track is used to compose other tracks. */
  682. #define DMUS_TRACKCONFIG_CONTROL_PLAY 0x10000 /* This track, when played in a controlling segment, overrides playback of primary segment tracks. */
  683. #define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION 0x20000 /* This track, when played in a controlling segment, overrides notification of primary segment tracks. */
  684. /* Additional track config flags for composing transitions */
  685. #define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART 0x400 /* Get track info from start of From segment */
  686. #define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT 0x800 /* Get track info from current place in From segment */
  687. #define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART 0x1000 /* Get track info from start of To segment */
  688. #define DMUS_TRACKCONFIG_DEFAULT (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED)
  689. /* Get/SetParam structs for commands */
  690. /* PARAM structures, used by GetParam() and SetParam() */
  691. typedef struct _DMUS_COMMAND_PARAM
  692. {
  693. BYTE bCommand;
  694. BYTE bGrooveLevel;
  695. BYTE bGrooveRange;
  696. BYTE bRepeatMode;
  697. } DMUS_COMMAND_PARAM;
  698. typedef struct _DMUS_COMMAND_PARAM_2
  699. {
  700. MUSIC_TIME mtTime;
  701. BYTE bCommand;
  702. BYTE bGrooveLevel;
  703. BYTE bGrooveRange;
  704. BYTE bRepeatMode;
  705. } DMUS_COMMAND_PARAM_2;
  706. typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT;
  707. typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;
  708. typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND;
  709. #define DMUSB_LOADED (1 << 0) /* Set when band has been loaded */
  710. #define DMUSB_DEFAULT (1 << 1) /* Set when band is default band for a style */
  711. /*////////////////////////////////////////////////////////////////////
  712. // IDirectMusicBand */
  713. #undef INTERFACE
  714. #define INTERFACE IDirectMusicBand
  715. DECLARE_INTERFACE_(IDirectMusicBand, IUnknown)
  716. {
  717. /* IUnknown */
  718. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  719. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  720. STDMETHOD_(ULONG,Release) (THIS) PURE;
  721. /* IDirectMusicBand */
  722. STDMETHOD(CreateSegment) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  723. STDMETHOD(Download) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
  724. STDMETHOD(Unload) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
  725. };
  726. typedef IDirectMusicBand IDirectMusicBand8;
  727. /*////////////////////////////////////////////////////////////////////
  728. // IDirectMusicObject */
  729. #undef INTERFACE
  730. #define INTERFACE IDirectMusicObject
  731. DECLARE_INTERFACE_(IDirectMusicObject, IUnknown)
  732. {
  733. /* IUnknown */
  734. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  735. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  736. STDMETHOD_(ULONG,Release) (THIS) PURE;
  737. /* IDirectMusicObject */
  738. STDMETHOD(GetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  739. STDMETHOD(SetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  740. STDMETHOD(ParseDescriptor) (THIS_ LPSTREAM pStream,
  741. LPDMUS_OBJECTDESC pDesc) PURE;
  742. };
  743. typedef IDirectMusicObject IDirectMusicObject8;
  744. /*////////////////////////////////////////////////////////////////////
  745. // IDirectMusicLoader */
  746. #undef INTERFACE
  747. #define INTERFACE IDirectMusicLoader
  748. DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown)
  749. {
  750. /* IUnknown */
  751. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  752. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  753. STDMETHOD_(ULONG,Release) (THIS) PURE;
  754. /* IDirectMusicLoader */
  755. STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
  756. REFIID riid,
  757. LPVOID FAR *ppv) PURE;
  758. STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  759. STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
  760. WCHAR *pwzPath,
  761. BOOL fClear) PURE;
  762. STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
  763. WCHAR *pwzFileExtension,
  764. WCHAR *pwzScanFileName) PURE;
  765. STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
  766. STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
  767. STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
  768. STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
  769. BOOL fEnable) PURE;
  770. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  771. DWORD dwIndex,
  772. LPDMUS_OBJECTDESC pDesc) PURE;
  773. };
  774. /*////////////////////////////////////////////////////////////////////
  775. // IDirectMusicLoader8 */
  776. #undef INTERFACE
  777. #define INTERFACE IDirectMusicLoader8
  778. DECLARE_INTERFACE_(IDirectMusicLoader8, IDirectMusicLoader)
  779. {
  780. /* IUnknown */
  781. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  782. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  783. STDMETHOD_(ULONG,Release) (THIS) PURE;
  784. /* IDirectMusicLoader */
  785. STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
  786. REFIID riid,
  787. LPVOID FAR *ppv) PURE;
  788. STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  789. STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
  790. WCHAR *pwzPath,
  791. BOOL fClear) PURE;
  792. STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
  793. WCHAR *pwzFileExtension,
  794. WCHAR *pwzScanFileName) PURE;
  795. STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
  796. STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
  797. STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
  798. STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
  799. BOOL fEnable) PURE;
  800. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  801. DWORD dwIndex,
  802. LPDMUS_OBJECTDESC pDesc) PURE;
  803. /* IDirectMusicLoader8 */
  804. STDMETHOD_(void, CollectGarbage) (THIS) PURE;
  805. STDMETHOD(ReleaseObjectByUnknown) (THIS_ IUnknown *pObject) PURE;
  806. STDMETHOD(LoadObjectFromFile) (THIS_ REFGUID rguidClassID,
  807. REFIID iidInterfaceID,
  808. WCHAR *pwzFilePath,
  809. void ** ppObject) PURE;
  810. };
  811. /* Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */
  812. #undef INTERFACE
  813. #define INTERFACE IDirectMusicGetLoader
  814. DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown)
  815. {
  816. /* IUnknown */
  817. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  818. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  819. STDMETHOD_(ULONG,Release) (THIS) PURE;
  820. /* IDirectMusicGetLoader */
  821. STDMETHOD(GetLoader) (THIS_ IDirectMusicLoader ** ppLoader) PURE;
  822. };
  823. typedef IDirectMusicGetLoader IDirectMusicGetLoader8;
  824. /*////////////////////////////////////////////////////////////////////
  825. // IDirectMusicSegment */
  826. #undef INTERFACE
  827. #define INTERFACE IDirectMusicSegment
  828. DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown)
  829. {
  830. /* IUnknown */
  831. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  832. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  833. STDMETHOD_(ULONG,Release) (THIS) PURE;
  834. /* IDirectMusicSegment */
  835. STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE;
  836. STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE;
  837. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  838. STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE;
  839. STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE;
  840. STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE;
  841. STDMETHOD(GetTrack) (THIS_ REFGUID rguidType,
  842. DWORD dwGroupBits,
  843. DWORD dwIndex,
  844. IDirectMusicTrack** ppTrack) PURE;
  845. STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack,
  846. DWORD* pdwGroupBits) PURE;
  847. STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack,
  848. DWORD dwGroupBits) PURE;
  849. STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE;
  850. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState,
  851. IDirectMusicPerformance* pPerformance,
  852. DWORD dwFlags) PURE;
  853. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  854. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  855. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  856. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  857. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  858. DWORD dwGroupBits,
  859. DWORD dwIndex,
  860. MUSIC_TIME mtTime,
  861. MUSIC_TIME* pmtNext,
  862. void* pParam) PURE;
  863. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  864. DWORD dwGroupBits,
  865. DWORD dwIndex,
  866. MUSIC_TIME mtTime,
  867. void* pParam) PURE;
  868. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  869. MUSIC_TIME mtEnd,
  870. IDirectMusicSegment** ppSegment) PURE;
  871. STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE;
  872. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  873. STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart,
  874. MUSIC_TIME mtEnd) PURE;
  875. STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart,
  876. MUSIC_TIME* pmtEnd) PURE;
  877. STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels,
  878. DWORD* paPChannels) PURE;
  879. };
  880. /*////////////////////////////////////////////////////////////////////
  881. // IDirectMusicSegment8 */
  882. #undef INTERFACE
  883. #define INTERFACE IDirectMusicSegment8
  884. DECLARE_INTERFACE_(IDirectMusicSegment8, IDirectMusicSegment)
  885. {
  886. /* IUnknown */
  887. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  888. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  889. STDMETHOD_(ULONG,Release) (THIS) PURE;
  890. /* IDirectMusicSegment */
  891. STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE;
  892. STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE;
  893. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  894. STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE;
  895. STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE;
  896. STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE;
  897. STDMETHOD(GetTrack) (THIS_ REFGUID rguidType,
  898. DWORD dwGroupBits,
  899. DWORD dwIndex,
  900. IDirectMusicTrack** ppTrack) PURE;
  901. STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack,
  902. DWORD* pdwGroupBits) PURE;
  903. STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack,
  904. DWORD dwGroupBits) PURE;
  905. STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE;
  906. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState,
  907. IDirectMusicPerformance* pPerformance,
  908. DWORD dwFlags) PURE;
  909. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  910. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  911. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  912. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  913. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  914. DWORD dwGroupBits,
  915. DWORD dwIndex,
  916. MUSIC_TIME mtTime,
  917. MUSIC_TIME* pmtNext,
  918. void* pParam) PURE;
  919. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  920. DWORD dwGroupBits,
  921. DWORD dwIndex,
  922. MUSIC_TIME mtTime,
  923. void* pParam) PURE;
  924. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  925. MUSIC_TIME mtEnd,
  926. IDirectMusicSegment** ppSegment) PURE;
  927. STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE;
  928. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  929. STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart,
  930. MUSIC_TIME mtEnd) PURE;
  931. STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart,
  932. MUSIC_TIME* pmtEnd) PURE;
  933. STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels,
  934. DWORD* paPChannels) PURE;
  935. /* IDirectMusicSegment8 */
  936. STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */
  937. DWORD dwGroupBits, /* Group bits. */
  938. DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */
  939. DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */
  940. DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */
  941. STDMETHOD(GetAudioPathConfig) (THIS_ IUnknown ** ppAudioPathConfig) PURE;
  942. STDMETHOD(Compose) (THIS_ MUSIC_TIME mtTime,
  943. IDirectMusicSegment* pFromSegment,
  944. IDirectMusicSegment* pToSegment,
  945. IDirectMusicSegment** ppComposedSegment) PURE;
  946. STDMETHOD(Download) (THIS_ IUnknown *pAudioPath) PURE;
  947. STDMETHOD(Unload) (THIS_ IUnknown *pAudioPath) PURE;
  948. };
  949. /*/////////////////////////////////////////////////////////////////////
  950. // IDirectMusicSegmentState */
  951. #undef INTERFACE
  952. #define INTERFACE IDirectMusicSegmentState
  953. DECLARE_INTERFACE_(IDirectMusicSegmentState, IUnknown)
  954. {
  955. /* IUnknown */
  956. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  957. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  958. STDMETHOD_(ULONG,Release) (THIS) PURE;
  959. /* IDirectMusicSegmentState */
  960. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  961. STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  962. STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE;
  963. STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE;
  964. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  965. };
  966. /*/////////////////////////////////////////////////////////////////////
  967. // IDirectMusicSegmentState8 */
  968. #undef INTERFACE
  969. #define INTERFACE IDirectMusicSegmentState8
  970. DECLARE_INTERFACE_(IDirectMusicSegmentState8, IDirectMusicSegmentState)
  971. {
  972. /* IUnknown */
  973. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  974. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  975. STDMETHOD_(ULONG,Release) (THIS) PURE;
  976. /* IDirectMusicSegmentState */
  977. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  978. STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  979. STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE;
  980. STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE;
  981. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  982. /* IDirectMusicSegmentState8 */
  983. STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */
  984. DWORD dwGroupBits, /* Group bits. */
  985. DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */
  986. DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */
  987. DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */
  988. STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */
  989. DWORD dwStage, /* Which stage in the path. */
  990. DWORD dwBuffer, /* Which buffer to address, if more than one. */
  991. REFGUID guidObject, /* ClassID of object. */
  992. DWORD dwIndex, /* Which object of that class. */
  993. REFGUID iidInterface,/* Requested COM interface. */
  994. void ** ppObject) PURE; /* Pointer to interface. */
  995. };
  996. /*////////////////////////////////////////////////////////////////////
  997. // IDirectMusicAudioPath */
  998. #undef INTERFACE
  999. #define INTERFACE IDirectMusicAudioPath
  1000. DECLARE_INTERFACE_(IDirectMusicAudioPath, IUnknown)
  1001. {
  1002. /* IUnknown */
  1003. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1004. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1005. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1006. /* IDirectMusicAudioPath */
  1007. STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */
  1008. DWORD dwStage, /* Which stage in the path. */
  1009. DWORD dwBuffer, /* Which buffer to address, if more than one. */
  1010. REFGUID guidObject, /* ClassID of object. */
  1011. DWORD dwIndex, /* Which object of that class. */
  1012. REFGUID iidInterface,/* Requested COM interface. */
  1013. void ** ppObject) PURE; /* Pointer to interface. */
  1014. STDMETHOD(Activate) (THIS_ BOOL fActivate) PURE;/* True to activate, False to deactivate. */
  1015. STDMETHOD(SetVolume) (THIS_ long lVolume, /* Gain, in 100ths of a dB. This must be negative (0 represents full volume.) */
  1016. DWORD dwDuration) PURE;/* Duration of volume ramp in milliseconds. Note that 0 is more efficient. */
  1017. STDMETHOD(ConvertPChannel) (THIS_ DWORD dwPChannelIn, /* Pchannel of source. */
  1018. DWORD *pdwPChannelOut) PURE; /* Equivalent pchannel on performance. */
  1019. };
  1020. typedef IDirectMusicAudioPath IDirectMusicAudioPath8;
  1021. /*////////////////////////////////////////////////////////////////////
  1022. // IDirectMusicPerformance */
  1023. #undef INTERFACE
  1024. #define INTERFACE IDirectMusicPerformance
  1025. DECLARE_INTERFACE_(IDirectMusicPerformance, IUnknown)
  1026. {
  1027. /* IUnknown */
  1028. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1029. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1030. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1031. /* IDirectMusicPerformance */
  1032. STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic,
  1033. LPDIRECTSOUND pDirectSound,
  1034. HWND hWnd) PURE;
  1035. STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment,
  1036. DWORD dwFlags,
  1037. __int64 i64StartTime,
  1038. IDirectMusicSegmentState** ppSegmentState) PURE;
  1039. STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment,
  1040. IDirectMusicSegmentState* pSegmentState,
  1041. MUSIC_TIME mtTime,
  1042. DWORD dwFlags) PURE;
  1043. STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState,
  1044. MUSIC_TIME mtTime) PURE;
  1045. STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE;
  1046. STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1047. STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE;
  1048. STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1049. STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1050. STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime,
  1051. REFERENCE_TIME* prtTime) PURE;
  1052. STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime,
  1053. MUSIC_TIME* pmtTime) PURE;
  1054. STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment,
  1055. IDirectMusicSegmentState* pSegState) PURE;
  1056. STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow,
  1057. MUSIC_TIME* pmtNow) PURE;
  1058. STDMETHOD(AllocPMsg) (THIS_ ULONG cb,
  1059. DMUS_PMSG** ppPMSG) PURE;
  1060. STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1061. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  1062. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  1063. STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification,
  1064. REFERENCE_TIME rtMinimum) PURE;
  1065. STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  1066. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  1067. STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  1068. STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE;
  1069. STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE;
  1070. STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum,
  1071. IDirectMusicPort* pPort,
  1072. DWORD dwGroup ) PURE;
  1073. STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel,
  1074. IDirectMusicPort* pPort,
  1075. DWORD dwGroup,
  1076. DWORD dwMChannel ) PURE;
  1077. STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel,
  1078. IDirectMusicPort** ppPort,
  1079. DWORD* pdwGroup,
  1080. DWORD* pdwMChannel ) PURE;
  1081. STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst,
  1082. DWORD dwPChannel,
  1083. IDirectMusicDownloadedInstrument** ppDownInst,
  1084. DMUS_NOTERANGE* pNoteRanges,
  1085. DWORD dwNumNoteRanges,
  1086. IDirectMusicPort** ppPort,
  1087. DWORD* pdwGroup,
  1088. DWORD* pdwMChannel ) PURE;
  1089. STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime,
  1090. DWORD dwFlags) PURE;
  1091. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  1092. DWORD dwGroupBits,
  1093. DWORD dwIndex,
  1094. MUSIC_TIME mtTime,
  1095. MUSIC_TIME* pmtNext,
  1096. void* pParam) PURE;
  1097. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  1098. DWORD dwGroupBits,
  1099. DWORD dwIndex,
  1100. MUSIC_TIME mtTime,
  1101. void* pParam) PURE;
  1102. STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType,
  1103. void* pParam,
  1104. DWORD dwSize) PURE;
  1105. STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType,
  1106. void* pParam,
  1107. DWORD dwSize) PURE;
  1108. STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1109. STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1110. STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE;
  1111. STDMETHOD(CloseDown) (THIS) PURE;
  1112. STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime,
  1113. REFERENCE_TIME* prtResolved,
  1114. DWORD dwTimeResolveFlags) PURE;
  1115. STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue,
  1116. DMUS_CHORD_KEY* pChord,
  1117. BYTE bPlayMode,
  1118. BYTE bChordLevel,
  1119. WORD *pwMusicValue) PURE;
  1120. STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue,
  1121. DMUS_CHORD_KEY* pChord,
  1122. BYTE bPlayMode,
  1123. BYTE bChordLevel,
  1124. BYTE *pbMIDIValue) PURE;
  1125. STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime,
  1126. DMUS_TIMESIGNATURE *pTimeSig,
  1127. WORD *pwMeasure,
  1128. BYTE *pbBeat,
  1129. BYTE *pbGrid,
  1130. short *pnOffset) PURE;
  1131. STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure,
  1132. BYTE bBeat,
  1133. BYTE bGrid,
  1134. short nOffset,
  1135. DMUS_TIMESIGNATURE *pTimeSig,
  1136. MUSIC_TIME *pmtTime) PURE;
  1137. };
  1138. /*////////////////////////////////////////////////////////////////////
  1139. // IDirectMusicPerformance8 */
  1140. #undef INTERFACE
  1141. #define INTERFACE IDirectMusicPerformance8
  1142. DECLARE_INTERFACE_(IDirectMusicPerformance8, IDirectMusicPerformance)
  1143. {
  1144. /* IUnknown */
  1145. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1146. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1147. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1148. /* IDirectMusicPerformance */
  1149. STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic,
  1150. LPDIRECTSOUND pDirectSound,
  1151. HWND hWnd) PURE;
  1152. STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment,
  1153. DWORD dwFlags,
  1154. __int64 i64StartTime,
  1155. IDirectMusicSegmentState** ppSegmentState) PURE;
  1156. STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment,
  1157. IDirectMusicSegmentState* pSegmentState,
  1158. MUSIC_TIME mtTime,
  1159. DWORD dwFlags) PURE;
  1160. STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState,
  1161. MUSIC_TIME mtTime) PURE;
  1162. STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE;
  1163. STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1164. STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE;
  1165. STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1166. STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1167. STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime,
  1168. REFERENCE_TIME* prtTime) PURE;
  1169. STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime,
  1170. MUSIC_TIME* pmtTime) PURE;
  1171. STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment,
  1172. IDirectMusicSegmentState* pSegState) PURE;
  1173. STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow,
  1174. MUSIC_TIME* pmtNow) PURE;
  1175. STDMETHOD(AllocPMsg) (THIS_ ULONG cb,
  1176. DMUS_PMSG** ppPMSG) PURE;
  1177. STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1178. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  1179. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  1180. STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification,
  1181. REFERENCE_TIME rtMinimum) PURE;
  1182. STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  1183. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  1184. STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  1185. STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE;
  1186. STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE;
  1187. STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum,
  1188. IDirectMusicPort* pPort,
  1189. DWORD dwGroup ) PURE;
  1190. STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel,
  1191. IDirectMusicPort* pPort,
  1192. DWORD dwGroup,
  1193. DWORD dwMChannel ) PURE;
  1194. STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel,
  1195. IDirectMusicPort** ppPort,
  1196. DWORD* pdwGroup,
  1197. DWORD* pdwMChannel ) PURE;
  1198. STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst,
  1199. DWORD dwPChannel,
  1200. IDirectMusicDownloadedInstrument** ppDownInst,
  1201. DMUS_NOTERANGE* pNoteRanges,
  1202. DWORD dwNumNoteRanges,
  1203. IDirectMusicPort** ppPort,
  1204. DWORD* pdwGroup,
  1205. DWORD* pdwMChannel ) PURE;
  1206. STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime,
  1207. DWORD dwFlags) PURE;
  1208. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  1209. DWORD dwGroupBits,
  1210. DWORD dwIndex,
  1211. MUSIC_TIME mtTime,
  1212. MUSIC_TIME* pmtNext,
  1213. void* pParam) PURE;
  1214. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  1215. DWORD dwGroupBits,
  1216. DWORD dwIndex,
  1217. MUSIC_TIME mtTime,
  1218. void* pParam) PURE;
  1219. STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType,
  1220. void* pParam,
  1221. DWORD dwSize) PURE;
  1222. STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType,
  1223. void* pParam,
  1224. DWORD dwSize) PURE;
  1225. STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1226. STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1227. STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE;
  1228. STDMETHOD(CloseDown) (THIS) PURE;
  1229. STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime,
  1230. REFERENCE_TIME* prtResolved,
  1231. DWORD dwTimeResolveFlags) PURE;
  1232. STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue,
  1233. DMUS_CHORD_KEY* pChord,
  1234. BYTE bPlayMode,
  1235. BYTE bChordLevel,
  1236. WORD *pwMusicValue) PURE;
  1237. STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue,
  1238. DMUS_CHORD_KEY* pChord,
  1239. BYTE bPlayMode,
  1240. BYTE bChordLevel,
  1241. BYTE *pbMIDIValue) PURE;
  1242. STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime,
  1243. DMUS_TIMESIGNATURE *pTimeSig,
  1244. WORD *pwMeasure,
  1245. BYTE *pbBeat,
  1246. BYTE *pbGrid,
  1247. short *pnOffset) PURE;
  1248. STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure,
  1249. BYTE bBeat,
  1250. BYTE bGrid,
  1251. short nOffset,
  1252. DMUS_TIMESIGNATURE *pTimeSig,
  1253. MUSIC_TIME *pmtTime) PURE;
  1254. /* IDirectMusicPerformance8 */
  1255. STDMETHOD(InitAudio) (THIS_ IDirectMusic** ppDirectMusic, /* Optional DirectMusic pointer. */
  1256. IDirectSound** ppDirectSound, /* Optional DirectSound pointer. */
  1257. HWND hWnd, /* HWND for DirectSound. */
  1258. DWORD dwDefaultPathType, /* Requested default audio path type, also optional. */
  1259. DWORD dwPChannelCount, /* Number of PChannels, if default audio path to be created. */
  1260. DWORD dwFlags, /* DMUS_AUDIOF flags, if no pParams structure. */
  1261. DMUS_AUDIOPARAMS *pParams) PURE; /* Optional initialization structure, defining required voices, buffers, etc. */
  1262. STDMETHOD(PlaySegmentEx) (THIS_ IUnknown* pSource, /* Segment to play. */
  1263. WCHAR *pwzSegmentName, /* Not supported in DX8. */
  1264. IUnknown* pTransition, /* Optional template segment to compose transition with. */
  1265. DWORD dwFlags, /* DMUS_SEGF_ flags. */
  1266. __int64 i64StartTime, /* Time to start playback. */
  1267. IDirectMusicSegmentState** ppSegmentState, /* Returned Segment State. */
  1268. IUnknown *pFrom, /* Optional segmentstate or audiopath to replace. */
  1269. IUnknown *pAudioPath) PURE; /* Optional audioPath to play on. */
  1270. STDMETHOD(StopEx) (THIS_ IUnknown *pObjectToStop, /* Segstate, AudioPath, or Segment. */
  1271. __int64 i64StopTime,
  1272. DWORD dwFlags) PURE;
  1273. STDMETHOD(ClonePMsg) (THIS_ DMUS_PMSG* pSourcePMSG,
  1274. DMUS_PMSG** ppCopyPMSG) PURE;
  1275. STDMETHOD(CreateAudioPath) (THIS_ IUnknown *pSourceConfig, /* Source configuration, from AudioPathConfig file. */
  1276. BOOL fActivate, /* TRUE to activate on creation. */
  1277. IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */
  1278. STDMETHOD(CreateStandardAudioPath)(THIS_ DWORD dwType, /* Type of path to create. */
  1279. DWORD dwPChannelCount, /* How many PChannels to allocate for it. */
  1280. BOOL fActivate, /* TRUE to activate on creation. */
  1281. IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */
  1282. STDMETHOD(SetDefaultAudioPath) (THIS_ IDirectMusicAudioPath *pAudioPath) PURE;
  1283. STDMETHOD(GetDefaultAudioPath) (THIS_ IDirectMusicAudioPath **ppAudioPath) PURE;
  1284. STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* GetParam command ID. */
  1285. DWORD dwTrackID, /* Virtual track ID of caller. */
  1286. DWORD dwGroupBits, /* Group bits of caller. */
  1287. DWORD dwIndex, /* Index to Nth parameter. */
  1288. MUSIC_TIME mtTime, /* Time of requested parameter. */
  1289. MUSIC_TIME* pmtNext, /* Returned delta to next parameter. */
  1290. void* pParam) PURE; /* Data structure to fill with parameter. */
  1291. };
  1292. /*////////////////////////////////////////////////////////////////////
  1293. // IDirectMusicGraph */
  1294. #undef INTERFACE
  1295. #define INTERFACE IDirectMusicGraph
  1296. DECLARE_INTERFACE_(IDirectMusicGraph, IUnknown)
  1297. {
  1298. /* IUnknown */
  1299. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1300. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1301. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1302. /* IDirectMusicGraph */
  1303. STDMETHOD(StampPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1304. STDMETHOD(InsertTool) (THIS_ IDirectMusicTool* pTool,
  1305. DWORD* pdwPChannels,
  1306. DWORD cPChannels,
  1307. LONG lIndex) PURE;
  1308. STDMETHOD(GetTool) (THIS_ DWORD dwIndex,
  1309. IDirectMusicTool** ppTool) PURE;
  1310. STDMETHOD(RemoveTool) (THIS_ IDirectMusicTool* pTool) PURE;
  1311. };
  1312. typedef IDirectMusicGraph IDirectMusicGraph8;
  1313. /*/////////////////////////////////////////////////////////////////////
  1314. // IDirectMusicStyle */
  1315. #undef INTERFACE
  1316. #define INTERFACE IDirectMusicStyle
  1317. DECLARE_INTERFACE_(IDirectMusicStyle, IUnknown)
  1318. {
  1319. /* IUnknown */
  1320. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1321. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1322. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1323. /* IDirectMusicStyle */
  1324. STDMETHOD(GetBand) (THIS_ WCHAR* pwszName,
  1325. IDirectMusicBand** ppBand) PURE;
  1326. STDMETHOD(EnumBand) (THIS_ DWORD dwIndex,
  1327. WCHAR *pwszName) PURE;
  1328. STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE;
  1329. STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex,
  1330. WCHAR* pwszName) PURE;
  1331. STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName,
  1332. IDirectMusicSegment** ppSegment) PURE;
  1333. STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  1334. STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex,
  1335. WCHAR *pwszName) PURE;
  1336. STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName,
  1337. IDirectMusicChordMap** ppChordMap) PURE;
  1338. STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  1339. STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType,
  1340. DWORD dwLevel,
  1341. DWORD* pdwMin,
  1342. DWORD* pdwMax) PURE;
  1343. STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE;
  1344. };
  1345. /*/////////////////////////////////////////////////////////////////////
  1346. // IDirectMusicStyle8 */
  1347. #undef INTERFACE
  1348. #define INTERFACE IDirectMusicStyle8
  1349. DECLARE_INTERFACE_(IDirectMusicStyle8, IDirectMusicStyle)
  1350. {
  1351. /* IUnknown */
  1352. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1353. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1354. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1355. /* IDirectMusicStyle */
  1356. STDMETHOD(GetBand) (THIS_ WCHAR* pwszName,
  1357. IDirectMusicBand** ppBand) PURE;
  1358. STDMETHOD(EnumBand) (THIS_ DWORD dwIndex,
  1359. WCHAR *pwszName) PURE;
  1360. STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE;
  1361. STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex,
  1362. WCHAR* pwszName) PURE;
  1363. STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName,
  1364. IDirectMusicSegment** ppSegment) PURE;
  1365. STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  1366. STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex,
  1367. WCHAR *pwszName) PURE;
  1368. STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName,
  1369. IDirectMusicChordMap** ppChordMap) PURE;
  1370. STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  1371. STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType,
  1372. DWORD dwLevel,
  1373. DWORD* pdwMin,
  1374. DWORD* pdwMax) PURE;
  1375. STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE;
  1376. /* IDirectMusicStyle8 */
  1377. STDMETHOD(EnumPattern) (THIS_ DWORD dwIndex,
  1378. DWORD dwPatternType,
  1379. WCHAR* pwszName) PURE;
  1380. };
  1381. /*/////////////////////////////////////////////////////////////////////
  1382. // IDirectMusicChordMap */
  1383. #undef INTERFACE
  1384. #define INTERFACE IDirectMusicChordMap
  1385. DECLARE_INTERFACE_(IDirectMusicChordMap, IUnknown)
  1386. {
  1387. /* IUnknown */
  1388. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1389. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1390. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1391. /* IDirectMusicChordMap */
  1392. STDMETHOD(GetScale) (THIS_ DWORD* pdwScale) PURE;
  1393. };
  1394. typedef IDirectMusicChordMap IDirectMusicChordMap8;
  1395. /*/////////////////////////////////////////////////////////////////////
  1396. // IDirectMusicComposer */
  1397. #undef INTERFACE
  1398. #define INTERFACE IDirectMusicComposer
  1399. DECLARE_INTERFACE_(IDirectMusicComposer, IUnknown)
  1400. {
  1401. /* IUnknown */
  1402. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1403. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1404. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1405. /* IDirectMusicComposer */
  1406. STDMETHOD(ComposeSegmentFromTemplate) (THIS_ IDirectMusicStyle* pStyle,
  1407. IDirectMusicSegment* pTemplate,
  1408. WORD wActivity,
  1409. IDirectMusicChordMap* pChordMap,
  1410. IDirectMusicSegment** ppSegment) PURE;
  1411. STDMETHOD(ComposeSegmentFromShape) (THIS_ IDirectMusicStyle* pStyle,
  1412. WORD wNumMeasures,
  1413. WORD wShape,
  1414. WORD wActivity,
  1415. BOOL fIntro,
  1416. BOOL fEnd,
  1417. IDirectMusicChordMap* pChordMap,
  1418. IDirectMusicSegment** ppSegment ) PURE;
  1419. STDMETHOD(ComposeTransition) (THIS_ IDirectMusicSegment* pFromSeg,
  1420. IDirectMusicSegment* pToSeg,
  1421. MUSIC_TIME mtTime,
  1422. WORD wCommand,
  1423. DWORD dwFlags,
  1424. IDirectMusicChordMap* pChordMap,
  1425. IDirectMusicSegment** ppTransSeg) PURE;
  1426. STDMETHOD(AutoTransition) (THIS_ IDirectMusicPerformance* pPerformance,
  1427. IDirectMusicSegment* pToSeg,
  1428. WORD wCommand,
  1429. DWORD dwFlags,
  1430. IDirectMusicChordMap* pChordMap,
  1431. IDirectMusicSegment** ppTransSeg,
  1432. IDirectMusicSegmentState** ppToSegState,
  1433. IDirectMusicSegmentState** ppTransSegState) PURE;
  1434. STDMETHOD(ComposeTemplateFromShape) (THIS_ WORD wNumMeasures,
  1435. WORD wShape,
  1436. BOOL fIntro,
  1437. BOOL fEnd,
  1438. WORD wEndLength,
  1439. IDirectMusicSegment** ppTemplate) PURE;
  1440. STDMETHOD(ChangeChordMap) (THIS_ IDirectMusicSegment* pSegment,
  1441. BOOL fTrackScale,
  1442. IDirectMusicChordMap* pChordMap) PURE;
  1443. };
  1444. typedef IDirectMusicComposer IDirectMusicComposer8;
  1445. /*/////////////////////////////////////////////////////////////////////
  1446. // IDirectMusicPatternTrack */
  1447. #undef INTERFACE
  1448. #define INTERFACE IDirectMusicPatternTrack
  1449. DECLARE_INTERFACE_(IDirectMusicPatternTrack, IUnknown)
  1450. {
  1451. /* IUnknown */
  1452. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1453. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1454. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1455. /* IDirectMusicPatternTrack */
  1456. STDMETHOD(CreateSegment) (THIS_ IDirectMusicStyle* pStyle,
  1457. IDirectMusicSegment** ppSegment) PURE;
  1458. STDMETHOD(SetVariation) (THIS_ IDirectMusicSegmentState* pSegState,
  1459. DWORD dwVariationFlags,
  1460. DWORD dwPart) PURE;
  1461. STDMETHOD(SetPatternByName) (THIS_ IDirectMusicSegmentState* pSegState,
  1462. WCHAR* wszName,
  1463. IDirectMusicStyle* pStyle,
  1464. DWORD dwPatternType,
  1465. DWORD* pdwLength) PURE;
  1466. };
  1467. typedef IDirectMusicPatternTrack IDirectMusicPatternTrack8;
  1468. /*/////////////////////////////////////////////////////////////////////
  1469. // IDirectMusicScript */
  1470. #undef INTERFACE
  1471. #define INTERFACE IDirectMusicScript
  1472. DECLARE_INTERFACE_(IDirectMusicScript, IUnknown)
  1473. {
  1474. /* IUnknown */
  1475. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1476. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1477. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1478. /* IDirectMusicScript */
  1479. STDMETHOD(Init) (THIS_ IDirectMusicPerformance *pPerformance,
  1480. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1481. STDMETHOD(CallRoutine) (THIS_ WCHAR *pwszRoutineName,
  1482. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1483. STDMETHOD(SetVariableVariant) (THIS_ WCHAR *pwszVariableName,
  1484. VARIANT varValue,
  1485. BOOL fSetRef,
  1486. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1487. STDMETHOD(GetVariableVariant) (THIS_ WCHAR *pwszVariableName,
  1488. VARIANT *pvarValue,
  1489. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1490. STDMETHOD(SetVariableNumber) (THIS_ WCHAR *pwszVariableName,
  1491. LONG lValue,
  1492. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1493. STDMETHOD(GetVariableNumber) (THIS_ WCHAR *pwszVariableName,
  1494. LONG *plValue,
  1495. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1496. STDMETHOD(SetVariableObject) (THIS_ WCHAR *pwszVariableName,
  1497. IUnknown *punkValue,
  1498. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1499. STDMETHOD(GetVariableObject) (THIS_ WCHAR *pwszVariableName,
  1500. REFIID riid,
  1501. LPVOID FAR *ppv,
  1502. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1503. STDMETHOD(EnumRoutine) (THIS_ DWORD dwIndex,
  1504. WCHAR *pwszName) PURE;
  1505. STDMETHOD(EnumVariable) (THIS_ DWORD dwIndex,
  1506. WCHAR *pwszName) PURE;
  1507. };
  1508. typedef IDirectMusicScript IDirectMusicScript8;
  1509. /*/////////////////////////////////////////////////////////////////////
  1510. // IDirectMusicContainer */
  1511. #undef INTERFACE
  1512. #define INTERFACE IDirectMusicContainer
  1513. DECLARE_INTERFACE_(IDirectMusicContainer, IUnknown)
  1514. {
  1515. /* IUnknown */
  1516. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1517. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1518. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1519. /* IDirectMusicContainer */
  1520. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  1521. DWORD dwIndex,
  1522. LPDMUS_OBJECTDESC pDesc,
  1523. WCHAR *pwszAlias) PURE;
  1524. };
  1525. typedef IDirectMusicContainer IDirectMusicContainer8;
  1526. /* CLSID's */
  1527. DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1528. DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1529. DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1530. DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1531. DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1532. DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1533. DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1534. DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1535. DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00, 0xb6ee, 0x11d1, 0x86, 0xbe, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
  1536. /* New CLSID's for DX8 */
  1537. DEFINE_GUID(CLSID_DirectMusicPatternTrack,0xd2ac2897, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1538. DEFINE_GUID(CLSID_DirectMusicScript,0x810b5013, 0xe88d, 0x11d2, 0x8b, 0xc1, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {810B5013-E88D-11d2-8BC1-00600893B1B6} */
  1539. DEFINE_GUID(CLSID_DirectMusicContainer,0x9301e380, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47);
  1540. DEFINE_GUID(CLSID_DirectSoundWave,0x8a667154, 0xf9cb, 0x11d2, 0xad, 0x8a, 0x0, 0x60, 0xb0, 0x57, 0x5a, 0xbc);
  1541. DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,0xee0b9ca0, 0xa81e, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1542. /* Special GUID for all object types. This is used by the loader. */
  1543. DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1544. /* Notification guids */
  1545. DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1546. DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5, 0x4e5d, 0x11d2, 0xbc, 0xc7, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1547. DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1548. DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1549. DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1550. DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE, 0xd348372b, 0x945b, 0x45ae, 0xa5, 0x22, 0x45, 0xf, 0x12, 0x5b, 0x84, 0xa5);
  1551. /* Track param type guids */
  1552. /* Use to get/set a DMUS_COMMAND_PARAM param in the Command track */
  1553. DEFINE_GUID(GUID_CommandParam,0xd2ac289d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1554. /* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track */
  1555. DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7, 0x9538, 0x11d2, 0x97, 0xa9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1556. /* Use to get/set a DMUS_COMMAND_PARAM_2 param to be used as the command following all commands in
  1557. the Command track (this information can't be saved) */
  1558. DEFINE_GUID(GUID_CommandParamNext, 0x472afe7a, 0x281b, 0x11d3, 0x81, 0x7d, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1559. /* Use to get/set a DMUS_CHORD_PARAM param in the Chord track */
  1560. DEFINE_GUID(GUID_ChordParam,0xd2ac289e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1561. /* Use to get a DMUS_RHYTHM_PARAM param in the Chord track */
  1562. DEFINE_GUID(GUID_RhythmParam,0xd2ac289f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1563. /* Use to get/set an IDirectMusicStyle param in the Style track */
  1564. DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1565. /* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks */
  1566. DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1567. /* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track */
  1568. DEFINE_GUID(GUID_TempoParam,0xd2ac28a5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1569. /* Use to get the next valid point in a segment at which it may start */
  1570. DEFINE_GUID(GUID_Valid_Start_Time,0x7f6b1760, 0x1fdb, 0x11d3, 0x82, 0x26, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1571. /* Use to get the next point in the currently playing primary segment at which a new segment may start */
  1572. DEFINE_GUID(GUID_Play_Marker,0xd8761a41, 0x801a, 0x11d3, 0x9b, 0xd1, 0xda, 0xf7, 0xe1, 0xc3, 0xd8, 0x34);
  1573. /* Use to get (GetParam) or add (SetParam) bands in the Band track */
  1574. DEFINE_GUID(GUID_BandParam,0x2bb1938, 0xcb8b, 0x11d2, 0x8b, 0xb9, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6);
  1575. typedef struct _DMUS_BAND_PARAM
  1576. {
  1577. MUSIC_TIME mtTimePhysical; /* Note: If this is a clock-time track, then this field is interpreted in the track's internal time format, which is the number of milliseconds after the beginning of playback. */
  1578. IDirectMusicBand *pBand;
  1579. } DMUS_BAND_PARAM;
  1580. /* Obsolete -- doesn't distinguish physical and logical time. Use GUID_BandParam instead. */
  1581. DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1582. /* Use to get/set an IDirectMusicChordMap param in the ChordMap track */
  1583. DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1584. /* Use to get/set a DMUS_MUTE_PARAM param in the Mute track */
  1585. DEFINE_GUID(GUID_MuteParam,0xd2ac28af, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1586. /* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
  1587. Some of these guids (where noted) also apply to wave tracks.
  1588. */
  1589. /* Download bands/waves for the IDirectMusicSegment */
  1590. DEFINE_GUID(GUID_Download,0xd2ac28a7, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1591. /* Unload bands/waves for the IDirectMusicSegment */
  1592. DEFINE_GUID(GUID_Unload,0xd2ac28a8, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1593. /* Connect segment's bands to an IDirectMusicCollection */
  1594. DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1595. /* Enable/disable autodownloading of bands/waves */
  1596. DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1597. DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1598. /* Clear all bands */
  1599. DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1600. /* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file */
  1601. DEFINE_GUID(GUID_StandardMIDIFile, 0x6621075, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1602. /* For compatibility with beta releases... */
  1603. #define GUID_IgnoreBankSelectForGM GUID_StandardMIDIFile
  1604. /* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
  1605. * specific PMsg types.
  1606. */
  1607. DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1608. DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1609. DEFINE_GUID(GUID_DisableTempo, 0x45fc707d, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1610. DEFINE_GUID(GUID_EnableTempo, 0x45fc707e, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1611. /* Used in SetParam calls for pattern-based tracks. A nonzero value seeds the random number
  1612. generator for variation selection; a value of zero reverts to the default behavior of
  1613. getting the seed from the system clock.
  1614. */
  1615. DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5, 0xff37, 0x11d2, 0x81, 0x4e, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1616. /* Used to get the variations currently in effect across PChannels */
  1617. DEFINE_GUID(GUID_Variations, 0x11f72cce, 0x26e6, 0x4ecd, 0xaf, 0x2e, 0xd6, 0x68, 0xe6, 0x67, 0x7, 0xd8);
  1618. typedef struct _DMUS_VARIATIONS_PARAM
  1619. {
  1620. DWORD dwPChannelsUsed; /* number of PChannels in use */
  1621. DWORD* padwPChannels; /* array of PChannels in use */
  1622. DWORD* padwVariations; /* array of variations in effect for each PChannel */
  1623. } DMUS_VARIATIONS_PARAM;
  1624. /* Download bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */
  1625. DEFINE_GUID(GUID_DownloadToAudioPath,0x9f2c0341, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1626. /* Unload bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */
  1627. DEFINE_GUID(GUID_UnloadFromAudioPath,0x9f2c0342, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1628. /* Global data guids */
  1629. DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1630. DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1631. DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1632. DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b, 0x3631, 0x11d2, 0xbc, 0xb8, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1633. /* GUID for default GM/GS dls collection. */
  1634. DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1635. /* GUID to define default synth, placed in AudioPath configuration file. */
  1636. DEFINE_GUID(GUID_Synth_Default,0x26bb9432, 0x45fe, 0x48d3, 0xa3, 0x75, 0x24, 0x72, 0xc5, 0xe3, 0xe7, 0x86);
  1637. /* GUIDs to define default buffer configurations to place in AudioPath configuration file. */
  1638. DEFINE_GUID(GUID_Buffer_Reverb,0x186cc541, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1639. DEFINE_GUID(GUID_Buffer_EnvReverb,0x186cc542, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1640. DEFINE_GUID(GUID_Buffer_Stereo,0x186cc545, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1641. DEFINE_GUID(GUID_Buffer_3D_Dry,0x186cc546, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1642. DEFINE_GUID(GUID_Buffer_Mono,0x186cc547, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1643. /* IID's */
  1644. DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2, 0x5dca, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1645. DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844, 0xd13d, 0x11d1, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1646. DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1647. DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1648. DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7, 0xd3ee, 0x11d1, 0xbc, 0x8d, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1649. DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03, 0x6523, 0x11d2, 0x87, 0x1d, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1650. DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277, 0x5497, 0x11d2, 0xbc, 0xcb, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1651. DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1652. DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1653. DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1654. DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1655. /* Alternate interface IDs, available in DX7 release and after. */
  1656. DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1657. DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1, 0xc052, 0x11d2, 0x87, 0x2f, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1658. /* Interface IDs for DX8 */
  1659. /* changed interfaces (GUID only) */
  1660. DEFINE_GUID(IID_IDirectMusicLoader8, 0x19e7c08c, 0xa44, 0x4e6a, 0xa1, 0x16, 0x59, 0x5a, 0x7c, 0xd5, 0xde, 0x8c);
  1661. DEFINE_GUID(IID_IDirectMusicPerformance8, 0x679c4137, 0xc62e, 0x4147, 0xb2, 0xb4, 0x9d, 0x56, 0x9a, 0xcb, 0x25, 0x4c);
  1662. DEFINE_GUID(IID_IDirectMusicSegment8,0xc6784488, 0x41a3, 0x418f, 0xaa, 0x15, 0xb3, 0x50, 0x93, 0xba, 0x42, 0xd4);
  1663. DEFINE_GUID(IID_IDirectMusicSegmentState8, 0xa50e4730, 0xae4, 0x48a7, 0x98, 0x39, 0xbc, 0x4, 0xbf, 0xe0, 0x77, 0x72);
  1664. DEFINE_GUID(IID_IDirectMusicStyle8, 0xfd24ad8a, 0xa260, 0x453d, 0xbf, 0x50, 0x6f, 0x93, 0x84, 0xf7, 0x9, 0x85);
  1665. /* new interfaces (GUID + alias) */
  1666. DEFINE_GUID(IID_IDirectMusicPatternTrack, 0x51c22e10, 0xb49f, 0x46fc, 0xbe, 0xc2, 0xe6, 0x28, 0x8f, 0xb9, 0xed, 0xe6);
  1667. #define IID_IDirectMusicPatternTrack8 IID_IDirectMusicPatternTrack
  1668. DEFINE_GUID(IID_IDirectMusicScript, 0x2252373a, 0x5814, 0x489b, 0x82, 0x9, 0x31, 0xfe, 0xde, 0xba, 0xf1, 0x37); /* {2252373A-5814-489b-8209-31FEDEBAF137} */
  1669. #define IID_IDirectMusicScript8 IID_IDirectMusicScript
  1670. DEFINE_GUID(IID_IDirectMusicContainer, 0x9301e386, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47);
  1671. #define IID_IDirectMusicContainer8 IID_IDirectMusicContainer
  1672. DEFINE_GUID(IID_IDirectMusicAudioPath,0xc87631f5, 0x23be, 0x4986, 0x88, 0x36, 0x5, 0x83, 0x2f, 0xcc, 0x48, 0xf9);
  1673. #define IID_IDirectMusicAudioPath8 IID_IDirectMusicAudioPath
  1674. /* unchanged interfaces (alias only) */
  1675. #define IID_IDirectMusicGetLoader8 IID_IDirectMusicGetLoader
  1676. #define IID_IDirectMusicChordMap8 IID_IDirectMusicChordMap
  1677. #define IID_IDirectMusicGraph8 IID_IDirectMusicGraph
  1678. #define IID_IDirectMusicBand8 IID_IDirectMusicBand
  1679. #define IID_IDirectMusicObject8 IID_IDirectMusicObject
  1680. #define IID_IDirectMusicComposer8 IID_IDirectMusicComposer
  1681. #ifdef __cplusplus
  1682. }; /* extern "C" */
  1683. #endif
  1684. #include <poppack.h>
  1685. #endif /* #ifndef _DMUSICI_ */