ReactOS 0.4.15-dev-8119-g4fb2fdb
mmebuddy.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Sound System "MME Buddy" Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: include/reactos/libs/sound/mmebuddy.h
5 *
6 * PURPOSE: Header for the "MME Buddy" helper library (located in
7 * lib/drivers/sound/mmebuddy)
8 *
9 * PROGRAMMERS: Andrew Greenwood (silverblade@reactos.org)
10 *
11 * HISTORY: 4 July 2008 - Created
12 * 31 Dec 2008 - Split off NT4-specific code into a separate library
13 *
14 * NOTES: MME Buddy was the best name I could come up with...
15 * The structures etc. here should be treated as internal to the
16 * library so should not be directly accessed elsewhere. Perhaps they
17 * can be moved to an internal header?
18*/
19
20#ifndef ROS_AUDIO_MMEBUDDY_H
21#define ROS_AUDIO_MMEBUDDY_H
22
23/*
24 Some memory allocation helper macros
25*/
26
27#define AllocateStruct(thing) \
28 (thing*) AllocateMemory(sizeof(thing))
29
30#define StringLengthToBytes(chartype, string_length) \
31 ( ( string_length + 1 ) * sizeof(chartype) )
32
33#define AllocateWideString(string_length) \
34 (PWSTR) AllocateMemory(StringLengthToBytes(WCHAR, string_length))
35
36#define ZeroWideString(string) \
37 ZeroMemory(string, StringLengthToBytes(WCHAR, wcslen(string)))
38
39#define CopyWideString(dest, source) \
40 CopyMemory(dest, source, StringLengthToBytes(WCHAR, wcslen(source)))
41
42
43/*
44 Helps find the minimum/maximum of two values
45*/
46
47#define MinimumOf(value_a, value_b) \
48 ( value_a < value_b ? value_a : value_b )
49
50#define MaximumOf(value_a, value_b) \
51 ( value_a > value_b ? value_a : value_b )
52
53
54/*
55 Convert a device type into a zero-based array index
56*/
57
58#define SOUND_DEVICE_TYPE_TO_INDEX(x) \
59 ( x - MIN_SOUND_DEVICE_TYPE )
60
61#define INDEX_TO_SOUND_DEVICE_TYPE(x) \
62 ( x + MIN_SOUND_DEVICE_TYPE )
63
64
65/*
66 Validation
67*/
68
69#define IsValidSoundDeviceType IS_VALID_SOUND_DEVICE_TYPE
70
71#define VALIDATE_MMSYS_PARAMETER(parameter_condition) \
72 { \
73 if ( ! (parameter_condition) ) \
74 { \
75 SND_ERR(L"FAILED parameter check: %hS at File %S Line %lu\n", #parameter_condition, __FILE__, __LINE__); \
76 return MMSYSERR_INVALPARAM; \
77 } \
78 }
79
80#define MMSUCCESS(result) \
81 ( result == MMSYSERR_NOERROR )
82
83
84/*
85 Types and Structures
86*/
87
89struct _SOUND_DEVICE;
91
92
93#define DEFINE_GETCAPS_FUNCTYPE(func_typename, caps_type) \
94 typedef MMRESULT (*func_typename)( \
95 IN struct _SOUND_DEVICE* SoundDevice, \
96 IN DWORD DeviceId, \
97 OUT caps_type Capabilities, \
98 IN DWORD CapabilitiesSize);
99
100/* This one is for those of us who don't care */
102
103/* These are for those of us that do */
105DEFINE_GETCAPS_FUNCTYPE(MMGETWAVEINCAPS_FUNC, LPWAVEINCAPS );
107DEFINE_GETCAPS_FUNCTYPE(MMGETMIDIINCAPS_FUNC, LPMIDIINCAPS );
108
109struct _SOUND_DEVICE;
111
112
113/*
114 By extending the OVERLAPPED structure, it becomes possible to provide the
115 I/O completion routines with additional information.
116*/
117
118typedef struct _SOUND_OVERLAPPED
119{
123
126
128
130 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
131 IN PVOID OffsetPtr,
132 IN DWORD Bytes,
133 IN PSOUND_OVERLAPPED Overlap,
135
137 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
138 IN DWORD DeviceId,
139 IN UINT uMsg,
141 IN DWORD Flags);
142
144 IN struct _SOUND_DEVICE* Device,
145 IN PWAVEFORMATEX WaveFormat,
146 IN DWORD WaveFormatSize);
147
150 IN DWORD DeviceId,
151 IN PWAVEFORMATEX WaveFormat,
152 IN DWORD WaveFormatSize);
153
155 IN struct _SOUND_DEVICE* SoundDevice,
156 OUT PVOID* Handle);
157
159 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
160 IN PVOID Handle); /* not sure about this */
161
163 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
164 IN PWAVEHDR WaveHeader);
165
167 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
169 IN DWORD Length);
170
172 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
173 IN MMTIME* Time);
174
175
177 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
178 IN BOOL bStart);
179
180
183 IN DWORD DeviceId,
185 IN DWORD InterfaceLength,
186 OUT DWORD * InterfaceSize);
187
189 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
191 IN BOOLEAN bStartReset);
192
193typedef struct _MMFUNCTION_TABLE
194{
195 union
196 {
197 MMGETCAPS_FUNC GetCapabilities;
198 MMGETWAVEOUTCAPS_FUNC GetWaveOutCapabilities;
199 MMGETWAVEINCAPS_FUNC GetWaveInCapabilities;
200 MMGETMIDIOUTCAPS_FUNC GetMidiOutCapabilities;
201 MMGETMIDIINCAPS_FUNC GetMidiInCapabilities;
202 };
203
206
209
211
213
218
219 // Redundant
220 //MMWAVEHEADER_FUNC PrepareWaveHeader;
221 //MMWAVEHEADER_FUNC UnprepareWaveHeader;
222 //MMWAVEHEADER_FUNC WriteWaveHeader;
223
224 //MMWAVEHEADER_FUNC SubmitWaveHeaderToDevice;
225 //MMBUFFER_FUNC CompleteBuffer;
227
228
229
231 IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance,
233
234typedef struct _SOUND_THREAD
235{
238
239 struct
240 {
245
246 struct
247 {
254
255typedef struct _SOUND_DEVICE
256{
261 PVOID Identifier; /* Path for NT4 drivers */
262 /*PWSTR Path;*/
265
267{
272
273 /* Stuff generously donated to us from WinMM */
274 struct
275 {
276 HDRVR Handle;
281
282 /* DO NOT TOUCH THESE OUTSIDE OF THE SOUND THREAD */
283
284 union
285 {
287 };
288
289 union
290 {
292 };
293
295 //PWAVEHDR CurrentWaveHeader;
307
308/* This lives in WAVEHDR.reserved */
309typedef struct _WAVEHDR_EXTENSION
310{
314
315
316/*
317 reentrancy.c
318*/
319
322
323VOID
325
326VOID
329
330VOID
333
334
335/*
336 mme.c
337*/
338
339VOID
341 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
344
348 IN DWORD DeviceId,
350 IN DWORD CapabilitiesSize);
351
355 IN UINT DeviceId,
356 IN LPWAVEOPENDESC OpenParameters,
357 IN DWORD Flags,
358 OUT DWORD_PTR* PrivateHandle);
359
362 IN DWORD_PTR PrivateHandle);
363
367 IN DWORD DeviceId,
368 IN DWORD_PTR PrivateHandle,
369 IN MMTIME* Time,
370 IN DWORD Size);
371
375 IN DWORD DeviceId,
377 IN DWORD InterfaceLength,
378 OUT DWORD * InterfaceSize);
379
380
383 IN DWORD_PTR PrivateHandle,
384 IN BOOL bStart);
385
386
387#define MmePrepareWaveHeader(private_handle, header) \
388 PrepareWaveHeader((PSOUND_DEVICE_INSTANCE)private_handle, (PWAVEHDR)header)
389
390#define MmeUnprepareWaveHeader(private_handle, header) \
391 UnprepareWaveHeader((PSOUND_DEVICE_INSTANCE)private_handle, (PWAVEHDR)header)
392
393#define MmeWriteWaveHeader(private_handle, header) \
394 WriteWaveHeader((PSOUND_DEVICE_INSTANCE)private_handle, (PWAVEHDR)header)
395
398 IN DWORD_PTR PrivateHandle);
399
400
401/*
402 capabilities.c
403*/
404
407 IN PSOUND_DEVICE SoundDevice,
408 IN DWORD DeviceId,
410 IN DWORD CapabilitiesSize);
411
412
413/*
414 devicelist.c
415*/
416
417ULONG
420
423 IN PSOUND_DEVICE SoundDevice);
424
429 OUT PSOUND_DEVICE* SoundDevice OPTIONAL);
430
434 IN PSOUND_DEVICE SoundDevice);
435
439
440VOID
442
446 IN DWORD DeviceIndex,
448
451 IN PSOUND_DEVICE SoundDevice,
453
456 IN PSOUND_DEVICE SoundDevice,
458
459
460/*
461 functiontable.c
462*/
463
466 IN PSOUND_DEVICE SoundDevice,
468
471 IN PSOUND_DEVICE SoundDevice,
473
474
475/*
476 deviceinstance.c
477*/
478
481 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance);
482
485 IN PSOUND_DEVICE SoundDevice,
486 OUT PSOUND_DEVICE_INSTANCE* SoundDeviceInstance);
487
490 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance);
491
494 IN PSOUND_DEVICE SoundDevice);
495
498 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
499 OUT PSOUND_DEVICE* SoundDevice);
500
503 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
504 OUT PVOID* Handle);
505
508 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
509 IN HDRVR MmeHandle,
510 IN DWORD_PTR ClientCallback,
511 IN DWORD_PTR ClientCallbackData,
512 IN DWORD Flags);
513
514
515/*
516 thread.c
517*/
518
522
526
529 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
532
533
534/*
535 utility.c
536*/
537
538PVOID
540 IN UINT Size);
541
542VOID
544 IN PVOID Pointer);
545
546UINT
548
549UINT
551 IN UINT Number);
552
556
560
561
562/*
563 wave/format.c
564*/
565
568 IN PSOUND_DEVICE SoundDevice,
570 IN DWORD FormatSize);
571
574 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
575 IN DWORD DeviceId,
577 IN DWORD FormatSize);
578
579
580/*
581 wave/header.c
582*/
583
586 PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
588
589VOID
591 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
593
596 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
598
601 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
603
606 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
608
609
610/*
611 wave/streaming.c
612*/
613
614VOID
616 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance);
617
620 IN DWORD dwErrorCode,
621 IN DWORD dwNumberOfBytesTransferred,
623
626 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
628 IN WAVE_COMMIT_FUNC CommitFunction);
629
632 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
633 IN PVOID OffsetPtr,
635 IN PSOUND_OVERLAPPED Overlap,
637
640 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance);
641
642VOID
644 IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance);
645
646/*
647 kernel.c
648*/
649
652 IN PWSTR DevicePath,
655
658 IN PSOUND_DEVICE SoundDevice,
661
665
668 IN HANDLE SoundDeviceInstance,
670 IN LPVOID InBuffer,
675
676
677#endif
unsigned char BOOLEAN
@ Identifier
Definition: asmpp.cpp:95
Definition: bufpool.h:45
Definition: Header.h:9
#define CALLBACK
Definition: compat.h:35
static const WCHAR Message[]
Definition: register.c:74
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
ULONG Handle
Definition: gdb_input.c:15
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
_In_ UINT Bytes
Definition: mmcopy.h:9
DeviceType
Definition: mmdrv.h:42
struct _WAVEHDR_EXTENSION * PWAVEHDR_EXTENSION
struct _MMFUNCTION_TABLE MMFUNCTION_TABLE
MMRESULT(* MMSETSTATE_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN BOOL bStart)
Definition: mmebuddy.h:176
MMRESULT UnlistSoundDevice(IN MMDEVICE_TYPE DeviceType, IN PSOUND_DEVICE SoundDevice)
Definition: devicelist.c:188
BOOLEAN IsValidSoundDevice(IN PSOUND_DEVICE SoundDevice)
Definition: devicelist.c:87
MMRESULT DestroyAllSoundDeviceInstances(IN PSOUND_DEVICE SoundDevice)
MMRESULT ListSoundDevice(IN MMDEVICE_TYPE DeviceType, IN PVOID Identifier OPTIONAL, OUT PSOUND_DEVICE *SoundDevice OPTIONAL)
Definition: devicelist.c:131
MMRESULT MmeOpenDevice(IN MMDEVICE_TYPE DeviceType, IN UINT DeviceId, IN LPWAVEOPENDESC OpenParameters, IN DWORD Flags, OUT DWORD_PTR *PrivateHandle)
Definition: mmewrap.c:132
MMRESULT WriteFileEx_Committer(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID OffsetPtr, IN DWORD Length, IN PSOUND_OVERLAPPED Overlap, IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine)
Definition: streaming.c:264
MMRESULT CreateSoundThread(OUT PSOUND_THREAD *Thread)
Definition: thread.c:209
MMRESULT(* MMGETPOS_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMTIME *Time)
Definition: mmebuddy.h:171
MMRESULT MmeCloseDevice(IN DWORD_PTR PrivateHandle)
Definition: mmewrap.c:225
struct _SOUND_DEVICE_INSTANCE * PSOUND_DEVICE_INSTANCE
MMRESULT(* MMOPEN_FUNC)(IN struct _SOUND_DEVICE *SoundDevice, OUT PVOID *Handle)
Definition: mmebuddy.h:154
MMRESULT(* MMWAVESETFORMAT_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *Instance, IN DWORD DeviceId, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
Definition: mmebuddy.h:148
VOID DoWaveStreaming(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance)
Definition: streaming.c:19
struct _SOUND_OVERLAPPED * PSOUND_OVERLAPPED
MMRESULT(* MMCLOSE_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID Handle)
Definition: mmebuddy.h:158
VOID AcquireEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:75
ULONG GetSoundDeviceCount(IN MMDEVICE_TYPE DeviceType)
Definition: devicelist.c:67
MMRESULT OpenKernelSoundDeviceByName(IN PWSTR DevicePath, IN BOOLEAN ReadOnly, OUT PHANDLE Handle)
Definition: kernel.c:23
MMRESULT CallSoundThread(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN SOUND_THREAD_REQUEST_HANDLER RequestHandler, IN PVOID Parameter OPTIONAL)
Definition: thread.c:71
MMRESULT MmeGetDeviceInterfaceString(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
Definition: mmewrap.c:294
MMRESULT SetSoundDeviceInstanceMmeData(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN HDRVR MmeHandle, IN DWORD_PTR ClientCallback, IN DWORD_PTR ClientCallbackData, IN DWORD Flags)
MMRESULT EnqueueWaveHeader(PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID Parameter)
Definition: header.c:218
PVOID AllocateMemory(IN UINT Size)
Definition: utility.c:20
MMRESULT MmeGetPosition(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN DWORD_PTR PrivateHandle, IN MMTIME *Time, IN DWORD Size)
Definition: mmewrap.c:327
VOID InitiateSoundStreaming(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance)
Definition: streaming.c:409
MMRESULT GetSoundDeviceCapabilities(IN PSOUND_DEVICE SoundDevice, IN DWORD DeviceId, OUT PVOID Capabilities, IN DWORD CapabilitiesSize)
Definition: capabilities.c:24
MMRESULT GetSoundDeviceFunctionTable(IN PSOUND_DEVICE SoundDevice, OUT PMMFUNCTION_TABLE *FunctionTable)
Definition: functiontable.c:47
MMRESULT MmeSetState(IN DWORD_PTR PrivateHandle, IN BOOL bStart)
Definition: mmewrap.c:19
MMRESULT(* WAVE_COMMIT_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID OffsetPtr, IN DWORD Bytes, IN PSOUND_OVERLAPPED Overlap, IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine)
Definition: mmebuddy.h:129
VOID NotifyMmeClient(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN UINT Message, IN DWORD_PTR Parameter)
Definition: mmewrap.c:75
struct _SOUND_THREAD * PSOUND_THREAD
MMRESULT MmeResetWavePlayback(IN DWORD_PTR PrivateHandle)
Definition: mmewrap.c:280
MMRESULT SetWaveDeviceFormat(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN DWORD DeviceId, IN LPWAVEFORMATEX Format, IN DWORD FormatSize)
Definition: format.c:49
struct _SOUND_DEVICE * PSOUND_DEVICE
MMRESULT StopStreaming(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance)
Definition: streaming.c:360
MMRESULT CommitWaveHeaderToKernelDevice(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PWAVEHDR Header, IN WAVE_COMMIT_FUNC CommitFunction)
MMRESULT SetSoundDeviceFunctionTable(IN PSOUND_DEVICE SoundDevice, IN PMMFUNCTION_TABLE FunctionTable)
Definition: functiontable.c:21
MMRESULT(* MMQUERYDEVICEINTERFACESTRING_FUNC)(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
Definition: mmebuddy.h:181
MMRESULT UnlistSoundDevices(IN MMDEVICE_TYPE DeviceType)
Definition: devicelist.c:245
MMRESULT WriteWaveHeader(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PWAVEHDR Header)
Definition: header.c:159
UCHAR MMDEVICE_TYPE
Definition: mmebuddy.h:88
MMRESULT SyncOverlappedDeviceIoControl(IN HANDLE SoundDeviceInstance, IN DWORD IoControlCode, IN LPVOID InBuffer, IN DWORD InBufferSize, OUT LPVOID OutBuffer, IN DWORD OutBufferSize, OUT LPDWORD BytesTransferred OPTIONAL)
Definition: misc.c:298
MMRESULT GetSoundDeviceFromInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, OUT PSOUND_DEVICE *SoundDevice)
MMRESULT CloseKernelSoundDevice(IN HANDLE Handle)
Definition: kernel.c:58
MMRESULT DestroySoundThread(IN PSOUND_THREAD Thread)
Definition: thread.c:272
struct _MMFUNCTION_TABLE * PMMFUNCTION_TABLE
UCHAR * PMMDEVICE_TYPE
Definition: mmebuddy.h:88
MMRESULT UnprepareWaveHeader(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PWAVEHDR Header)
Definition: header.c:126
struct _SOUND_DEVICE SOUND_DEVICE
MMRESULT PrepareWaveHeader(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PWAVEHDR Header)
Definition: header.c:89
MMRESULT(* MMBUFFER_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID Buffer, IN DWORD Length)
Definition: mmebuddy.h:166
MMRESULT TranslateInternalMmResult(IN MMRESULT Result)
Definition: utility.c:132
UINT GetDigitCount(IN UINT Number)
Definition: utility.c:68
MMRESULT GetSoundDeviceInstanceHandle(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, OUT PVOID *Handle)
MMRESULT GetSoundDeviceIdentifier(IN PSOUND_DEVICE SoundDevice, OUT PVOID *Identifier)
Definition: devicelist.c:328
MMRESULT DestroySoundDeviceInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance)
VOID FreeMemory(IN PVOID Pointer)
Definition: utility.c:42
VOID CALLBACK CompleteIO(IN DWORD dwErrorCode, IN DWORD dwNumberOfBytesTransferred, IN LPOVERLAPPED lpOverlapped)
Definition: streaming.c:168
MMRESULT GetSoundDeviceType(IN PSOUND_DEVICE SoundDevice, OUT PMMDEVICE_TYPE DeviceType)
Definition: devicelist.c:346
MMRESULT(* MMWAVEHEADER_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PWAVEHDR WaveHeader)
Definition: mmebuddy.h:162
#define DEFINE_GETCAPS_FUNCTYPE(func_typename, caps_type)
Definition: mmebuddy.h:93
struct _SOUND_THREAD SOUND_THREAD
struct _SOUND_DEVICE_INSTANCE SOUND_DEVICE_INSTANCE
MMRESULT QueryWaveDeviceFormatSupport(IN PSOUND_DEVICE SoundDevice, IN LPWAVEFORMATEX Format, IN DWORD FormatSize)
Definition: format.c:14
MMRESULT(* SOUND_THREAD_REQUEST_HANDLER)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID Parameter)
Definition: mmebuddy.h:230
VOID CompleteWaveHeader(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PWAVEHDR Header)
Definition: header.c:274
BOOLEAN IsValidSoundDeviceInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance)
MMRESULT OpenKernelSoundDevice(IN PSOUND_DEVICE SoundDevice, IN BOOLEAN ReadOnly, OUT PHANDLE Handle)
VOID ReleaseEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:92
struct _SOUND_OVERLAPPED SOUND_OVERLAPPED
MMRESULT MmeGetSoundDeviceCapabilities(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN PVOID Capabilities, IN DWORD CapabilitiesSize)
Definition: mmewrap.c:103
MMRESULT(* MMMIXERQUERY_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN DWORD DeviceId, IN UINT uMsg, IN LPVOID Parameter, IN DWORD Flags)
Definition: mmebuddy.h:136
MMRESULT(* MMWAVEQUERYFORMATSUPPORT_FUNC)(IN struct _SOUND_DEVICE *Device, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
Definition: mmebuddy.h:143
MMRESULT(* MMRESETSTREAM_FUNC)(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMDEVICE_TYPE DeviceType, IN BOOLEAN bStartReset)
Definition: mmebuddy.h:188
MMRESULT CreateSoundDeviceInstance(IN PSOUND_DEVICE SoundDevice, OUT PSOUND_DEVICE_INSTANCE *SoundDeviceInstance)
MMRESULT GetSoundDevice(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceIndex, OUT PSOUND_DEVICE *Device)
Definition: devicelist.c:289
struct _WAVEHDR_EXTENSION WAVEHDR_EXTENSION
MMRESULT Win32ErrorToMmResult(IN UINT ErrorCode)
Definition: utility.c:87
UINT MMRESULT
Definition: mmsystem.h:962
static PLARGE_INTEGER Time
Definition: time.c:105
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
Definition: mswsock.h:93
unsigned int UINT
Definition: ndis.h:50
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:207
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
VOID CleanupEntrypointMutexes()
Definition: reentrancy.c:56
MMRESULT InitEntrypointMutexes()
Definition: reentrancy.c:21
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
@ ReadOnly
Definition: arc.h:80
VOID UnlistAllSoundDevices()
Definition: devicelist.c:270
UINT GetMemoryAllocationCount()
Definition: utility.c:58
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
MMGETMIDIINCAPS_FUNC GetMidiInCapabilities
Definition: mmebuddy.h:201
MMGETMIDIOUTCAPS_FUNC GetMidiOutCapabilities
Definition: mmebuddy.h:200
MMOPEN_FUNC Open
Definition: mmebuddy.h:204
MMCLOSE_FUNC Close
Definition: mmebuddy.h:205
MMGETPOS_FUNC GetPos
Definition: mmebuddy.h:214
MMRESETSTREAM_FUNC ResetStream
Definition: mmebuddy.h:217
MMGETCAPS_FUNC GetCapabilities
Definition: mmebuddy.h:197
MMWAVEQUERYFORMATSUPPORT_FUNC QueryWaveFormatSupport
Definition: mmebuddy.h:207
WAVE_COMMIT_FUNC CommitWaveBuffer
Definition: mmebuddy.h:212
MMGETWAVEOUTCAPS_FUNC GetWaveOutCapabilities
Definition: mmebuddy.h:198
MMSETSTATE_FUNC SetState
Definition: mmebuddy.h:215
MMWAVESETFORMAT_FUNC SetWaveFormat
Definition: mmebuddy.h:208
MMMIXERQUERY_FUNC QueryMixerInfo
Definition: mmebuddy.h:210
MMQUERYDEVICEINTERFACESTRING_FUNC GetDeviceInterfaceString
Definition: mmebuddy.h:216
MMGETWAVEINCAPS_FUNC GetWaveInCapabilities
Definition: mmebuddy.h:199
struct _SOUND_DEVICE_INSTANCE * Next
Definition: mmebuddy.h:268
DWORD_PTR ClientCallback
Definition: mmebuddy.h:278
PWAVEHDR TailWaveHeader
Definition: mmebuddy.h:291
WAVEFORMATEX WaveFormatEx
Definition: mmebuddy.h:300
PWAVEHDR WaveLoopStart
Definition: mmebuddy.h:294
DWORD_PTR ClientCallbackInstanceData
Definition: mmebuddy.h:279
struct _SOUND_THREAD * Thread
Definition: mmebuddy.h:271
struct _SOUND_DEVICE_INSTANCE::@3481 WinMM
struct _SOUND_DEVICE * Device
Definition: mmebuddy.h:269
PWAVEHDR HeadWaveHeader
Definition: mmebuddy.h:286
PVOID Identifier
Definition: mmebuddy.h:261
MMFUNCTION_TABLE FunctionTable
Definition: mmebuddy.h:263
struct _SOUND_DEVICE_INSTANCE * HeadInstance
Definition: mmebuddy.h:258
MMDEVICE_TYPE Type
Definition: mmebuddy.h:260
struct _SOUND_DEVICE * Next
Definition: mmebuddy.h:257
struct _SOUND_DEVICE_INSTANCE * TailInstance
Definition: mmebuddy.h:259
OVERLAPPED Standard
Definition: mmebuddy.h:120
PWAVEHDR Header
Definition: mmebuddy.h:122
PVOID CompletionContext
Definition: mmebuddy.h:125
struct _SOUND_DEVICE_INSTANCE * SoundDeviceInstance
Definition: mmebuddy.h:121
LPOVERLAPPED_COMPLETION_ROUTINE OriginalCompletionRoutine
Definition: mmebuddy.h:124
HANDLE Request
Definition: mmebuddy.h:242
struct _SOUND_DEVICE_INSTANCE * SoundDeviceInstance
Definition: mmebuddy.h:249
PVOID Parameter
Definition: mmebuddy.h:250
BOOL Running
Definition: mmebuddy.h:237
HANDLE Done
Definition: mmebuddy.h:243
HANDLE Ready
Definition: mmebuddy.h:241
struct _SOUND_THREAD::@3479 Events
MMRESULT Result
Definition: mmebuddy.h:251
HANDLE Handle
Definition: mmebuddy.h:236
SOUND_THREAD_REQUEST_HANDLER Handler
Definition: mmebuddy.h:248
DWORD BytesCommitted
Definition: mmebuddy.h:311
DWORD BytesCompleted
Definition: mmebuddy.h:312
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t * LPDWORD
Definition: typedefs.h:59
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:325
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
Definition: wdfusb.h:1342
_In_ ULONG OutBufferSize
Definition: wdfwmi.h:87
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
void(CALLBACK * LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD, DWORD, LPOVERLAPPED)
Definition: winbase.h:1451
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:722
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323
unsigned char UCHAR
Definition: xmlstorage.h:181
WCHAR * LPWSTR
Definition: xmlstorage.h:184