5 /// WDMAUD Interface Definition
7 /// History: 12/02/2008 Created
9 // These are now in sndtypes.h
28 KSSTREAM_HEADER Header
;
29 SOUND_DEVICE_TYPE DeviceType
;
39 MIXERCONTROLDETAILS MixDetails
;
40 MIXERLINECONTROLSW MixControls
;
42 WAVEFORMATEX WaveFormatEx
;
43 WAVEOUTCAPSW WaveOutCaps
;
45 WAVEINCAPSW WaveInCaps
;
52 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
58 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
60 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
61 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
62 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
63 /// Result: is returned in hDevice
64 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
67 #define IOCTL_OPEN_WDMAUD \
68 CTL_CODE(FILE_DEVICE_SOUND, \
71 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
74 /// IOCTL_CLOSE_WDMAUD
76 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
78 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
79 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
80 /// Note: DeviceType, DeviceIndex and hDevice must be set
81 /// ReturnCode: STATUS_SUCCESS indicates success
82 /// Prequsites: openend device
84 #define IOCTL_CLOSE_WDMAUD \
85 CTL_CODE(FILE_DEVICE_SOUND, \
88 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
91 /// IOCTL_GETNUMDEVS_TYPE
93 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
95 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
96 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
97 /// Note: The DeviceType contains the requested device type.
98 /// Result: The result is returned in DeviceCount
99 /// ReturnCode: STATUS_SUCCESS indicates success
102 #define IOCTL_GETNUMDEVS_TYPE \
103 CTL_CODE(FILE_DEVICE_SOUND, \
106 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
109 /// IOCTL_SETDEVICE_STATE
111 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
113 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
114 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
115 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
116 /// ReturnCode: STATUS_SUCCESS indicates success
117 /// Prequsites: opened device
119 #define IOCTL_SETDEVICE_STATE \
120 CTL_CODE(FILE_DEVICE_SOUND, \
123 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
128 /// Description: This IOCTL returns the device index by its provided handle
130 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
131 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
132 /// Note: The DeviceType and hDevice must be set
133 /// Result: The result is returned in DeviceIndex
134 /// ReturnCode: STATUS_SUCCESS indicates success
135 /// Prequsites: opened device
137 #define IOCTL_GETDEVID \
138 CTL_CODE(FILE_DEVICE_SOUND, \
141 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
146 /// Description: This IOCTL returns the volume a device
148 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
149 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
150 /// Note: The DeviceType and hDevice must be set
151 /// Result: The result is returned in Volume
152 /// ReturnCode: STATUS_SUCCESS indicates success
153 /// Prequsites: opened device
155 #define IOCTL_GETVOLUME \
156 CTL_CODE(FILE_DEVICE_SOUND, \
159 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
164 /// Description: This IOCTL sets the volume a device
166 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
167 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
168 /// Note: The DeviceType, hDevice and Volume must be set
169 /// ReturnCode: STATUS_SUCCESS indicates success
170 /// Prequsites: opened device
172 #define IOCTL_SETVOLUME \
173 CTL_CODE(FILE_DEVICE_SOUND, \
176 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
179 /// IOCTL_GETCAPABILTIES
181 /// Description: This IOCTL retrieves the capabilties of an specific device
183 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
184 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
185 /// Note: The DeviceType and DeviceIndex must be set
186 /// ReturnCode: STATUS_SUCCESS indicates success
189 #define IOCTL_GETCAPABILITIES \
190 CTL_CODE(FILE_DEVICE_SOUND, \
193 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
198 /// Description: This IOCTL writes data to specified device
200 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
201 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
202 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
203 /// ReturnCode: STATUS_SUCCESS indicates success
204 /// Prequsites: opened device
206 #define IOCTL_WRITEDATA \
207 CTL_CODE(FILE_DEVICE_SOUND, \
210 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
214 /// Description: This IOCTL retrieves the current playback / write position
216 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
217 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
218 /// Note: The DeviceType and hDevice must be set
219 /// Result: The result is returned in Position
220 /// ReturnCode: STATUS_SUCCESS indicates success
221 /// Prequsites: opened device
223 #define IOCTL_GETPOS \
224 CTL_CODE(FILE_DEVICE_SOUND, \
227 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
229 /// IOCTL_GETFRAMESIZE
231 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
233 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
234 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
235 /// Note: The DeviceType and hDevice must be set
236 /// Result: The result is returned in FrameSize
237 /// ReturnCode: STATUS_SUCCESS indicates success
238 /// Prequsites: opened device
240 #define IOCTL_GETFRAMESIZE \
241 CTL_CODE(FILE_DEVICE_SOUND, \
244 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
246 /// IOCTL_GETLINEINFO
248 /// Description: This IOCTL retrieves information on a mixerline
250 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
251 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
252 /// Note: The hDevice member must be set
253 /// Result: The result is returned in MixLine
254 /// ReturnCode: STATUS_SUCCESS indicates success
255 /// Prequsites: opened device
257 #define IOCTL_GETLINEINFO \
258 CTL_CODE(FILE_DEVICE_SOUND, \
261 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
264 /// IOCTL_GETLINECONTROLS
266 /// Description: This IOCTL retrieves controls of a mixerline
268 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
269 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
270 /// Note: The hDevice member must be set
271 /// Result: The result is returned in MixControls
272 /// ReturnCode: STATUS_SUCCESS indicates success
273 /// Prequsites: opened device
275 #define IOCTL_GETLINECONTROLS \
276 CTL_CODE(FILE_DEVICE_SOUND, \
279 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
282 /// IOCTL_SETCONTROLDETAILS
284 /// Description: This IOCTL sets details of a control of a mixerline
286 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
287 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
288 /// Note: The hDevice member must be set
289 /// ReturnCode: STATUS_SUCCESS indicates success
290 /// Prequsites: opened device
292 #define IOCTL_SETCONTROLDETAILS \
293 CTL_CODE(FILE_DEVICE_SOUND, \
296 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
299 /// IOCTL_GETCONTROLDETAILS
301 /// Description: This IOCTL gets details of a control of a mixerline
303 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
304 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
305 /// Note: The hDevice member must be set
306 /// Result: The result is returned in MixDetails
307 /// ReturnCode: STATUS_SUCCESS indicates success
308 /// Prequsites: opened device
310 #define IOCTL_GETCONTROLDETAILS \
311 CTL_CODE(FILE_DEVICE_SOUND, \
314 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)