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"
45 /*****************************************************************************
48 typedef struct IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl
;
49 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl
;
50 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl
;
51 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl
;
52 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl
;
53 typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl
;
54 typedef struct IDirectMusicPatternTrackImpl IDirectMusicPatternTrackImpl
;
56 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack
;
57 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack
;
58 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack
;
59 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack
;
60 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack
;
61 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack
;
62 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack
;
63 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack
;
64 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack
;
66 /*****************************************************************************
69 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
70 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
71 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
72 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
73 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
74 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicToolImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
75 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
77 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
78 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
79 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
80 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
81 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
82 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
83 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
84 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
85 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
88 /*****************************************************************************
89 * Auxiliary definitions
91 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK
{
92 struct list entry
; /* for listing elements */
94 IDirectMusicTrack
* pTrack
;
95 } DMUS_PRIVATE_SEGMENT_TRACK
, *LPDMUS_PRIVATE_SEGMENT_TRACK
;
97 typedef struct _DMUS_PRIVATE_TEMPO_ITEM
{
98 struct list entry
; /* for listing elements */
99 DMUS_IO_TEMPO_ITEM item
;
100 } DMUS_PRIVATE_TEMPO_ITEM
, *LPDMUS_PRIVATE_TEMPO_ITEM
;
102 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM
{
103 struct list entry
; /* for listing elements */
104 DMUS_IO_SEGMENT_ITEM_HEADER header
;
105 IDirectMusicObject
* pObject
;
106 WCHAR wszName
[DMUS_MAX_NAME
];
107 } DMUS_PRIVATE_SEGMENT_ITEM
, *LPDMUS_PRIVATE_SEGMENT_ITEM
;
109 typedef struct _DMUS_PRIVATE_GRAPH_TOOL
{
110 struct list entry
; /* for listing elements */
112 IDirectMusicTool
* pTool
;
113 } DMUS_PRIVATE_GRAPH_TOOL
, *LPDMUS_PRIVATE_GRAPH_TOOL
;
115 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE
{
117 } DMUS_PRIVATE_TEMPO_PLAY_STATE
, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE
;
119 /* some sort of aux. performance channel: as far as i can understand, these are
120 used to represent a particular midi channel in particular group at particular
121 group; so all we need to do is to fill it with parent port, group and midi
123 typedef struct DMUSIC_PRIVATE_PCHANNEL_
{
124 DWORD channel
; /* map to this channel... */
125 DWORD group
; /* ... in this group ... */
126 IDirectMusicPort
*port
; /* ... at this port */
127 } DMUSIC_PRIVATE_PCHANNEL
, *LPDMUSIC_PRIVATE_PCHANNEL
;
129 /*****************************************************************************
130 * IDirectMusicPerformance8Impl implementation structure
132 struct IDirectMusicPerformance8Impl
{
133 /* IUnknown fields */
134 const IDirectMusicPerformance8Vtbl
*lpVtbl
;
137 /* IDirectMusicPerformanceImpl fields */
138 IDirectMusic8
* pDirectMusic
;
139 IDirectSound
* pDirectSound
;
140 IDirectMusicGraph
* pToolGraph
;
141 DMUS_AUDIOPARAMS pParams
;
143 /* global parameters */
145 char cMasterGrooveLevel
;
149 /* performance channels */
150 DMUSIC_PRIVATE_PCHANNEL PChannel
[1];
152 /* IDirectMusicPerformance8Impl fields */
153 IDirectMusicAudioPath
* pDefaultPath
;
154 HANDLE hNotification
;
155 REFERENCE_TIME rtMinimum
;
157 REFERENCE_TIME rtLatencyTime
;
158 DWORD dwBumperLength
;
160 /** Message Processing */
163 REFERENCE_TIME procThreadStartTime
;
164 BOOL procThreadTicStarted
;
165 CRITICAL_SECTION safe
;
166 struct DMUS_PMSGItem
* head
;
167 struct DMUS_PMSGItem
* imm_head
;
170 /*****************************************************************************
171 * IDirectMusicSegment8Impl implementation structure
173 struct IDirectMusicSegment8Impl
{
174 /* IUnknown fields */
175 const IUnknownVtbl
*UnknownVtbl
;
176 const IDirectMusicSegment8Vtbl
*SegmentVtbl
;
177 const IDirectMusicObjectVtbl
*ObjectVtbl
;
178 const IPersistStreamVtbl
*PersistStreamVtbl
;
181 /* IDirectMusicSegment8Impl fields */
182 LPDMUS_OBJECTDESC pDesc
;
183 DMUS_IO_SEGMENT_HEADER header
;
184 IDirectMusicGraph
* pGraph
;
188 /*****************************************************************************
189 * IDirectMusicSegmentState8Impl implementation structure
191 struct IDirectMusicSegmentState8Impl
{
192 /* IUnknown fields */
193 const IDirectMusicSegmentState8Vtbl
*lpVtbl
;
196 /* IDirectMusicSegmentState8Impl fields */
199 /*****************************************************************************
200 * IDirectMusicGraphImpl implementation structure
202 struct IDirectMusicGraphImpl
{
203 /* IUnknown fields */
204 const IUnknownVtbl
*UnknownVtbl
;
205 const IDirectMusicGraphVtbl
*GraphVtbl
;
206 const IDirectMusicObjectVtbl
*ObjectVtbl
;
207 const IPersistStreamVtbl
*PersistStreamVtbl
;
210 /* IDirectMusicGraphImpl fields */
211 LPDMUS_OBJECTDESC pDesc
;
216 /*****************************************************************************
217 * IDirectMusicAudioPathImpl implementation structure
219 struct IDirectMusicAudioPathImpl
{
220 /* IUnknown fields */
221 const IUnknownVtbl
*UnknownVtbl
;
222 const IDirectMusicAudioPathVtbl
*AudioPathVtbl
;
223 const IDirectMusicObjectVtbl
*ObjectVtbl
;
224 const IPersistStreamVtbl
*PersistStreamVtbl
;
227 /* IDirectMusicAudioPathImpl fields */
228 LPDMUS_OBJECTDESC pDesc
;
230 IDirectMusicPerformance8
* pPerf
;
231 IDirectMusicGraph
* pToolGraph
;
232 IDirectSoundBuffer
* pDSBuffer
;
233 IDirectSoundBuffer
* pPrimary
;
238 /*****************************************************************************
239 * IDirectMusicTool8Impl implementation structure
241 struct IDirectMusicTool8Impl
{
242 /* IUnknown fields */
243 const IDirectMusicTool8Vtbl
*lpVtbl
;
246 /* IDirectMusicTool8Impl fields */
249 /*****************************************************************************
250 * IDirectMusicPatternTrackImpl implementation structure
252 struct IDirectMusicPatternTrackImpl
{
253 /* IUnknown fields */
254 const IDirectMusicPatternTrackVtbl
*lpVtbl
;
257 /* IDirectMusicPatternTrackImpl fields */
260 /*****************************************************************************
261 * IDirectMusicLyricsTrack implementation structure
263 struct IDirectMusicLyricsTrack
265 /* IUnknown fields */
266 const IUnknownVtbl
*UnknownVtbl
;
267 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
268 const IPersistStreamVtbl
*PersistStreamVtbl
;
271 /* IDirectMusicLyricsTrack fields */
272 LPDMUS_OBJECTDESC pDesc
;
275 /*****************************************************************************
276 * IDirectMusicMarkerTrack implementation structure
278 struct IDirectMusicMarkerTrack
{
279 /* IUnknown fields */
280 const IUnknownVtbl
*UnknownVtbl
;
281 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
282 const IPersistStreamVtbl
*PersistStreamVtbl
;
285 /* IDirectMusicMarkerTrack fields */
286 LPDMUS_OBJECTDESC pDesc
;
289 /*****************************************************************************
290 * IDirectMusicParamControlTrack implementation structure
292 struct IDirectMusicParamControlTrack
{
293 /* IUnknown fields */
294 const IUnknownVtbl
*UnknownVtbl
;
295 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
296 const IPersistStreamVtbl
*PersistStreamVtbl
;
299 /* IDirectMusicParamControlTrack fields */
300 LPDMUS_OBJECTDESC pDesc
;
303 /*****************************************************************************
304 * IDirectMusicSegTriggerTrack implementation structure
306 struct IDirectMusicSegTriggerTrack
{
307 /* IUnknown fields */
308 const IUnknownVtbl
*UnknownVtbl
;
309 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
310 const IPersistStreamVtbl
*PersistStreamVtbl
;
313 /* IDirectMusicSegTriggerTrack fields */
314 LPDMUS_OBJECTDESC pDesc
;
319 /*****************************************************************************
320 * IDirectMusicSeqTrack implementation structure
322 struct IDirectMusicSeqTrack
{
323 /* IUnknown fields */
324 const IUnknownVtbl
*UnknownVtbl
;
325 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
326 const IPersistStreamVtbl
*PersistStreamVtbl
;
329 /* IDirectMusicSeqTrack fields */
330 LPDMUS_OBJECTDESC pDesc
;
333 /*****************************************************************************
334 * IDirectMusicSysExTrack implementation structure
336 struct IDirectMusicSysExTrack
{
337 /* IUnknown fields */
338 const IUnknownVtbl
*UnknownVtbl
;
339 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
340 const IPersistStreamVtbl
*PersistStreamVtbl
;
343 /* IDirectMusicSysExTrack fields */
344 LPDMUS_OBJECTDESC pDesc
;
347 /*****************************************************************************
348 * IDirectMusicTempoTrack implementation structure
350 struct IDirectMusicTempoTrack
{
351 /* IUnknown fields */
352 const IUnknownVtbl
*UnknownVtbl
;
353 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
354 const IPersistStreamVtbl
*PersistStreamVtbl
;
357 /* IDirectMusicTempoTrack fields */
358 LPDMUS_OBJECTDESC pDesc
;
363 /*****************************************************************************
364 * IDirectMusicTimeSigTrack implementation structure
366 struct IDirectMusicTimeSigTrack
{
367 /* IUnknown fields */
368 const IUnknownVtbl
*UnknownVtbl
;
369 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
370 const IPersistStreamVtbl
*PersistStreamVtbl
;
373 /* IDirectMusicTimeSigTrack fields */
374 LPDMUS_OBJECTDESC pDesc
;
377 /*****************************************************************************
378 * IDirectMusicWaveTrack implementation structure
380 struct IDirectMusicWaveTrack
{
381 /* IUnknown fields */
382 const IUnknownVtbl
*UnknownVtbl
;
383 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
384 const IPersistStreamVtbl
*PersistStreamVtbl
;
387 /* IDirectMusicWaveTrack fields */
388 LPDMUS_OBJECTDESC pDesc
;
391 /**********************************************************************
392 * Dll lifetime tracking declaration for dmime.dll
394 extern LONG DMIME_refCount
;
395 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount
); }
396 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount
); }
398 /*****************************************************************************
404 #endif /* __WINE_DMIME_PRIVATE_H */