5 /// WDMAUD Interface Definition
7 /// History: 12/02/2008 Created
9 // These are now in sndtypes.h
28 SOUND_DEVICE_TYPE DeviceType
;
39 WAVEFORMATEX WaveFormatEx
;
40 WAVEOUTCAPSW WaveOutCaps
;
42 WAVEINCAPSW WaveInCaps
;
49 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
55 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
57 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
58 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
59 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
60 /// Result: is returned in hDevice
61 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
64 #define IOCTL_OPEN_WDMAUD \
65 CTL_CODE(FILE_DEVICE_SOUND, \
68 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
71 /// IOCTL_CLOSE_WDMAUD
73 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
75 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
76 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
77 /// Note: DeviceType, DeviceIndex and hDevice must be set
78 /// ReturnCode: STATUS_SUCCESS indicates success
79 /// Prequsites: openend device
81 #define IOCTL_CLOSE_WDMAUD \
82 CTL_CODE(FILE_DEVICE_SOUND, \
85 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
88 /// IOCTL_GETNUMDEVS_TYPE
90 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
92 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
93 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
94 /// Note: The DeviceType contains the requested device type.
95 /// Result: The result is returned in DeviceCount
96 /// ReturnCode: STATUS_SUCCESS indicates success
99 #define IOCTL_GETNUMDEVS_TYPE \
100 CTL_CODE(FILE_DEVICE_SOUND, \
103 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
106 /// IOCTL_SETDEVICE_STATE
108 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
110 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
111 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
112 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
113 /// ReturnCode: STATUS_SUCCESS indicates success
114 /// Prequsites: opened device
116 #define IOCTL_SETDEVICE_STATE \
117 CTL_CODE(FILE_DEVICE_SOUND, \
120 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
125 /// Description: This IOCTL returns the device index by its provided handle
127 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
128 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
129 /// Note: The DeviceType and hDevice must be set
130 /// Result: The result is returned in DeviceIndex
131 /// ReturnCode: STATUS_SUCCESS indicates success
132 /// Prequsites: opened device
134 #define IOCTL_GETDEVID \
135 CTL_CODE(FILE_DEVICE_SOUND, \
138 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
143 /// Description: This IOCTL returns the volume a device
145 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
146 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
147 /// Note: The DeviceType and hDevice must be set
148 /// Result: The result is returned in Volume
149 /// ReturnCode: STATUS_SUCCESS indicates success
150 /// Prequsites: opened device
152 #define IOCTL_GETVOLUME \
153 CTL_CODE(FILE_DEVICE_SOUND, \
156 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
161 /// Description: This IOCTL sets the volume a device
163 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
164 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
165 /// Note: The DeviceType, hDevice and Volume must be set
166 /// ReturnCode: STATUS_SUCCESS indicates success
167 /// Prequsites: opened device
169 #define IOCTL_SETVOLUME \
170 CTL_CODE(FILE_DEVICE_SOUND, \
173 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
176 /// IOCTL_GETCAPABILTIES
178 /// Description: This IOCTL retrieves the capabilties of an specific device
180 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
181 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
182 /// Note: The DeviceType and DeviceIndex must be set
183 /// ReturnCode: STATUS_SUCCESS indicates success
186 #define IOCTL_GETCAPABILITIES \
187 CTL_CODE(FILE_DEVICE_SOUND, \
190 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
195 /// Description: This IOCTL writes data to specified device
197 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
198 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
199 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
200 /// ReturnCode: STATUS_SUCCESS indicates success
201 /// Prequsites: opened device
203 #define IOCTL_WRITEDATA \
204 CTL_CODE(FILE_DEVICE_SOUND, \
207 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
211 /// Description: This IOCTL retrieves the current playback / write position
213 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
214 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
215 /// Note: The DeviceType and hDevice must be set
216 /// Result: The result is returned in Position
217 /// ReturnCode: STATUS_SUCCESS indicates success
218 /// Prequsites: opened device
220 #define IOCTL_GETPOS \
221 CTL_CODE(FILE_DEVICE_SOUND, \
224 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
226 /// IOCTL_GETFRAMESIZE
228 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
230 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
231 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
232 /// Note: The DeviceType and hDevice must be set
233 /// Result: The result is returned in FrameSize
234 /// ReturnCode: STATUS_SUCCESS indicates success
235 /// Prequsites: opened device
237 #define IOCTL_GETFRAMESIZE \
238 CTL_CODE(FILE_DEVICE_SOUND, \
241 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)