ReactOS 0.4.15-dev-7961-gdcf9eb0
wave.h
Go to the documentation of this file.
1#pragma once
2
3// FIXME: Should be moved somewhere else?
4typedef struct _WAVE_DD_VOLUME {
8
9// driver
10#define WAVE_DD_STOP 0x0001
11#define WAVE_DD_PLAY 0x0002 // output devices only
12#define WAVE_DD_RECORD 0x0003 // input devices only
13#define WAVE_DD_RESET 0x0004
14
15// ioctl
16#define WAVE_DD_IDLE 0x0000
17#define WAVE_DD_STOPPED 0x0001 // stopped
18#define WAVE_DD_PLAYING 0x0002 // output devices only
19#define WAVE_DD_RECORDING 0x0003 // input devices only
20
21
22
23typedef enum {
33
34// WARNING: MS code below!!
35typedef struct {
39
40// WARNING: MS code below!!
41// per allocation structure for wave
42typedef struct tag_WAVEALLOC {
43 struct tag_WAVEALLOC *Next; // Chaining
44 UINT DeviceNumber; // Which device
45 UINT DeviceType; // WaveInput or WaveOutput
46 DWORD dwCallback; // client's callback
47 DWORD dwInstance; // client's instance data
48 DWORD dwFlags; // Open flags
49 HWAVE hWave; // handle for stream
50
51 HANDLE hDev; // Wave device handle
52 LPWAVEHDR DeviceQueue; // Buffers queued by application
53 LPWAVEHDR NextBuffer; // Next buffer to send to device
54 DWORD BufferPosition; // How far we're into a large buffer
56 // Bytes being processed by device
57 LPWAVEHDR LoopHead; // Start of loop if any
58 DWORD LoopCount; // Number more loops to go
59
60 WAVEOVL DummyWaveOvl; // For break loop
61 //
62 HANDLE Event; // Event for driver synchronization
63 // and notification of auxiliary
64 // task operation completion.
65 WAVETHREADFUNCTION AuxFunction; // Function for thread to perform
66 union {
67 LPWAVEHDR pHdr; // Buffer to pass in aux task
68 ULONG State; // State to set
69 struct {
70 ULONG Function; // IOCTL to use
71 PBYTE pData; // Data to set or get
72 ULONG DataLen; // Length of data
74
76 // 0 means terminate task.
77 HANDLE AuxEvent1; // Aux thread waits on this
78 HANDLE AuxEvent2; // Caller of Aux thread waits on this
79 HANDLE ThreadHandle; // Handle for thread termination ONLY
80 MMRESULT AuxReturnCode; // Return code from Aux task
82
83/* Misc should move to own header */
85 LPBYTE pCaps, DWORD Size);
86
87DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
88DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
89
90typedef struct _AUX_DD_VOLUME {
struct _WAVE_DD_VOLUME WAVE_DD_VOLUME
struct _WAVE_DD_VOLUME * PWAVE_DD_VOLUME
struct _AUX_DD_VOLUME * PAUX_DD_VOLUME
struct tag_WAVEALLOC * PWAVEALLOC
MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType, LPBYTE pCaps, DWORD Size)
WAVETHREADFUNCTION
Definition: wave.h:23
@ WaveThreadTerminate
Definition: wave.h:31
@ WaveThreadInvalid
Definition: wave.h:24
@ WaveThreadBreakLoop
Definition: wave.h:29
@ WaveThreadSetState
Definition: wave.h:26
@ WaveThreadAddBuffer
Definition: wave.h:25
@ WaveThreadClose
Definition: wave.h:30
@ WaveThreadGetData
Definition: wave.h:28
@ WaveThreadSetData
Definition: wave.h:27
struct WAVEOVL * PWAVEOVL
DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:89
struct _AUX_DD_VOLUME AUX_DD_VOLUME
DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:69
struct tag_WAVEALLOC WAVEALLOC
unsigned long DWORD
Definition: ntddk_ex.h:95
DeviceType
Definition: mmdrv.h:42
UINT MMRESULT
Definition: mmsystem.h:962
unsigned int UINT
Definition: ndis.h:50
BYTE * PBYTE
Definition: pedump.c:66
#define ID
Definition: ruserpass.c:36
Definition: wave.h:35
OVERLAPPED Ovl
Definition: wave.h:36
LPWAVEHDR WaveHdr
Definition: wave.h:37
ULONG Right
Definition: wave.h:92
ULONG Left
Definition: wave.h:91
ULONG Right
Definition: wave.h:6
ULONG Left
Definition: wave.h:5
LPWAVEHDR DeviceQueue
Definition: wave.h:52
UINT DeviceNumber
Definition: wave.h:44
HWAVE hWave
Definition: wave.h:49
ULONG DataLen
Definition: wave.h:72
HANDLE AuxEvent1
Definition: wave.h:77
UINT DeviceType
Definition: wave.h:45
DWORD BytesOutstanding
Definition: wave.h:55
union tag_WAVEALLOC::@474 AuxParam
LPWAVEHDR LoopHead
Definition: wave.h:57
HANDLE hDev
Definition: wave.h:51
ULONG Function
Definition: wave.h:70
HANDLE ThreadHandle
Definition: wave.h:79
DWORD dwInstance
Definition: wave.h:47
DWORD dwCallback
Definition: wave.h:46
struct tag_WAVEALLOC::@474::@475 GetSetData
WAVEOVL DummyWaveOvl
Definition: wave.h:60
PBYTE pData
Definition: wave.h:71
DWORD LoopCount
Definition: wave.h:58
LPWAVEHDR NextBuffer
Definition: wave.h:53
ULONG State
Definition: wave.h:68
LPWAVEHDR pHdr
Definition: wave.h:67
struct tag_WAVEALLOC * Next
Definition: wave.h:43
WAVETHREADFUNCTION AuxFunction
Definition: wave.h:65
DWORD BufferPosition
Definition: wave.h:54
HANDLE AuxEvent2
Definition: wave.h:78
MMRESULT AuxReturnCode
Definition: wave.h:80
HANDLE Event
Definition: wave.h:62
DWORD dwFlags
Definition: wave.h:48
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533