1 /* DirectMusic Private Include
3 * Copyright (C) 2003 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __WINE_DMUSIC_PRIVATE_H
21 #define __WINE_DMUSIC_PRIVATE_H
25 #include "wine/debug.h"
31 /*****************************************************************************
34 typedef struct IDirectMusicImpl IDirectMusicImpl;
35 typedef struct IDirectMusic8Impl IDirectMusic8Impl;
36 typedef struct IDirectMusicBufferImpl IDirectMusicBufferImpl;
37 typedef struct IDirectMusicInstrumentImpl IDirectMusicInstrumentImpl;
38 typedef struct IDirectMusicDownloadedInstrumentImpl IDirectMusicDownloadedInstrumentImpl;
39 typedef struct IDirectMusicCollectionImpl IDirectMusicCollectionImpl;
40 typedef struct IDirectMusicDownloadImpl IDirectMusicDownloadImpl;
41 typedef struct IDirectMusicPortDownloadImpl IDirectMusicPortDownloadImpl;
42 typedef struct IDirectMusicPortImpl IDirectMusicPortImpl;
43 typedef struct IDirectMusicThruImpl IDirectMusicThruImpl;
44 typedef struct IReferenceClockImpl IReferenceClockImpl;
46 /*****************************************************************************
47 * Predeclare the interface implementation structures
49 extern ICOM_VTABLE(IDirectMusic) DirectMusic_Vtbl;
50 extern ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl;
51 extern ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl;
52 extern ICOM_VTABLE(IDirectMusicInstrument) DirectMusicInstrument_Vtbl;
53 extern ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vtbl;
54 extern ICOM_VTABLE(IDirectMusicCollection) DirectMusicCollection_Vtbl;
55 extern ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl;
56 extern ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl;
57 extern ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl;
58 extern ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl;
59 extern ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl;
61 /*****************************************************************************
62 * IDirectMusicImpl implementation structure
64 struct IDirectMusicImpl
67 ICOM_VFIELD(IDirectMusic);
70 /* IDirectMusicImpl fields */
74 extern HRESULT WINAPI IDirectMusicImpl_QueryInterface (LPDIRECTMUSIC iface, REFIID riid, LPVOID *ppobj);
75 extern ULONG WINAPI IDirectMusicImpl_AddRef (LPDIRECTMUSIC iface);
76 extern ULONG WINAPI IDirectMusicImpl_Release (LPDIRECTMUSIC iface);
77 /* IDirectMusicImpl: */
78 extern HRESULT WINAPI IDirectMusicImpl_EnumPort (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps);
79 extern HRESULT WINAPI IDirectMusicImpl_CreateMusicBuffer (LPDIRECTMUSIC iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter);
80 extern HRESULT WINAPI IDirectMusicImpl_CreatePort (LPDIRECTMUSIC iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter);
81 extern HRESULT WINAPI IDirectMusicImpl_EnumMasterClock (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo);
82 extern HRESULT WINAPI IDirectMusicImpl_GetMasterClock (LPDIRECTMUSIC iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock);
83 extern HRESULT WINAPI IDirectMusicImpl_SetMasterClock (LPDIRECTMUSIC iface, REFGUID rguidClock);
84 extern HRESULT WINAPI IDirectMusicImpl_Activate (LPDIRECTMUSIC iface, BOOL fEnable);
85 extern HRESULT WINAPI IDirectMusicImpl_GetDefaultPort (LPDIRECTMUSIC iface, LPGUID pguidPort);
86 extern HRESULT WINAPI IDirectMusicImpl_SetDirectSound (LPDIRECTMUSIC iface, LPDIRECTSOUND pDirectSound, HWND hWnd);
88 /*****************************************************************************
89 * IDirectMusic8Impl implementation structure
91 struct IDirectMusic8Impl
94 ICOM_VFIELD(IDirectMusic8);
97 /* IDirectMusic8Impl fields */
101 extern HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj);
102 extern ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface);
103 extern ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface);
104 /* IDirectMusic8Impl: */
105 extern HRESULT WINAPI IDirectMusic8Impl_EnumPort (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps);
106 extern HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter);
107 extern HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter);
108 extern HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo);
109 extern HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock);
110 extern HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock);
111 extern HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable);
112 extern HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort);
113 extern HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd);
114 extern HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock);
116 /*****************************************************************************
117 * IDirectMusicBufferImpl implementation structure
119 struct IDirectMusicBufferImpl
121 /* IUnknown fields */
122 ICOM_VFIELD(IDirectMusicBuffer);
125 /* IDirectMusicBufferImpl fields */
129 extern HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj);
130 extern ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface);
131 extern ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface);
132 /* IDirectMusicBufferImpl: */
133 extern HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface);
134 extern HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime);
135 extern HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage);
136 extern HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb);
137 extern HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface);
138 extern HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData);
139 extern HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData);
140 extern HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt);
141 extern HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb);
142 extern HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb);
143 extern HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat);
144 extern HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt);
145 extern HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb);
147 /*****************************************************************************
148 * IDirectMusicInstrumentImpl implementation structure
150 struct IDirectMusicInstrumentImpl
152 /* IUnknown fields */
153 ICOM_VFIELD(IDirectMusicInstrument);
156 /* IDirectMusicInstrumentImpl fields */
160 extern HRESULT WINAPI IDirectMusicInstrumentImpl_QueryInterface (LPDIRECTMUSICINSTRUMENT iface, REFIID riid, LPVOID *ppobj);
161 extern ULONG WINAPI IDirectMusicInstrumentImpl_AddRef (LPDIRECTMUSICINSTRUMENT iface);
162 extern ULONG WINAPI IDirectMusicInstrumentImpl_Release (LPDIRECTMUSICINSTRUMENT iface);
163 /* IDirectMusicInstrumentImpl: */
164 extern HRESULT WINAPI IDirectMusicInstrumentImpl_GetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD* pdwPatch);
165 extern HRESULT WINAPI IDirectMusicInstrumentImpl_SetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD dwPatch);
167 /*****************************************************************************
168 * IDirectMusicDownloadedInstrumentImpl implementation structure
170 struct IDirectMusicDownloadedInstrumentImpl
172 /* IUnknown fields */
173 ICOM_VFIELD(IDirectMusicDownloadedInstrument);
176 /* IDirectMusicDownloadedInstrumentImpl fields */
180 extern HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj);
181 extern ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface);
182 extern ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface);
183 /* IDirectMusicDownloadedInstrumentImpl: */
186 /*****************************************************************************
187 * IDirectMusicCollectionImpl implementation structure
189 struct IDirectMusicCollectionImpl
191 /* IUnknown fields */
192 ICOM_VFIELD(IDirectMusicCollection);
195 /* IDirectMusicCollectionImpl fields */
199 extern HRESULT WINAPI IDirectMusicCollectionImpl_QueryInterface (LPDIRECTMUSICCOLLECTION iface, REFIID riid, LPVOID *ppobj);
200 extern ULONG WINAPI IDirectMusicCollectionImpl_AddRef (LPDIRECTMUSICCOLLECTION iface);
201 extern ULONG WINAPI IDirectMusicCollectionImpl_Release (LPDIRECTMUSICCOLLECTION iface);
202 /* IDirectMusicImpl: */
203 HRESULT WINAPI IDirectMusicCollectionImpl_GetInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwPatch, IDirectMusicInstrument** ppInstrument);
204 HRESULT WINAPI IDirectMusicCollectionImpl_EnumInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwIndex, DWORD* pdwPatch, LPWSTR pwszName, DWORD dwNameLen);
206 /*****************************************************************************
207 * IDirectMusicDownloadImpl implementation structure
209 struct IDirectMusicDownloadImpl
211 /* IUnknown fields */
212 ICOM_VFIELD(IDirectMusicDownload);
215 /* IDirectMusicDownloadImpl fields */
219 extern HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj);
220 extern ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface);
221 extern ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface);
222 /* IDirectMusicImpl: */
223 extern HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize);
225 /*****************************************************************************
226 * IDirectMusicPortDownloadImpl implementation structure
228 struct IDirectMusicPortDownloadImpl
230 /* IUnknown fields */
231 ICOM_VFIELD(IDirectMusicPortDownload);
234 /* IDirectMusicPortDownloadImpl fields */
238 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj);
239 extern ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface);
240 extern ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface);
241 /* IDirectMusicPortDownloadImpl: */
242 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload);
243 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload);
244 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount);
245 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend);
246 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload);
247 extern HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload);
249 /*****************************************************************************
250 * IDirectMusicPortImpl implementation structure
252 struct IDirectMusicPortImpl
254 /* IUnknown fields */
255 ICOM_VFIELD(IDirectMusicPort);
258 /* IDirectMusicPortImpl fields */
262 extern HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj);
263 extern ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface);
264 extern ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface);
265 /* IDirectMusicPortDownloadImpl: */
266 extern HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer);
267 extern HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent);
268 extern HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer);
269 extern HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges);
270 extern HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument);
271 extern HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock);
272 extern HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats);
273 extern HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps);
274 extern HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
275 extern HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups);
276 extern HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups);
277 extern HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive);
278 extern HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority);
279 extern HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority);
280 extern HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer);
281 extern HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize);
283 /*****************************************************************************
284 * IDirectMusicThruImpl implementation structure
286 struct IDirectMusicThruImpl
288 /* IUnknown fields */
289 ICOM_VFIELD(IDirectMusicThru);
292 /* IDirectMusicThruImpl fields */
296 extern HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj);
297 extern ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface);
298 extern ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface);
299 /* IDirectMusicPortDownloadImpl: */
300 extern HRESULT WINAPI ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort);
302 /*****************************************************************************
303 * IReferenceClockImpl implementation structure
305 struct IReferenceClockImpl
307 /* IUnknown fields */
308 ICOM_VFIELD(IReferenceClock);
311 /* IReferenceClockImpl fields */
315 extern HRESULT WINAPI IReferenceClockImpl_QueryInterface (LPREFERENCECLOCK iface, REFIID riid, LPVOID *ppobj);
316 extern ULONG WINAPI IReferenceClockImpl_AddRef (LPREFERENCECLOCK iface);
317 extern ULONG WINAPI IReferenceClockImpl_Release (LPREFERENCECLOCK iface);
318 /* IReferenceClock: */
319 extern HRESULT WINAPI IReferenceClockImpl_GetTime (LPREFERENCECLOCK iface, REFERENCE_TIME* pTime);
320 extern HRESULT WINAPI IReferenceClockImpl_AdviseTime (LPREFERENCECLOCK iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie);
321 extern HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (LPREFERENCECLOCK iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie);
322 extern HRESULT WINAPI IReferenceClockImpl_Unadvise (LPREFERENCECLOCK iface, DWORD dwAdviseCookie);
324 #endif /* __WINE_DMUSIC_PRIVATE_H */