1 /* DirectMusicInteractiveEngine Private Include
3 * Copyright (C) 2003-2004 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_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 IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl;
50 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
51 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
52 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
53 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
54 typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl;
55 typedef struct IDirectMusicPatternTrackImpl IDirectMusicPatternTrackImpl;
57 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
58 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
59 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
60 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
61 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
62 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
63 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
64 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
65 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
67 /*****************************************************************************
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
71 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
72 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
73 extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
74 extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
75 extern HRESULT WINAPI DMUSIC_CreateDirectMusicToolImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
76 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
78 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
79 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
80 extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
81 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
82 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
83 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
84 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
85 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
86 extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
89 /*****************************************************************************
90 * Auxiliary definitions
92 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
93 struct list entry; /* for listing elements */
95 IDirectMusicTrack* pTrack;
96 } DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
98 typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
99 struct list entry; /* for listing elements */
100 DMUS_IO_TEMPO_ITEM item;
101 } DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
103 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
104 struct list entry; /* for listing elements */
105 DMUS_IO_SEGMENT_ITEM_HEADER header;
106 IDirectMusicObject* pObject;
107 WCHAR wszName[DMUS_MAX_NAME];
108 } DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
110 typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
111 struct list entry; /* for listing elements */
113 IDirectMusicTool* pTool;
114 } DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
116 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
118 } DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
120 /* some sort of aux. performance channel: as far as i can understand, these are
121 used to represent a particular midi channel in particular group at particular
122 group; so all we need to do is to fill it with parent port, group and midi
124 typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
125 DWORD channel; /* map to this channel... */
126 DWORD group; /* ... in this group ... */
127 IDirectMusicPort *port; /* ... at this port */
128 } DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
130 /*****************************************************************************
131 * IDirectMusicPerformance8Impl implementation structure
133 struct IDirectMusicPerformance8Impl {
134 /* IUnknown fields */
135 const IDirectMusicPerformance8Vtbl *lpVtbl;
138 /* IDirectMusicPerformanceImpl fields */
139 IDirectMusic8* pDirectMusic;
140 IDirectSound* pDirectSound;
141 IDirectMusicGraph* pToolGraph;
142 DMUS_AUDIOPARAMS pParams;
144 /* global parameters */
146 char cMasterGrooveLevel;
150 /* performance channels */
151 DMUSIC_PRIVATE_PCHANNEL PChannel[32];
153 /* IDirectMusicPerformance8Impl fields */
154 IDirectMusicAudioPath* pDefaultPath;
155 HANDLE hNotification;
156 REFERENCE_TIME rtMinimum;
158 REFERENCE_TIME rtLatencyTime;
159 DWORD dwBumperLength;
161 /** Message Processing */
164 REFERENCE_TIME procThreadStartTime;
165 BOOL procThreadTicStarted;
166 CRITICAL_SECTION safe;
167 struct DMUS_PMSGItem* head;
168 struct DMUS_PMSGItem* imm_head;
171 /*****************************************************************************
172 * IDirectMusicSegment8Impl implementation structure
174 struct IDirectMusicSegment8Impl {
175 /* IUnknown fields */
176 const IUnknownVtbl *UnknownVtbl;
177 const IDirectMusicSegment8Vtbl *SegmentVtbl;
178 const IDirectMusicObjectVtbl *ObjectVtbl;
179 const IPersistStreamVtbl *PersistStreamVtbl;
182 /* IDirectMusicSegment8Impl fields */
183 LPDMUS_OBJECTDESC pDesc;
184 DMUS_IO_SEGMENT_HEADER header;
185 IDirectMusicGraph* pGraph;
189 /*****************************************************************************
190 * IDirectMusicSegmentState8Impl implementation structure
192 struct IDirectMusicSegmentState8Impl {
193 /* IUnknown fields */
194 const IDirectMusicSegmentState8Vtbl *lpVtbl;
197 /* IDirectMusicSegmentState8Impl fields */
200 /*****************************************************************************
201 * IDirectMusicGraphImpl implementation structure
203 struct IDirectMusicGraphImpl {
204 /* IUnknown fields */
205 const IUnknownVtbl *UnknownVtbl;
206 const IDirectMusicGraphVtbl *GraphVtbl;
207 const IDirectMusicObjectVtbl *ObjectVtbl;
208 const IPersistStreamVtbl *PersistStreamVtbl;
211 /* IDirectMusicGraphImpl fields */
212 LPDMUS_OBJECTDESC pDesc;
217 /*****************************************************************************
218 * IDirectMusicAudioPathImpl implementation structure
220 struct IDirectMusicAudioPathImpl {
221 /* IUnknown fields */
222 const IUnknownVtbl *UnknownVtbl;
223 const IDirectMusicAudioPathVtbl *AudioPathVtbl;
224 const IDirectMusicObjectVtbl *ObjectVtbl;
225 const IPersistStreamVtbl *PersistStreamVtbl;
228 /* IDirectMusicAudioPathImpl fields */
229 LPDMUS_OBJECTDESC pDesc;
231 IDirectMusicPerformance8* pPerf;
232 IDirectMusicGraph* pToolGraph;
233 IDirectSoundBuffer* pDSBuffer;
234 IDirectSoundBuffer* pPrimary;
239 /*****************************************************************************
240 * IDirectMusicTool8Impl implementation structure
242 struct IDirectMusicTool8Impl {
243 /* IUnknown fields */
244 const IDirectMusicTool8Vtbl *lpVtbl;
247 /* IDirectMusicTool8Impl fields */
250 /*****************************************************************************
251 * IDirectMusicPatternTrackImpl implementation structure
253 struct IDirectMusicPatternTrackImpl {
254 /* IUnknown fields */
255 const IDirectMusicPatternTrackVtbl *lpVtbl;
258 /* IDirectMusicPatternTrackImpl fields */
261 /*****************************************************************************
262 * IDirectMusicLyricsTrack implementation structure
264 struct IDirectMusicLyricsTrack
266 /* IUnknown fields */
267 const IUnknownVtbl *UnknownVtbl;
268 const IDirectMusicTrack8Vtbl *TrackVtbl;
269 const IPersistStreamVtbl *PersistStreamVtbl;
272 /* IDirectMusicLyricsTrack fields */
273 LPDMUS_OBJECTDESC pDesc;
276 /*****************************************************************************
277 * IDirectMusicMarkerTrack implementation structure
279 struct IDirectMusicMarkerTrack {
280 /* IUnknown fields */
281 const IUnknownVtbl *UnknownVtbl;
282 const IDirectMusicTrack8Vtbl *TrackVtbl;
283 const IPersistStreamVtbl *PersistStreamVtbl;
286 /* IDirectMusicMarkerTrack fields */
287 LPDMUS_OBJECTDESC pDesc;
290 /*****************************************************************************
291 * IDirectMusicParamControlTrack implementation structure
293 struct IDirectMusicParamControlTrack {
294 /* IUnknown fields */
295 const IUnknownVtbl *UnknownVtbl;
296 const IDirectMusicTrack8Vtbl *TrackVtbl;
297 const IPersistStreamVtbl *PersistStreamVtbl;
300 /* IDirectMusicParamControlTrack fields */
301 LPDMUS_OBJECTDESC pDesc;
304 /*****************************************************************************
305 * IDirectMusicSegTriggerTrack implementation structure
307 struct IDirectMusicSegTriggerTrack {
308 /* IUnknown fields */
309 const IUnknownVtbl *UnknownVtbl;
310 const IDirectMusicTrack8Vtbl *TrackVtbl;
311 const IPersistStreamVtbl *PersistStreamVtbl;
314 /* IDirectMusicSegTriggerTrack fields */
315 LPDMUS_OBJECTDESC pDesc;
320 /*****************************************************************************
321 * IDirectMusicSeqTrack implementation structure
323 struct IDirectMusicSeqTrack {
324 /* IUnknown fields */
325 const IUnknownVtbl *UnknownVtbl;
326 const IDirectMusicTrack8Vtbl *TrackVtbl;
327 const IPersistStreamVtbl *PersistStreamVtbl;
330 /* IDirectMusicSeqTrack fields */
331 LPDMUS_OBJECTDESC pDesc;
334 /*****************************************************************************
335 * IDirectMusicSysExTrack implementation structure
337 struct IDirectMusicSysExTrack {
338 /* IUnknown fields */
339 const IUnknownVtbl *UnknownVtbl;
340 const IDirectMusicTrack8Vtbl *TrackVtbl;
341 const IPersistStreamVtbl *PersistStreamVtbl;
344 /* IDirectMusicSysExTrack fields */
345 LPDMUS_OBJECTDESC pDesc;
348 /*****************************************************************************
349 * IDirectMusicTempoTrack implementation structure
351 struct IDirectMusicTempoTrack {
352 /* IUnknown fields */
353 const IUnknownVtbl *UnknownVtbl;
354 const IDirectMusicTrack8Vtbl *TrackVtbl;
355 const IPersistStreamVtbl *PersistStreamVtbl;
358 /* IDirectMusicTempoTrack fields */
359 LPDMUS_OBJECTDESC pDesc;
364 /*****************************************************************************
365 * IDirectMusicTimeSigTrack implementation structure
367 struct IDirectMusicTimeSigTrack {
368 /* IUnknown fields */
369 const IUnknownVtbl *UnknownVtbl;
370 const IDirectMusicTrack8Vtbl *TrackVtbl;
371 const IPersistStreamVtbl *PersistStreamVtbl;
374 /* IDirectMusicTimeSigTrack fields */
375 LPDMUS_OBJECTDESC pDesc;
378 /*****************************************************************************
379 * IDirectMusicWaveTrack implementation structure
381 struct IDirectMusicWaveTrack {
382 /* IUnknown fields */
383 const IUnknownVtbl *UnknownVtbl;
384 const IDirectMusicTrack8Vtbl *TrackVtbl;
385 const IPersistStreamVtbl *PersistStreamVtbl;
388 /* IDirectMusicWaveTrack fields */
389 LPDMUS_OBJECTDESC pDesc;
392 /**********************************************************************
393 * Dll lifetime tracking declaration for dmime.dll
395 extern LONG DMIME_refCount;
396 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
397 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
399 /*****************************************************************************
405 #endif /* __WINE_DMIME_PRIVATE_H */