5 /// WDMAUD Interface Definition
7 /// History: 12/02/2008 Created
9 // These are now in sndtypes.h
28 SOUND_DEVICE_TYPE DeviceType
;
41 WAVEFORMATEX WaveFormatEx
;
42 WAVEOUTCAPSW WaveOutCaps
;
44 WAVEINCAPSW WaveInCaps
;
47 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
53 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
55 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
56 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
57 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
58 /// Result: is returned in hDevice
59 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
62 #define IOCTL_OPEN_WDMAUD \
63 CTL_CODE(FILE_DEVICE_SOUND, \
66 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
69 /// IOCTL_CLOSE_WDMAUD
71 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
73 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
74 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
75 /// Note: DeviceType, DeviceIndex and hDevice must be set
76 /// ReturnCode: STATUS_SUCCESS indicates success
77 /// Prequsites: openend device
79 #define IOCTL_CLOSE_WDMAUD \
80 CTL_CODE(FILE_DEVICE_SOUND, \
83 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
86 /// IOCTL_GETNUMDEVS_TYPE
88 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
90 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
91 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
92 /// Note: The DeviceType contains the requested device type.
93 /// Result: The result is returned in DeviceCount
94 /// ReturnCode: STATUS_SUCCESS indicates success
97 #define IOCTL_GETNUMDEVS_TYPE \
98 CTL_CODE(FILE_DEVICE_SOUND, \
101 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
104 /// IOCTL_SETDEVICE_STATE
106 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
108 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
109 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
110 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
111 /// ReturnCode: STATUS_SUCCESS indicates success
112 /// Prequsites: opened device
114 #define IOCTL_SETDEVICE_STATE \
115 CTL_CODE(FILE_DEVICE_SOUND, \
118 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
123 /// Description: This IOCTL returns the device index by its provided handle
125 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
126 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
127 /// Note: The DeviceType and hDevice must be set
128 /// Result: The result is returned in DeviceIndex
129 /// ReturnCode: STATUS_SUCCESS indicates success
130 /// Prequsites: opened device
132 #define IOCTL_GETDEVID \
133 CTL_CODE(FILE_DEVICE_SOUND, \
136 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
141 /// Description: This IOCTL returns the volume a device
143 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
144 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
145 /// Note: The DeviceType and hDevice must be set
146 /// Result: The result is returned in Volume
147 /// ReturnCode: STATUS_SUCCESS indicates success
148 /// Prequsites: opened device
150 #define IOCTL_GETVOLUME \
151 CTL_CODE(FILE_DEVICE_SOUND, \
154 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
159 /// Description: This IOCTL sets the volume a device
161 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
162 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
163 /// Note: The DeviceType, hDevice and Volume must be set
164 /// ReturnCode: STATUS_SUCCESS indicates success
165 /// Prequsites: opened device
167 #define IOCTL_SETVOLUME \
168 CTL_CODE(FILE_DEVICE_SOUND, \
171 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
174 /// IOCTL_GETCAPABILTIES
176 /// Description: This IOCTL retrieves the capabilties of an specific device
178 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
179 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
180 /// Note: The DeviceType and DeviceIndex must be set
181 /// ReturnCode: STATUS_SUCCESS indicates success
184 #define IOCTL_GETCAPABILITIES \
185 CTL_CODE(FILE_DEVICE_SOUND, \
188 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
193 /// Description: This IOCTL writes data to specified device
195 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
196 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
197 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
198 /// ReturnCode: STATUS_SUCCESS indicates success
199 /// Prequsites: opened device
201 #define IOCTL_WRITEDATA \
202 CTL_CODE(FILE_DEVICE_SOUND, \
205 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)