2 * DirectMusic Performance Layer Plugins API
4 * Copyright (C) 2003 Rok Mandeljc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __WINE_DMUSIC_PLUGIN_H
22 #define __WINE_DMUSIC_PLUGIN_H
31 #define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools"
33 /*****************************************************************************
34 * Predeclare the interfaces
36 DEFINE_GUID(IID_IDirectMusicTrack
, 0xf96029a1,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
37 DEFINE_GUID(IID_IDirectMusicTool
, 0xd2ac28ba,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
38 DEFINE_GUID(IID_IDirectMusicTool8
, 0xe674303,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
39 DEFINE_GUID(IID_IDirectMusicTrack8
, 0xe674304,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
41 /* typedef definitions of interfaces are in dmusici.h */
43 DEFINE_GUID(CLSID_DirectMusicTempoTrack
, 0xd2ac2885,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
44 DEFINE_GUID(CLSID_DirectMusicSeqTrack
, 0xd2ac2886,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
45 DEFINE_GUID(CLSID_DirectMusicSysExTrack
, 0xd2ac2887,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
46 DEFINE_GUID(CLSID_DirectMusicTimeSigTrack
, 0xd2ac2888,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
47 DEFINE_GUID(CLSID_DirectMusicChordTrack
, 0xd2ac288b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
48 DEFINE_GUID(CLSID_DirectMusicCommandTrack
, 0xd2ac288c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
49 DEFINE_GUID(CLSID_DirectMusicStyleTrack
, 0xd2ac288d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
50 DEFINE_GUID(CLSID_DirectMusicMotifTrack
, 0xd2ac288e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
51 DEFINE_GUID(CLSID_DirectMusicSignPostTrack
, 0xf17e8672,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
52 DEFINE_GUID(CLSID_DirectMusicBandTrack
, 0xd2ac2894,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
53 DEFINE_GUID(CLSID_DirectMusicChordMapTrack
, 0xd2ac2896,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
54 DEFINE_GUID(CLSID_DirectMusicMuteTrack
, 0xd2ac2898,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
55 DEFINE_GUID(CLSID_DirectMusicScriptTrack
, 0x4108fa85,0x3586,0x11d3,0x8b,0xd7,0x0,0x60,0x8,0x93,0xb1,0xb6);
56 DEFINE_GUID(CLSID_DirectMusicMarkerTrack
, 0x55a8fd00,0x4288,0x11d3,0x9b,0xd1,0x8a,0xd,0x61,0xc8,0x88,0x35);
57 DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack
, 0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
58 DEFINE_GUID(CLSID_DirectMusicLyricsTrack
, 0x995c1cf5,0x54ff,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
59 DEFINE_GUID(CLSID_DirectMusicParamControlTrack
, 0x4be0537b,0x5c19,0x11d3,0x8b,0xdc,0x0,0x60,0x8,0x93,0xb1,0xb6);
60 DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack
, 0xb0684266,0xb57f,0x11d2,0x97,0xf9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
61 DEFINE_GUID(CLSID_DirectMusicWaveTrack
, 0xeed36461,0x9ea5,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
64 /*****************************************************************************
65 * IDirectMusicTool interface
68 #define ICOM_INTERFACE IDirectMusicTool
69 #define IDirectMusicTool_METHODS \
70 /*** IDirectMusicTool methods ***/ \
71 ICOM_METHOD1(HRESULT, Init, IDirectMusicGraph*,pGraph) \
72 ICOM_METHOD1(HRESULT, GetMsgDeliveryType, DWORD*,pdwDeliveryType) \
73 ICOM_METHOD1(HRESULT, GetMediaTypeArraySize, DWORD*,pdwNumElements) \
74 ICOM_METHOD2(HRESULT, GetMediaTypes, DWORD**,padwMediaTypes, DWORD,dwNumElements) \
75 ICOM_METHOD2(HRESULT, ProcessPMsg, IDirectMusicPerformance*,pPerf, DMUS_PMSG*,pPMSG) \
76 ICOM_METHOD3(HRESULT, Flush, IDirectMusicPerformance*,pPerf, DMUS_PMSG*,pPMSG, REFERENCE_TIME,rtTime)
78 /*** IDirectMusicTool methods ***/
79 #define IDirectMusicTool_IMETHODS \
81 IDirectMusicTool_METHODS
82 ICOM_DEFINE(IDirectMusicTool
,IUnknown
)
85 /*** IUnknown methods ***/
86 #define IDirectMusicTool_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
87 #define IDirectMusicTool_AddRef(p) ICOM_CALL (AddRef,p)
88 #define IDirectMusicTool_Release(p) ICOM_CALL (Release,p)
89 /*** IDirectMusicTool methods ***/
90 #define IDirectMusicTool_Init(p,a) ICOM_CALL1(Init,p,a)
91 #define IDirectMusicTool_GetMsgDeliveryType(p,a) ICOM_CALL1(GetMsgDeliveryType,p,a)
92 #define IDirectMusicTool_GetMediaTypeArraySize(p,a) ICOM_CALL1(GetMediaTypeArraySize,p,a)
93 #define IDirectMusicTool_GetMediaTypes(p,a,b) ICOM_CALL2(GetMediaTypes,p,a,b)
94 #define IDirectMusicTool_ProcessPMsg(p,a,b) ICOM_CALL2(ProcessPMsg,p,a,b)
95 #define IDirectMusicTool_Flush(p,a,b,c) ICOM_CALL3(Flush,p,a,b,c)
98 /*****************************************************************************
99 * IDirectMusicTool8 interface
101 #undef ICOM_INTERFACE
102 #define ICOM_INTERFACE IDirectMusicTool8
103 #define IDirectMusicTool8_METHODS \
104 /*** IDirectMusicTool8 methods ***/ \
105 ICOM_METHOD1(HRESULT, Clone, IDirectMusicTool**,ppTool)
107 /*** IDirectMusicTool8 methods ***/
108 #define IDirectMusicTool8_IMETHODS \
110 IDirectMusicTool_METHODS \
111 IDirectMusicTool8_METHODS
112 ICOM_DEFINE(IDirectMusicTool8
,IDirectMusicTool
)
113 #undef ICOM_INTERFACE
115 /*** IUnknown methods ***/
116 #define IDirectMusicTool8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
117 #define IDirectMusicTool8_AddRef(p) ICOM_CALL (AddRef,p)
118 #define IDirectMusicTool8_Release(p) ICOM_CALL (Release,p)
119 /*** IDirectMusicTool methods ***/
120 #define IDirectMusicTool8_Init(p,a) ICOM_CALL1(Init,p,a)
121 #define IDirectMusicTool8_GetMsgDeliveryType(p,a) ICOM_CALL1(GetMsgDeliveryType,p,a)
122 #define IDirectMusicTool8_GetMediaTypeArraySize(p,a) ICOM_CALL1(GetMediaTypeArraySize,p,a)
123 #define IDirectMusicTool8_GetMediaTypes(p,a,b) ICOM_CALL2(GetMediaTypes,p,a,b)
124 #define IDirectMusicTool8_ProcessPMsg(p,a,b) ICOM_CALL2(ProcessPMsg,p,a,b)
125 #define IDirectMusicTool8_Flush(p,a,b) ICOM_CALL2(Flush,p,a,b)
126 /*** IDirectMusicTool8 methods ***/
127 #define IDirectMusicTool8_Clone(p,a) ICOM_CALL1(Clone,p,a)
130 typedef enum enumDMUS_TRACKF_FLAGS
132 DMUS_TRACKF_SEEK
= 1,
133 DMUS_TRACKF_LOOP
= 2,
134 DMUS_TRACKF_START
= 4,
135 DMUS_TRACKF_FLUSH
= 8,
136 DMUS_TRACKF_DIRTY
= 0x10,
137 DMUS_TRACKF_NOTIFY_OFF
= 0x20,
138 DMUS_TRACKF_PLAY_OFF
= 0x40,
139 DMUS_TRACKF_LOOPEND
= 0x80,
140 DMUS_TRACKF_STOP
= 0x100,
141 DMUS_TRACKF_RECOMPOSE
= 0x200,
142 DMUS_TRACKF_CLOCK
= 0x400,
145 #define DMUS_TRACK_PARAMF_CLOCK 0x01
149 /*****************************************************************************
150 * IDirectMusicTrack interface
152 #undef ICOM_INTERFACE
153 #define ICOM_INTERFACE IDirectMusicTrack
154 #define IDirectMusicTrack_METHODS \
155 /*** IDirectMusicTrack methods ***/ \
156 ICOM_METHOD1(HRESULT, Init, IDirectMusicSegment*,pSegment) \
157 ICOM_METHOD5(HRESULT, InitPlay, IDirectMusicSegmentState*,pSegmentState, IDirectMusicPerformance*,pPerformance, void**,ppStateData, DWORD,dwVirtualTrackID, DWORD,dwFlags) \
158 ICOM_METHOD1(HRESULT, EndPlay, void*,pStateData) \
159 ICOM_METHOD8(HRESULT, Play, void*,pStateData, MUSIC_TIME,mtStart, MUSIC_TIME,mtEnd, MUSIC_TIME,mtOffset, DWORD,dwFlags, IDirectMusicPerformance*,pPerf, IDirectMusicSegmentState*,pSegSt, DWORD,dwVirtualID) \
160 ICOM_METHOD4(HRESULT, GetParam, REFGUID,rguidType, MUSIC_TIME,mtTime, MUSIC_TIME*,pmtNext, void*,pParam) \
161 ICOM_METHOD3(HRESULT, SetParam, REFGUID,rguidType, MUSIC_TIME,mtTime, void*,pParam) \
162 ICOM_METHOD1(HRESULT, IsParamSupported, REFGUID,rguidType) \
163 ICOM_METHOD1(HRESULT, AddNotificationType, REFGUID,rguidNotificationType) \
164 ICOM_METHOD1(HRESULT, RemoveNotificationType, REFGUID,rguidNotificationType) \
165 ICOM_METHOD3(HRESULT, Clone, MUSIC_TIME,mtStart, MUSIC_TIME,mtEnd, IDirectMusicTrack**,ppTrack)
167 /*** IDirectMusicTrack methods ***/
168 #define IDirectMusicTrack_IMETHODS \
170 IDirectMusicTrack_METHODS
171 ICOM_DEFINE(IDirectMusicTrack
,IUnknown
)
172 #undef ICOM_INTERFACE
174 /*** IUnknown methods ***/
175 #define IDirectMusicTrack_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
176 #define IDirectMusicTrack_AddRef(p) ICOM_CALL (AddRef,p)
177 #define IDirectMusicTrack_Release(p) ICOM_CALL (Release,p)
178 /*** IDirectMusicTrack methods ***/
179 #define IDirectMusicTrack_Init(p,a) ICOM_CALL1(Init,p,a)
180 #define IDirectMusicTrack_InitPlay(p,a,b,c,d,e) ICOM_CALL5(InitPlay,p,a,b,c,d,e)
181 #define IDirectMusicTrack_EndPlay(p,a) ICOM_CALL1(EndPlay,p,a)
182 #define IDirectMusicTrack_Play(p,a,b,c,d,e,f,g,h) ICOM_CALL8(Play,p,a,b,c,d,e,f,g,h)
183 #define IDirectMusicTrack_GetParam(p,a,b,c,d) ICOM_CALL4(GetParam,p,a,b,c,d)
184 #define IDirectMusicTrack_SetParam(p,a,b,c) ICOM_CALL3(SetParam,p,a,b,c)
185 #define IDirectMusicTrack_IsParamSupported(p,a) ICOM_CALL1(IsParamSupported,p,a)
186 #define IDirectMusicTrack_AddNotificationType(p,a) ICOM_CALL1(AddNotificationType,p,a)
187 #define IDirectMusicTrack_RemoveNotificationType(p,a) ICOM_CALL1(RemoveNotificationType,p,a)
188 #define IDirectMusicTrack_Clone(p,a,b,c) ICOM_CALL3(Clone,p,a,b,c)
191 /*****************************************************************************
192 * IDirectMusicTrack8 interface
194 #undef ICOM_INTERFACE
195 #define ICOM_INTERFACE IDirectMusicTrack8
196 #define IDirectMusicTrack8_METHODS \
197 /*** IDirectMusicTrack8 methods ***/ \
198 ICOM_METHOD8(HRESULT, PlayEx, void*,pStateData, REFERENCE_TIME,rtStart, REFERENCE_TIME,rtEnd, REFERENCE_TIME,rtOffset, DWORD,dwFlags, IDirectMusicPerformance*,pPerf, IDirectMusicSegmentState*,pSegSt, DWORD,dwVirtualID) \
199 ICOM_METHOD6(HRESULT, GetParamEx, REFGUID,rguidType, REFERENCE_TIME,rtTime, REFERENCE_TIME*,prtNext, void*,pParam, void*,pStateData, DWORD,dwFlags) \
200 ICOM_METHOD5(HRESULT, SetParamEx, REFGUID,rguidType, REFERENCE_TIME,rtTime, void*,pParam, void*,pStateData, DWORD,dwFlags) \
201 ICOM_METHOD3(HRESULT, Compose, IUnknown*,pContext, DWORD,dwTrackGroup, IDirectMusicTrack**,ppResultTrack) \
202 ICOM_METHOD5(HRESULT, Join, IDirectMusicTrack*,pNewTrack, MUSIC_TIME,mtJoin, IUnknown*,pContext, DWORD,dwTrackGroup, IDirectMusicTrack**,ppResultTrack)
204 /*** IDirectMusicTrack8 methods ***/
205 #define IDirectMusicTrack8_IMETHODS \
207 IDirectMusicTrack_METHODS \
208 IDirectMusicTrack8_METHODS
210 ICOM_DEFINE(IDirectMusicTrack8
,IDirectMusicTrack
)
211 #undef ICOM_INTERFACE
213 /*** IUnknown methods ***/
214 #define IDirectMusicTrack8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
215 #define IDirectMusicTrack8_AddRef(p) ICOM_CALL (AddRef,p)
216 #define IDirectMusicTrack8_Release(p) ICOM_CALL (Release,p)
217 /*** IDirectMusicTrack methods ***/
218 #define IDirectMusicTrack8_Init(p,a) ICOM_CALL1(Init,p,a)
219 #define IDirectMusicTrack8_InitPlay(p,a,b,c,d,e) ICOM_CALL5(InitPlay,p,a,b,c,d,e)
220 #define IDirectMusicTrack8_EndPlay(p,a) ICOM_CALL1(EndPlay,p,a)
221 #define IDirectMusicTrack8_Play(p,a,b,c,d,e,f,g,h) ICOM_CALL8(Play,p,a,b,c,d,e,f,g,h)
222 #define IDirectMusicTrack8_GetParam(p,a,b,c,d) ICOM_CALL4(GetParam,p,a,b,c,d)
223 #define IDirectMusicTrack8_SetParam(p,a,b,c) ICOM_CALL3(SetParam,p,a,b,c)
224 #define IDirectMusicTrack8_IsParamSupported(p,a) ICOM_CALL1(IsParamSupported,p,a)
225 #define IDirectMusicTrack8_AddNotificationType(p,a) ICOM_CALL1(AddNotificationType,p,a)
226 #define IDirectMusicTrack8_RemoveNotificationType(p,a) ICOM_CALL1(RemoveNotificationType,p,a)
227 #define IDirectMusicTrack8_Clone(p,a,b,c) ICOM_CALL3(Clone,p,a,b,c)
228 /*** IDirectMusicTrack8 methods ***/
229 #define IDirectMusicTrack8_PlayEx(p,a,b,c,d,e,f,g,h) ICOM_CALL8(PlayEx,p,a,b,c,d,e,f,g,h)
230 #define IDirectMusicTrack8_GetParamEx(p,a,b,c,d,e,f) ICOM_CALL6(GetParamEx,p,a,b,c,d,e,f)
231 #define IDirectMusicTrack8_SetParamEx(p,a,b,c,d,e) ICOM_CALL5(SetParamEx,p,a,b,c,d,e)
232 #define IDirectMusicTrack8_Compose(p,a,b,c) ICOM_CALL3(Compose,p,a,b,c)
233 #define IDirectMusicTrack8_Join(p,a,b,c,d,e) ICOM_CALL5(Join,p,a,b,c,d,e)
240 #endif /* __WINE_DMUSIC_PLUGIN_H */