1 /* DirectMusicInteractiveEngine Private Include
3 * Copyright (C) 2003-2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_DMIME_PRIVATE_H
21 #define __WINE_DMIME_PRIVATE_H
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
46 /*****************************************************************************
49 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
50 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
51 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
52 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
54 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
55 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
56 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
57 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
58 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
59 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
60 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
61 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
62 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
64 /*****************************************************************************
67 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
68 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
69 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
71 extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
73 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
74 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
75 extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
76 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
77 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
78 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
79 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
80 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
81 extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
84 /*****************************************************************************
85 * Auxiliary definitions
87 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
88 struct list entry; /* for listing elements */
90 IDirectMusicTrack* pTrack;
91 } DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
93 typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
94 struct list entry; /* for listing elements */
95 DMUS_IO_TEMPO_ITEM item;
96 } DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
98 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
99 struct list entry; /* for listing elements */
100 DMUS_IO_SEGMENT_ITEM_HEADER header;
101 IDirectMusicObject* pObject;
102 WCHAR wszName[DMUS_MAX_NAME];
103 } DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
105 typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
106 struct list entry; /* for listing elements */
108 IDirectMusicTool* pTool;
109 } DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
111 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
113 } DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
115 /* some sort of aux. performance channel: as far as i can understand, these are
116 used to represent a particular midi channel in particular group at particular
117 group; so all we need to do is to fill it with parent port, group and midi
119 typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
120 DWORD channel; /* map to this channel... */
121 DWORD group; /* ... in this group ... */
122 IDirectMusicPort *port; /* ... at this port */
123 } DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
125 /*****************************************************************************
126 * IDirectMusicSegment8Impl implementation structure
128 struct IDirectMusicSegment8Impl {
129 /* IUnknown fields */
130 const IUnknownVtbl *UnknownVtbl;
131 const IDirectMusicSegment8Vtbl *SegmentVtbl;
132 const IDirectMusicObjectVtbl *ObjectVtbl;
133 const IPersistStreamVtbl *PersistStreamVtbl;
136 /* IDirectMusicSegment8Impl fields */
137 LPDMUS_OBJECTDESC pDesc;
138 DMUS_IO_SEGMENT_HEADER header;
139 IDirectMusicGraph* pGraph;
143 /*****************************************************************************
144 * IDirectMusicSegmentState8Impl implementation structure
146 struct IDirectMusicSegmentState8Impl {
147 /* IUnknown fields */
148 const IDirectMusicSegmentState8Vtbl *lpVtbl;
151 /* IDirectMusicSegmentState8Impl fields */
154 /*****************************************************************************
155 * IDirectMusicGraphImpl implementation structure
157 struct IDirectMusicGraphImpl {
158 /* IUnknown fields */
159 const IUnknownVtbl *UnknownVtbl;
160 const IDirectMusicGraphVtbl *GraphVtbl;
161 const IDirectMusicObjectVtbl *ObjectVtbl;
162 const IPersistStreamVtbl *PersistStreamVtbl;
165 /* IDirectMusicGraphImpl fields */
166 LPDMUS_OBJECTDESC pDesc;
171 /*****************************************************************************
172 * IDirectMusicAudioPathImpl implementation structure
174 struct IDirectMusicAudioPathImpl {
175 /* IUnknown fields */
176 const IUnknownVtbl *UnknownVtbl;
177 const IDirectMusicAudioPathVtbl *AudioPathVtbl;
178 const IDirectMusicObjectVtbl *ObjectVtbl;
179 const IPersistStreamVtbl *PersistStreamVtbl;
182 /* IDirectMusicAudioPathImpl fields */
183 LPDMUS_OBJECTDESC pDesc;
185 IDirectMusicPerformance8* pPerf;
186 IDirectMusicGraph* pToolGraph;
187 IDirectSoundBuffer* pDSBuffer;
188 IDirectSoundBuffer* pPrimary;
193 /*****************************************************************************
194 * IDirectMusicLyricsTrack implementation structure
196 struct IDirectMusicLyricsTrack
198 /* IUnknown fields */
199 const IUnknownVtbl *UnknownVtbl;
200 const IDirectMusicTrack8Vtbl *TrackVtbl;
201 const IPersistStreamVtbl *PersistStreamVtbl;
204 /* IDirectMusicLyricsTrack fields */
205 LPDMUS_OBJECTDESC pDesc;
208 /*****************************************************************************
209 * IDirectMusicMarkerTrack implementation structure
211 struct IDirectMusicMarkerTrack {
212 /* IUnknown fields */
213 const IUnknownVtbl *UnknownVtbl;
214 const IDirectMusicTrack8Vtbl *TrackVtbl;
215 const IPersistStreamVtbl *PersistStreamVtbl;
218 /* IDirectMusicMarkerTrack fields */
219 LPDMUS_OBJECTDESC pDesc;
222 /*****************************************************************************
223 * IDirectMusicParamControlTrack implementation structure
225 struct IDirectMusicParamControlTrack {
226 /* IUnknown fields */
227 const IUnknownVtbl *UnknownVtbl;
228 const IDirectMusicTrack8Vtbl *TrackVtbl;
229 const IPersistStreamVtbl *PersistStreamVtbl;
232 /* IDirectMusicParamControlTrack fields */
233 LPDMUS_OBJECTDESC pDesc;
236 /*****************************************************************************
237 * IDirectMusicSegTriggerTrack implementation structure
239 struct IDirectMusicSegTriggerTrack {
240 /* IUnknown fields */
241 const IUnknownVtbl *UnknownVtbl;
242 const IDirectMusicTrack8Vtbl *TrackVtbl;
243 const IPersistStreamVtbl *PersistStreamVtbl;
246 /* IDirectMusicSegTriggerTrack fields */
247 LPDMUS_OBJECTDESC pDesc;
252 /*****************************************************************************
253 * IDirectMusicSeqTrack implementation structure
255 struct IDirectMusicSeqTrack {
256 /* IUnknown fields */
257 const IUnknownVtbl *UnknownVtbl;
258 const IDirectMusicTrack8Vtbl *TrackVtbl;
259 const IPersistStreamVtbl *PersistStreamVtbl;
262 /* IDirectMusicSeqTrack fields */
263 LPDMUS_OBJECTDESC pDesc;
266 /*****************************************************************************
267 * IDirectMusicSysExTrack implementation structure
269 struct IDirectMusicSysExTrack {
270 /* IUnknown fields */
271 const IUnknownVtbl *UnknownVtbl;
272 const IDirectMusicTrack8Vtbl *TrackVtbl;
273 const IPersistStreamVtbl *PersistStreamVtbl;
276 /* IDirectMusicSysExTrack fields */
277 LPDMUS_OBJECTDESC pDesc;
280 /*****************************************************************************
281 * IDirectMusicTempoTrack implementation structure
283 struct IDirectMusicTempoTrack {
284 /* IUnknown fields */
285 const IUnknownVtbl *UnknownVtbl;
286 const IDirectMusicTrack8Vtbl *TrackVtbl;
287 const IPersistStreamVtbl *PersistStreamVtbl;
290 /* IDirectMusicTempoTrack fields */
291 LPDMUS_OBJECTDESC pDesc;
296 /*****************************************************************************
297 * IDirectMusicTimeSigTrack implementation structure
299 struct IDirectMusicTimeSigTrack {
300 /* IUnknown fields */
301 const IUnknownVtbl *UnknownVtbl;
302 const IDirectMusicTrack8Vtbl *TrackVtbl;
303 const IPersistStreamVtbl *PersistStreamVtbl;
306 /* IDirectMusicTimeSigTrack fields */
307 LPDMUS_OBJECTDESC pDesc;
310 /*****************************************************************************
311 * IDirectMusicWaveTrack implementation structure
313 struct IDirectMusicWaveTrack {
314 /* IUnknown fields */
315 const IUnknownVtbl *UnknownVtbl;
316 const IDirectMusicTrack8Vtbl *TrackVtbl;
317 const IPersistStreamVtbl *PersistStreamVtbl;
320 /* IDirectMusicWaveTrack fields */
321 LPDMUS_OBJECTDESC pDesc;
324 /**********************************************************************
325 * Dll lifetime tracking declaration for dmime.dll
327 extern LONG DMIME_refCount DECLSPEC_HIDDEN;
328 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
329 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
331 /*****************************************************************************
337 #endif /* __WINE_DMIME_PRIVATE_H */