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 IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl
;
50 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl
;
51 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl
;
52 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl
;
53 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl
;
55 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack
;
56 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack
;
57 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack
;
58 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack
;
59 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack
;
60 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack
;
61 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack
;
62 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack
;
63 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack
;
65 /*****************************************************************************
68 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
69 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
70 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
71 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
72 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID
, LPVOID
*ppobj
, LPUNKNOWN pUnkOuter
);
74 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
75 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
76 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
77 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
78 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
79 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
80 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
81 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
82 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
85 /*****************************************************************************
86 * Auxiliary definitions
88 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK
{
89 struct list entry
; /* for listing elements */
91 IDirectMusicTrack
* pTrack
;
92 } DMUS_PRIVATE_SEGMENT_TRACK
, *LPDMUS_PRIVATE_SEGMENT_TRACK
;
94 typedef struct _DMUS_PRIVATE_TEMPO_ITEM
{
95 struct list entry
; /* for listing elements */
96 DMUS_IO_TEMPO_ITEM item
;
97 } DMUS_PRIVATE_TEMPO_ITEM
, *LPDMUS_PRIVATE_TEMPO_ITEM
;
99 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM
{
100 struct list entry
; /* for listing elements */
101 DMUS_IO_SEGMENT_ITEM_HEADER header
;
102 IDirectMusicObject
* pObject
;
103 WCHAR wszName
[DMUS_MAX_NAME
];
104 } DMUS_PRIVATE_SEGMENT_ITEM
, *LPDMUS_PRIVATE_SEGMENT_ITEM
;
106 typedef struct _DMUS_PRIVATE_GRAPH_TOOL
{
107 struct list entry
; /* for listing elements */
109 IDirectMusicTool
* pTool
;
110 } DMUS_PRIVATE_GRAPH_TOOL
, *LPDMUS_PRIVATE_GRAPH_TOOL
;
112 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE
{
114 } DMUS_PRIVATE_TEMPO_PLAY_STATE
, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE
;
116 /* some sort of aux. performance channel: as far as i can understand, these are
117 used to represent a particular midi channel in particular group at particular
118 group; so all we need to do is to fill it with parent port, group and midi
120 typedef struct DMUSIC_PRIVATE_PCHANNEL_
{
121 DWORD channel
; /* map to this channel... */
122 DWORD group
; /* ... in this group ... */
123 IDirectMusicPort
*port
; /* ... at this port */
124 } DMUSIC_PRIVATE_PCHANNEL
, *LPDMUSIC_PRIVATE_PCHANNEL
;
126 /*****************************************************************************
127 * IDirectMusicPerformance8Impl implementation structure
129 struct IDirectMusicPerformance8Impl
{
130 /* IUnknown fields */
131 const IDirectMusicPerformance8Vtbl
*lpVtbl
;
134 /* IDirectMusicPerformanceImpl fields */
135 IDirectMusic8
* pDirectMusic
;
136 IDirectSound
* pDirectSound
;
137 IDirectMusicGraph
* pToolGraph
;
138 DMUS_AUDIOPARAMS pParams
;
140 /* global parameters */
142 char cMasterGrooveLevel
;
146 /* performance channels */
147 DMUSIC_PRIVATE_PCHANNEL PChannel
[32];
149 /* IDirectMusicPerformance8Impl fields */
150 IDirectMusicAudioPath
* pDefaultPath
;
151 HANDLE hNotification
;
152 REFERENCE_TIME rtMinimum
;
154 REFERENCE_TIME rtLatencyTime
;
155 DWORD dwBumperLength
;
157 /** Message Processing */
160 REFERENCE_TIME procThreadStartTime
;
161 BOOL procThreadTicStarted
;
162 CRITICAL_SECTION safe
;
163 struct DMUS_PMSGItem
* head
;
164 struct DMUS_PMSGItem
* imm_head
;
167 /*****************************************************************************
168 * IDirectMusicSegment8Impl implementation structure
170 struct IDirectMusicSegment8Impl
{
171 /* IUnknown fields */
172 const IUnknownVtbl
*UnknownVtbl
;
173 const IDirectMusicSegment8Vtbl
*SegmentVtbl
;
174 const IDirectMusicObjectVtbl
*ObjectVtbl
;
175 const IPersistStreamVtbl
*PersistStreamVtbl
;
178 /* IDirectMusicSegment8Impl fields */
179 LPDMUS_OBJECTDESC pDesc
;
180 DMUS_IO_SEGMENT_HEADER header
;
181 IDirectMusicGraph
* pGraph
;
185 /*****************************************************************************
186 * IDirectMusicSegmentState8Impl implementation structure
188 struct IDirectMusicSegmentState8Impl
{
189 /* IUnknown fields */
190 const IDirectMusicSegmentState8Vtbl
*lpVtbl
;
193 /* IDirectMusicSegmentState8Impl fields */
196 /*****************************************************************************
197 * IDirectMusicGraphImpl implementation structure
199 struct IDirectMusicGraphImpl
{
200 /* IUnknown fields */
201 const IUnknownVtbl
*UnknownVtbl
;
202 const IDirectMusicGraphVtbl
*GraphVtbl
;
203 const IDirectMusicObjectVtbl
*ObjectVtbl
;
204 const IPersistStreamVtbl
*PersistStreamVtbl
;
207 /* IDirectMusicGraphImpl fields */
208 LPDMUS_OBJECTDESC pDesc
;
213 /*****************************************************************************
214 * IDirectMusicAudioPathImpl implementation structure
216 struct IDirectMusicAudioPathImpl
{
217 /* IUnknown fields */
218 const IUnknownVtbl
*UnknownVtbl
;
219 const IDirectMusicAudioPathVtbl
*AudioPathVtbl
;
220 const IDirectMusicObjectVtbl
*ObjectVtbl
;
221 const IPersistStreamVtbl
*PersistStreamVtbl
;
224 /* IDirectMusicAudioPathImpl fields */
225 LPDMUS_OBJECTDESC pDesc
;
227 IDirectMusicPerformance8
* pPerf
;
228 IDirectMusicGraph
* pToolGraph
;
229 IDirectSoundBuffer
* pDSBuffer
;
230 IDirectSoundBuffer
* pPrimary
;
235 /*****************************************************************************
236 * IDirectMusicLyricsTrack implementation structure
238 struct IDirectMusicLyricsTrack
240 /* IUnknown fields */
241 const IUnknownVtbl
*UnknownVtbl
;
242 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
243 const IPersistStreamVtbl
*PersistStreamVtbl
;
246 /* IDirectMusicLyricsTrack fields */
247 LPDMUS_OBJECTDESC pDesc
;
250 /*****************************************************************************
251 * IDirectMusicMarkerTrack implementation structure
253 struct IDirectMusicMarkerTrack
{
254 /* IUnknown fields */
255 const IUnknownVtbl
*UnknownVtbl
;
256 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
257 const IPersistStreamVtbl
*PersistStreamVtbl
;
260 /* IDirectMusicMarkerTrack fields */
261 LPDMUS_OBJECTDESC pDesc
;
264 /*****************************************************************************
265 * IDirectMusicParamControlTrack implementation structure
267 struct IDirectMusicParamControlTrack
{
268 /* IUnknown fields */
269 const IUnknownVtbl
*UnknownVtbl
;
270 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
271 const IPersistStreamVtbl
*PersistStreamVtbl
;
274 /* IDirectMusicParamControlTrack fields */
275 LPDMUS_OBJECTDESC pDesc
;
278 /*****************************************************************************
279 * IDirectMusicSegTriggerTrack implementation structure
281 struct IDirectMusicSegTriggerTrack
{
282 /* IUnknown fields */
283 const IUnknownVtbl
*UnknownVtbl
;
284 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
285 const IPersistStreamVtbl
*PersistStreamVtbl
;
288 /* IDirectMusicSegTriggerTrack fields */
289 LPDMUS_OBJECTDESC pDesc
;
294 /*****************************************************************************
295 * IDirectMusicSeqTrack implementation structure
297 struct IDirectMusicSeqTrack
{
298 /* IUnknown fields */
299 const IUnknownVtbl
*UnknownVtbl
;
300 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
301 const IPersistStreamVtbl
*PersistStreamVtbl
;
304 /* IDirectMusicSeqTrack fields */
305 LPDMUS_OBJECTDESC pDesc
;
308 /*****************************************************************************
309 * IDirectMusicSysExTrack implementation structure
311 struct IDirectMusicSysExTrack
{
312 /* IUnknown fields */
313 const IUnknownVtbl
*UnknownVtbl
;
314 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
315 const IPersistStreamVtbl
*PersistStreamVtbl
;
318 /* IDirectMusicSysExTrack fields */
319 LPDMUS_OBJECTDESC pDesc
;
322 /*****************************************************************************
323 * IDirectMusicTempoTrack implementation structure
325 struct IDirectMusicTempoTrack
{
326 /* IUnknown fields */
327 const IUnknownVtbl
*UnknownVtbl
;
328 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
329 const IPersistStreamVtbl
*PersistStreamVtbl
;
332 /* IDirectMusicTempoTrack fields */
333 LPDMUS_OBJECTDESC pDesc
;
338 /*****************************************************************************
339 * IDirectMusicTimeSigTrack implementation structure
341 struct IDirectMusicTimeSigTrack
{
342 /* IUnknown fields */
343 const IUnknownVtbl
*UnknownVtbl
;
344 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
345 const IPersistStreamVtbl
*PersistStreamVtbl
;
348 /* IDirectMusicTimeSigTrack fields */
349 LPDMUS_OBJECTDESC pDesc
;
352 /*****************************************************************************
353 * IDirectMusicWaveTrack implementation structure
355 struct IDirectMusicWaveTrack
{
356 /* IUnknown fields */
357 const IUnknownVtbl
*UnknownVtbl
;
358 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
359 const IPersistStreamVtbl
*PersistStreamVtbl
;
362 /* IDirectMusicWaveTrack fields */
363 LPDMUS_OBJECTDESC pDesc
;
366 /**********************************************************************
367 * Dll lifetime tracking declaration for dmime.dll
369 extern LONG DMIME_refCount
;
370 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount
); }
371 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount
); }
373 /*****************************************************************************
379 #endif /* __WINE_DMIME_PRIVATE_H */