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