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