ReactOS 0.4.16-dev-250-g3ecd236
dmusicks.h
Go to the documentation of this file.
1#ifndef _DMUSICKS_
2#define _DMUSICKS_
3
4#include <dmusprop.h>
5
6#define DONT_HOLD_FOR_SEQUENCING 0x8000000000000000
7
8#ifndef REFERENCE_TIME
10#endif
11
12typedef struct _DMUS_KERNEL_EVENT {
21 union {
22 BYTE abData[sizeof(PBYTE)];
27
28typedef enum {
34
35DEFINE_GUID(CLSID_MiniportDriverDMusUART, 0xd3f0ce1c, 0xFFFC, 0x11D1, 0x81, 0xB0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1);
36DEFINE_GUID(CLSID_MiniportDriverDMusUARTCapture, 0xD3F0CE1D, 0xFFFC, 0x11D1, 0x81, 0xB0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1);
37
38/* ===============================================================
39 IMasterClock Interface
40*/
41
42#undef INTERFACE
43#define INTERFACE IMasterClock
44
47
50 ) PURE;
51};
52
53typedef IMasterClock *PMASTERCLOCK;
54
55#define IMP_IMasterClock \
56 STDMETHODIMP_(NTSTATUS) GetTime( \
57 _Out_ REFERENCE_TIME *pTime \
58 )
59
60/* ===============================================================
61 IMXF Interface
62*/
63
64#undef INTERFACE
65#define INTERFACE IMXF
66
67struct IMXF;
68typedef struct IMXF *PMXF;
69
70#define DEFINE_ABSTRACT_IMXF() \
71 STDMETHOD_(NTSTATUS,SetState)(THIS_ \
72 _In_ KSSTATE State \
73 ) PURE; \
74 STDMETHOD_(NTSTATUS,PutMessage)(THIS_ \
75 _In_ PDMUS_KERNEL_EVENT pDMKEvt \
76 ) PURE; \
77 STDMETHOD_(NTSTATUS,ConnectOutput)(THIS_ \
78 _In_ PMXF sinkMXF \
79 ) PURE; \
80 STDMETHOD_(NTSTATUS,DisconnectOutput)(THIS_ \
81 _In_ PMXF sinkMXF \
82 ) PURE;
83
84#define IMP_IMXF \
85 STDMETHODIMP_(NTSTATUS) SetState ( \
86 _In_ KSSTATE State); \
87 STDMETHODIMP_(NTSTATUS) PutMessage (THIS_ \
88 _In_ PDMUS_KERNEL_EVENT pDMKEvt); \
89 STDMETHODIMP_(NTSTATUS) ConnectOutput (THIS_ \
90 _In_ PMXF sinkMXF); \
91 STDMETHODIMP_(NTSTATUS) DisconnectOutput (THIS_ \
92 _In_ PMXF sinkMXF)
93
97};
98
99/* ===============================================================
100 IAllocatorMXF Interface
101*/
102
103#undef INTERFACE
104#define INTERFACE IAllocatorMXF
105
106struct IAllocatorMXF;
107typedef struct IAllocatorMXF *PAllocatorMXF;
108
109#define STATIC_IID_IAllocatorMXF\
110 0xa5f0d62c, 0xb30f, 0x11d2, {0xb7, 0xa3, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1}
111DEFINE_GUIDSTRUCT("a5f0d62c-b30f-11d2-b7a3-0060083316c1", IID_IAllocatorMXF);
112#define IID_IAllocatorMXF DEFINE_GUIDNAMED(IID_IAllocatorMXF)
113
114
115DECLARE_INTERFACE_(IAllocatorMXF, IMXF) {
117
119
121 _Out_ PDMUS_KERNEL_EVENT *ppDMKEvt
122 ) PURE;
123
124 STDMETHOD_(USHORT,GetBufferSize)(THIS) PURE;
125
127 _Outptr_result_bytebuffer_(_Inexpressible_(GetBufferSize bytes)) PBYTE *ppBuffer
128 )PURE;
129
130 STDMETHOD_(NTSTATUS,PutBuffer)(THIS_
132 ) PURE;
133};
134
135#define IMP_IAllocatorMXF \
136 IMP_IMXF; \
137 STDMETHODIMP_(NTSTATUS) GetMessage( \
138 _Out_ PDMUS_KERNEL_EVENT *ppDMKEvt); \
139 \
140 STDMETHODIMP_(USHORT) GetBufferSize(void); \
141 \
142 STDMETHODIMP_(NTSTATUS) GetBuffer( \
143 _Outptr_result_bytebuffer_(_Inexpressible_(GetBufferSize bytes)) \
144 PBYTE *ppBuffer); \
145 \
146 STDMETHODIMP_(NTSTATUS) PutBuffer( \
147 _In_ PBYTE pBuffer)
148
149#undef INTERFACE
150#define INTERFACE IPortDMus
151
152DEFINE_GUID(IID_IPortDMus, 0xc096df9c, 0xfb09, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
153DEFINE_GUID(CLSID_PortDMus, 0xb7902fe9, 0xfb0a, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
154
155DECLARE_INTERFACE_(IPortDMus, IPort) {
157
159
161 _In_opt_ PSERVICEGROUP ServiceGroup
162 ) PURE;
163
164 STDMETHOD_(void,RegisterServiceGroup)(THIS_
165 _In_ PSERVICEGROUP ServiceGroup
166 ) PURE;
167};
168typedef IPortDMus *PPORTDMUS;
169
170#define IMP_IPortDMus \
171 IMP_IPort; \
172 STDMETHODIMP_(void) Notify( \
173 _In_opt_ PSERVICEGROUP ServiceGroup); \
174 \
175 STDMETHODIMP_(void) RegisterServiceGroup( \
176 _In_ PSERVICEGROUP ServiceGroup)
177
178#undef INTERFACE
179#define INTERFACE IMiniportDMus
180
181DEFINE_GUID(IID_IMiniportDMus, 0xc096df9d, 0xfb09, 0x11d1, 0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
182
183DECLARE_INTERFACE_(IMiniportDMus, IMiniport) {
185
187
189 _In_opt_ PUNKNOWN UnknownAdapter,
192 _Out_ PSERVICEGROUP *ServiceGroup
193 ) PURE;
194
196
197 STDMETHOD_(NTSTATUS,NewStream)(THIS_
198 _Out_ PMXF *MXF,
199 _In_opt_ PUNKNOWN OuterUnknown,
201 _In_ ULONG PinID,
202 _In_ DMUS_STREAM_TYPE StreamType,
204 _Out_ PSERVICEGROUP *ServiceGroup,
205 _In_ PAllocatorMXF AllocatorMXF,
207 _Out_ PULONGLONG SchedulePreFetch
208 ) PURE;
209};
210
211typedef IMiniportDMus *PMINIPORTDMUS;
212#undef INTERFACE
213
214#define IMP_IMiniportDMus \
215 IMP_IMiniport; \
216 STDMETHODIMP_(NTSTATUS) Init( \
217 _In_opt_ PUNKNOWN UnknownAdapter, \
218 _In_ PRESOURCELIST ResourceList, \
219 _In_ PPORTDMUS Port, \
220 _Out_ PSERVICEGROUP *ServiceGroup); \
221 \
222 STDMETHODIMP_(void) Service(THIS); \
223 \
224 STDMETHODIMP_(NTSTATUS) NewStream( \
225 _Out_ PMXF *MXF, \
226 _In_opt_ PUNKNOWN OuterUnknown, \
227 _In_ POOL_TYPE PoolType, \
228 _In_ ULONG PinID, \
229 _In_ DMUS_STREAM_TYPE StreamType, \
230 _In_ PKSDATAFORMAT DataFormat, \
231 _Out_ PSERVICEGROUP *ServiceGroup, \
232 _In_ PAllocatorMXF AllocatorMXF, \
233 _In_ PMASTERCLOCK MasterClock, \
234 _Out_ PULONGLONG SchedulePreFetch)
235
236
237#define STATIC_KSAUDFNAME_DMUSIC_MPU_OUT\
238 0xA4DF0EB5, 0xBAC9, 0x11d2, {0xB7, 0xA8, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1}
239DEFINE_GUIDSTRUCT("A4DF0EB5-BAC9-11d2-B7A8-0060083316C1", KSAUDFNAME_DMUSIC_MPU_OUT);
240#define KSAUDFNAME_DMUSIC_MPU_OUT DEFINE_GUIDNAMED(KSAUDFNAME_DMUSIC_MPU_OUT)
241
242#define STATIC_KSAUDFNAME_DMUSIC_MPU_IN\
243 0xB2EC0A7D, 0xBAC9, 0x11d2, {0xB7, 0xA8, 0x00, 0x60, 0x08, 0x33, 0x16, 0xC1}
244DEFINE_GUIDSTRUCT("B2EC0A7D-BAC9-11d2-B7A8-0060083316C1", KSAUDFNAME_DMUSIC_MPU_IN);
245#define KSAUDFNAME_DMUSIC_MPU_IN DEFINE_GUIDNAMED(KSAUDFNAME_DMUSIC_MPU_IN)
246
247#define STATIC_IID_IMXF\
248 0xc096df9e, 0xfb09, 0x11d1, {0x81, 0xb0, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1}
249DEFINE_GUIDSTRUCT("c096df9e-fb09-11d1-81b0-0060083316c1", IID_IMXF);
250#define IID_IMXF DEFINE_GUIDNAMED(IID_IMXF)
251
252#define DMUS_KEF_EVENT_COMPLETE 0x0000
253#define DMUS_KEF_EVENT_INCOMPLETE 0x0001
254#define DMUS_KEF_PACKAGE_EVENT 0x0002
255#define kBytePositionNone (~(ULONGLONG)0)
256
257#define SHORT_EVT(evt) ((evt)->cbEvent <= sizeof(PBYTE))
258#define PACKAGE_EVT(evt) ((evt)->usFlags & DMUS_KEF_PACKAGE_EVENT)
259#define INCOMPLETE_EVT(evt) ((evt)->usFlags & DMUS_KEF_EVENT_INCOMPLETE)
260#define COMPLETE_EVT(evt) (((evt)->usFlags & DMUS_KEF_EVENT_INCOMPLETE) == 0)
261
262#define SET_INCOMPLETE_EVT(evt) ((evt)->usFlags |= DMUS_KEF_EVENT_INCOMPLETE)
263#define SET_COMPLETE_EVT(evt) ((evt)->usFlags &= (~DMUS_KEF_EVENT_INCOMPLETE))
264#define SET_PACKAGE_EVT(evt) ((evt)->usFlags |= DMUS_KEF_PACKAGE_EVENT)
265#define CLEAR_PACKAGE_EVT(evt) ((evt)->usFlags &= (~DMUS_KEF_PACKAGE_EVENT))
266
267#endif /* _DMUSICKS_ */
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
LONG NTSTATUS
Definition: precomp.h:26
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define IID_IMXF
Definition: dmusicks.h:250
IPortDMus * PPORTDMUS
Definition: dmusicks.h:168
#define KSAUDFNAME_DMUSIC_MPU_OUT
Definition: dmusicks.h:240
#define DEFINE_ABSTRACT_IMXF()
Definition: dmusicks.h:70
struct _DMUS_KERNEL_EVENT * PDMUS_KERNEL_EVENT
struct IAllocatorMXF * PAllocatorMXF
Definition: dmusicks.h:107
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
struct IMXF * PMXF
Definition: dmusicks.h:68
#define IID_IAllocatorMXF
Definition: dmusicks.h:112
IMiniportDMus * PMINIPORTDMUS
Definition: dmusicks.h:211
struct _DMUS_KERNEL_EVENT DMUS_KERNEL_EVENT
IMasterClock * PMASTERCLOCK
Definition: dmusicks.h:53
DMUS_STREAM_TYPE
Definition: dmusicks.h:28
@ DMUS_STREAM_MIDI_RENDER
Definition: dmusicks.h:30
@ DMUS_STREAM_MIDI_CAPTURE
Definition: dmusicks.h:31
@ DMUS_STREAM_WAVE_SINK
Definition: dmusicks.h:32
@ DMUS_STREAM_MIDI_INVALID
Definition: dmusicks.h:29
#define KSAUDFNAME_DMUSIC_MPU_IN
Definition: dmusicks.h:245
return pMemory GetBuffer()
CPPORT Port[4]
Definition: headless.c:35
#define DEFINE_GUIDSTRUCT(guid, name)
Definition: ks.h:98
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
#define GetTime(fmt)
Definition: lcformat.c:111
#define _Outptr_result_bytebuffer_(s)
Definition: no_sal2.h:288
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:391
@ Service
Definition: ntsecapi.h:292
BYTE * PBYTE
Definition: pedump.c:66
unsigned short USHORT
Definition: pedump.c:61
static PHARDWARE_TIMER MasterClock
Definition: pit.c:28
IResourceList * PRESOURCELIST
Definition: portcls.h:442
#define DEFINE_ABSTRACT_PORT()
Definition: portcls.h:1047
#define DEFINE_ABSTRACT_MINIPORT()
Definition: portcls.h:1279
IServiceGroup * PSERVICEGROUP
Definition: portcls.h:614
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
PVOID pBuffer
struct _DMUS_KERNEL_EVENT * pPackageEvt
Definition: dmusicks.h:24
struct _DMUS_KERNEL_EVENT * pNextEvt
Definition: dmusicks.h:20
BYTE abData[sizeof(PBYTE)]
Definition: dmusicks.h:22
union _DMUS_KERNEL_EVENT::@1936 uData
USHORT usChannelGroup
Definition: dmusicks.h:16
REFERENCE_TIME ullPresTime100ns
Definition: dmusicks.h:18
ULONGLONG ullBytePosition
Definition: dmusicks.h:19
INT POOL_TYPE
Definition: typedefs.h:78
int64_t LONGLONG
Definition: typedefs.h:68
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
_In_ PCCERT_CONTEXT _In_opt_ LPFILETIME pTime
Definition: wincrypt.h:4837
#define GetMessage
Definition: winuser.h:5802
unsigned char BYTE
Definition: xxhash.c:193