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
;
38 MIXERCONTROLDETAILS MixDetails
;
39 MIXERLINECONTROLSW MixControls
;
41 WAVEFORMATEX WaveFormatEx
;
42 WAVEOUTCAPSW WaveOutCaps
;
44 WAVEINCAPSW WaveInCaps
;
51 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
57 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
59 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
60 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
61 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
62 /// Result: is returned in hDevice
63 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
66 #define IOCTL_OPEN_WDMAUD \
67 CTL_CODE(FILE_DEVICE_SOUND, \
70 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
73 /// IOCTL_CLOSE_WDMAUD
75 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
77 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
78 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
79 /// Note: DeviceType, DeviceIndex and hDevice must be set
80 /// ReturnCode: STATUS_SUCCESS indicates success
81 /// Prequsites: openend device
83 #define IOCTL_CLOSE_WDMAUD \
84 CTL_CODE(FILE_DEVICE_SOUND, \
87 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
90 /// IOCTL_GETNUMDEVS_TYPE
92 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
94 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
95 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
96 /// Note: The DeviceType contains the requested device type.
97 /// Result: The result is returned in DeviceCount
98 /// ReturnCode: STATUS_SUCCESS indicates success
101 #define IOCTL_GETNUMDEVS_TYPE \
102 CTL_CODE(FILE_DEVICE_SOUND, \
105 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
108 /// IOCTL_SETDEVICE_STATE
110 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
112 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
113 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
114 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
115 /// ReturnCode: STATUS_SUCCESS indicates success
116 /// Prequsites: opened device
118 #define IOCTL_SETDEVICE_STATE \
119 CTL_CODE(FILE_DEVICE_SOUND, \
122 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
127 /// Description: This IOCTL returns the device index by its provided handle
129 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
130 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
131 /// Note: The DeviceType and hDevice must be set
132 /// Result: The result is returned in DeviceIndex
133 /// ReturnCode: STATUS_SUCCESS indicates success
134 /// Prequsites: opened device
136 #define IOCTL_GETDEVID \
137 CTL_CODE(FILE_DEVICE_SOUND, \
140 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
145 /// Description: This IOCTL returns the volume a device
147 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
148 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
149 /// Note: The DeviceType and hDevice must be set
150 /// Result: The result is returned in Volume
151 /// ReturnCode: STATUS_SUCCESS indicates success
152 /// Prequsites: opened device
154 #define IOCTL_GETVOLUME \
155 CTL_CODE(FILE_DEVICE_SOUND, \
158 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
163 /// Description: This IOCTL sets the volume a device
165 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
166 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
167 /// Note: The DeviceType, hDevice and Volume must be set
168 /// ReturnCode: STATUS_SUCCESS indicates success
169 /// Prequsites: opened device
171 #define IOCTL_SETVOLUME \
172 CTL_CODE(FILE_DEVICE_SOUND, \
175 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
178 /// IOCTL_GETCAPABILTIES
180 /// Description: This IOCTL retrieves the capabilties of an specific device
182 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
183 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
184 /// Note: The DeviceType and DeviceIndex must be set
185 /// ReturnCode: STATUS_SUCCESS indicates success
188 #define IOCTL_GETCAPABILITIES \
189 CTL_CODE(FILE_DEVICE_SOUND, \
192 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
197 /// Description: This IOCTL writes data to specified device
199 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
200 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
201 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
202 /// ReturnCode: STATUS_SUCCESS indicates success
203 /// Prequsites: opened device
205 #define IOCTL_WRITEDATA \
206 CTL_CODE(FILE_DEVICE_SOUND, \
209 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
213 /// Description: This IOCTL retrieves the current playback / write position
215 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
216 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
217 /// Note: The DeviceType and hDevice must be set
218 /// Result: The result is returned in Position
219 /// ReturnCode: STATUS_SUCCESS indicates success
220 /// Prequsites: opened device
222 #define IOCTL_GETPOS \
223 CTL_CODE(FILE_DEVICE_SOUND, \
226 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
228 /// IOCTL_GETFRAMESIZE
230 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
232 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
233 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
234 /// Note: The DeviceType and hDevice must be set
235 /// Result: The result is returned in FrameSize
236 /// ReturnCode: STATUS_SUCCESS indicates success
237 /// Prequsites: opened device
239 #define IOCTL_GETFRAMESIZE \
240 CTL_CODE(FILE_DEVICE_SOUND, \
243 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)