1 /************************************************************************
3 * dmplugin.h -- This module contains the API for plugins for the *
4 * DirectMusic performance layer *
6 * Copyright (c) Microsoft Corporation. All rights reserved. *
8 ************************************************************************/
15 #define COM_NO_WINDOWS_H
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
;
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
;
52 typedef struct _DMUS_PMSG DMUS_PMSG
;
53 typedef long MUSIC_TIME
;
55 /* Registry location for tools */
56 #define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools"
58 /*////////////////////////////////////////////////////////////////////
59 // IDirectMusicTool */
61 #define INTERFACE IDirectMusicTool
62 DECLARE_INTERFACE_(IDirectMusicTool
, IUnknown
)
65 STDMETHOD(QueryInterface
) (THIS_ REFIID
, LPVOID FAR
*) PURE
;
66 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
67 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
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
,
79 REFERENCE_TIME rtTime
) PURE
;
82 /*////////////////////////////////////////////////////////////////////
83 // IDirectMusicTool8 */
85 #define INTERFACE IDirectMusicTool8
86 DECLARE_INTERFACE_(IDirectMusicTool8
, IDirectMusicTool
)
89 STDMETHOD(QueryInterface
) (THIS_ REFIID
, LPVOID FAR
*) PURE
;
90 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
91 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
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
,
103 REFERENCE_TIME rtTime
) PURE
;
104 /* IDirectMusicTool8 */
105 STDMETHOD(Clone
) (THIS_ IDirectMusicTool
** ppTool
) PURE
;
109 /* The following flags are sent in the IDirectMusicTrack::Play() method */
110 /* inside the dwFlags parameter */
111 typedef enum enumDMUS_TRACKF_FLAGS
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 (clock) time. Only valid for PlayEx(). */
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 (clock) time */
131 /*////////////////////////////////////////////////////////////////////
132 // IDirectMusicTrack */
134 #define INTERFACE IDirectMusicTrack
135 DECLARE_INTERFACE_(IDirectMusicTrack
, IUnknown
)
138 STDMETHOD(QueryInterface
) (THIS_ REFIID
, LPVOID FAR
*) PURE
;
139 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
140 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
142 /* IDirectMusicTrack */
143 STDMETHOD(Init
) (THIS_ IDirectMusicSegment
* pSegment
) PURE
;
144 STDMETHOD(InitPlay
) (THIS_ IDirectMusicSegmentState
* pSegmentState
,
145 IDirectMusicPerformance
* pPerformance
,
147 DWORD dwVirtualTrackID
,
149 STDMETHOD(EndPlay
) (THIS_
void* pStateData
) PURE
;
150 STDMETHOD(Play
) (THIS_
void* pStateData
,
155 IDirectMusicPerformance
* pPerf
,
156 IDirectMusicSegmentState
* pSegSt
,
157 DWORD dwVirtualID
) PURE
;
158 STDMETHOD(GetParam
) (THIS_ REFGUID rguidType
,
162 STDMETHOD(SetParam
) (THIS_ REFGUID rguidType
,
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
,
170 IDirectMusicTrack
** ppTrack
) PURE
;
173 /*////////////////////////////////////////////////////////////////////
174 // IDirectMusicTrack8 */
176 #define INTERFACE IDirectMusicTrack8
177 DECLARE_INTERFACE_(IDirectMusicTrack8
, IDirectMusicTrack
)
180 STDMETHOD(QueryInterface
) (THIS_ REFIID
, LPVOID FAR
*) PURE
;
181 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
182 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
184 /* IDirectMusicTrack */
185 STDMETHOD(Init
) (THIS_ IDirectMusicSegment
* pSegment
) PURE
;
186 STDMETHOD(InitPlay
) (THIS_ IDirectMusicSegmentState
* pSegmentState
,
187 IDirectMusicPerformance
* pPerformance
,
189 DWORD dwVirtualTrackID
,
191 STDMETHOD(EndPlay
) (THIS_
void* pStateData
) PURE
;
192 STDMETHOD(Play
) (THIS_
void* pStateData
,
197 IDirectMusicPerformance
* pPerf
,
198 IDirectMusicSegmentState
* pSegSt
,
199 DWORD dwVirtualID
) PURE
;
200 STDMETHOD(GetParam
) (THIS_ REFGUID rguidType
,
204 STDMETHOD(SetParam
) (THIS_ REFGUID rguidType
,
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
,
212 IDirectMusicTrack
** ppTrack
) PURE
;
213 /* IDirectMusicTrack8 */
214 STDMETHOD(PlayEx
) (THIS_
void* pStateData
,
215 REFERENCE_TIME rtStart
,
216 REFERENCE_TIME rtEnd
,
217 REFERENCE_TIME rtOffset
,
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 clock 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 */
235 IDirectMusicTrack
** ppResultTrack
) PURE
;
236 STDMETHOD(Join
) (THIS_ IDirectMusicTrack
* pNewTrack
,
238 IUnknown
* pContext
, /* Context for joining */
240 IDirectMusicTrack
** ppResultTrack
) PURE
;
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);
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);
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);
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);
280 #endif /* #ifndef _DMPLUGIN_ */