/[cvs]/api/include/dmusici.h
ViewVC logotype

Annotation of /api/include/dmusici.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (22 years, 10 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

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

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26