ReactOS  0.4.15-dev-994-ga9f6032
wave.h
Go to the documentation of this file.
1 #pragma once
2 
3 // FIXME: Should be moved somewhere else?
4 typedef 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 
23 typedef enum {
33 
34 // WARNING: MS code below!!
35 typedef struct {
38 } WAVEOVL, *PWAVEOVL;
39 
40 // WARNING: MS code below!!
41 // per allocation structure for wave
42 typedef 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
73  } GetSetData;
74 
75  } AuxParam;
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 
87 DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
88 DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume);
89 
90 typedef struct _AUX_DD_VOLUME {
struct _AUX_DD_VOLUME * PAUX_DD_VOLUME
ULONG Left
Definition: wave.h:91
DWORD BytesOutstanding
Definition: wave.h:55
ULONG Function
Definition: wave.h:70
HWAVE hWave
Definition: wave.h:49
HANDLE Event
Definition: wave.h:62
Definition: wave.h:35
DeviceType
Definition: mmdrv.h:41
UINT MMRESULT
Definition: mmsystem.h:962
LPWAVEHDR NextBuffer
Definition: wave.h:53
HANDLE hDev
Definition: wave.h:51
DWORD BufferPosition
Definition: wave.h:54
struct _WAVE_DD_VOLUME WAVE_DD_VOLUME
LPWAVEHDR LoopHead
Definition: wave.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
MMRESULT GetDeviceCapabilities(DWORD ID, UINT DeviceType, LPBYTE pCaps, DWORD Size)
struct tag_WAVEALLOC::@467::@468 GetSetData
DWORD dwFlags
Definition: wave.h:48
MMRESULT AuxReturnCode
Definition: wave.h:80
PBYTE pData
Definition: wave.h:71
ULONG Left
Definition: wave.h:5
DWORD dwInstance
Definition: wave.h:47
WAVEOVL DummyWaveOvl
Definition: wave.h:60
DWORD dwCallback
Definition: wave.h:46
WAVETHREADFUNCTION
Definition: wave.h:23
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE AuxEvent1
Definition: wave.h:77
LPWAVEHDR pHdr
Definition: wave.h:67
ULONG Right
Definition: wave.h:6
DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:89
HANDLE ThreadHandle
Definition: wave.h:79
struct _WAVE_DD_VOLUME * PWAVE_DD_VOLUME
HANDLE AuxEvent2
Definition: wave.h:78
WAVETHREADFUNCTION AuxFunction
Definition: wave.h:65
#define ID
Definition: ruserpass.c:36
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
struct tag_WAVEALLOC WAVEALLOC
union tag_WAVEALLOC::@467 AuxParam
UINT DeviceType
Definition: wave.h:45
unsigned int UINT
Definition: ndis.h:50
ULONG Right
Definition: wave.h:92
UINT DeviceNumber
Definition: wave.h:44
ULONG DataLen
Definition: wave.h:72
struct tag_WAVEALLOC * PWAVEALLOC
unsigned int ULONG
Definition: retypes.h:1
DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:69
LPWAVEHDR DeviceQueue
Definition: wave.h:52
struct WAVEOVL * PWAVEOVL
struct tag_WAVEALLOC * Next
Definition: wave.h:43
BYTE * PBYTE
Definition: pedump.c:66
ULONG State
Definition: wave.h:68
struct _AUX_DD_VOLUME AUX_DD_VOLUME
LPWAVEHDR WaveHdr
Definition: wave.h:37
OVERLAPPED Ovl
Definition: wave.h:36
DWORD LoopCount
Definition: wave.h:58