include: Add STORAGE_HOTPLUG_INFO structure.
[wine.git] / dlls / mmdevapi / unixlib.h
blobd83ed918a514e35ea9b898bf8043397ef39e4f58
1 /*
2 * Copyright 2021 Jacek Caban for CodeWeavers
3 * Copyright 2021-2022 Huw Davies
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "audioclient.h"
21 #include "mmdeviceapi.h"
23 typedef UINT64 stream_handle;
25 enum driver_priority
27 Priority_Unavailable = 0, /* driver won't work */
28 Priority_Low, /* driver may work, but unlikely */
29 Priority_Neutral, /* driver makes no judgment */
30 Priority_Preferred /* driver thinks it's correct */
33 struct endpoint
35 unsigned int name;
36 unsigned int device;
39 struct main_loop_params
41 HANDLE event;
44 struct get_endpoint_ids_params
46 EDataFlow flow;
47 struct endpoint *endpoints;
48 unsigned int size;
49 HRESULT result;
50 unsigned int num;
51 unsigned int default_idx;
54 struct create_stream_params
56 const WCHAR *name;
57 const char *device;
58 EDataFlow flow;
59 AUDCLNT_SHAREMODE share;
60 DWORD flags;
61 REFERENCE_TIME duration;
62 REFERENCE_TIME period;
63 const WAVEFORMATEX *fmt;
64 HRESULT result;
65 UINT32 *channel_count;
66 stream_handle *stream;
69 struct release_stream_params
71 stream_handle stream;
72 HANDLE timer_thread;
73 HRESULT result;
76 struct start_params
78 stream_handle stream;
79 HRESULT result;
82 struct stop_params
84 stream_handle stream;
85 HRESULT result;
88 struct reset_params
90 stream_handle stream;
91 HRESULT result;
94 struct timer_loop_params
96 stream_handle stream;
99 struct get_render_buffer_params
101 stream_handle stream;
102 UINT32 frames;
103 HRESULT result;
104 BYTE **data;
107 struct release_render_buffer_params
109 stream_handle stream;
110 UINT32 written_frames;
111 UINT flags;
112 HRESULT result;
115 struct get_capture_buffer_params
117 stream_handle stream;
118 HRESULT result;
119 BYTE **data;
120 UINT32 *frames;
121 UINT *flags;
122 UINT64 *devpos;
123 UINT64 *qpcpos;
126 struct release_capture_buffer_params
128 stream_handle stream;
129 UINT32 done;
130 HRESULT result;
133 struct is_format_supported_params
135 const char *device;
136 EDataFlow flow;
137 AUDCLNT_SHAREMODE share;
138 const WAVEFORMATEX *fmt_in;
139 WAVEFORMATEXTENSIBLE *fmt_out;
140 HRESULT result;
143 struct get_mix_format_params
145 const char *device;
146 EDataFlow flow;
147 WAVEFORMATEXTENSIBLE *fmt;
148 HRESULT result;
151 struct get_device_period_params
153 const char *device;
154 EDataFlow flow;
155 HRESULT result;
156 REFERENCE_TIME *def_period;
157 REFERENCE_TIME *min_period;
160 struct get_buffer_size_params
162 stream_handle stream;
163 HRESULT result;
164 UINT32 *frames;
167 struct get_latency_params
169 stream_handle stream;
170 HRESULT result;
171 REFERENCE_TIME *latency;
174 struct get_current_padding_params
176 stream_handle stream;
177 HRESULT result;
178 UINT32 *padding;
181 struct get_next_packet_size_params
183 stream_handle stream;
184 HRESULT result;
185 UINT32 *frames;
188 struct get_frequency_params
190 stream_handle stream;
191 HRESULT result;
192 UINT64 *freq;
195 struct get_position_params
197 stream_handle stream;
198 BOOL device;
199 HRESULT result;
200 UINT64 *pos;
201 UINT64 *qpctime;
204 struct set_volumes_params
206 stream_handle stream;
207 float master_volume;
208 const float *volumes;
209 const float *session_volumes;
212 struct set_event_handle_params
214 stream_handle stream;
215 HANDLE event;
216 HRESULT result;
219 struct test_connect_params
221 const WCHAR *name;
222 enum driver_priority priority;
225 struct is_started_params
227 stream_handle stream;
228 HRESULT result;
231 struct get_prop_value_params
233 const char *device;
234 EDataFlow flow;
235 const GUID *guid;
236 const PROPERTYKEY *prop;
237 HRESULT result;
238 PROPVARIANT *value;
239 void *buffer; /* caller allocated buffer to hold value's strings */
240 unsigned int *buffer_size;
243 struct midi_init_params
245 UINT *err;
248 struct notify_context
250 BOOL send_notify;
251 WORD dev_id;
252 WORD msg;
253 UINT_PTR param_1;
254 UINT_PTR param_2;
255 UINT_PTR callback;
256 UINT flags;
257 HANDLE device;
258 UINT_PTR instance;
261 struct midi_out_message_params
263 UINT dev_id;
264 UINT msg;
265 UINT_PTR user;
266 UINT_PTR param_1;
267 UINT_PTR param_2;
268 UINT *err;
269 struct notify_context *notify;
272 struct midi_in_message_params
274 UINT dev_id;
275 UINT msg;
276 UINT_PTR user;
277 UINT_PTR param_1;
278 UINT_PTR param_2;
279 UINT *err;
280 struct notify_context *notify;
283 struct midi_notify_wait_params
285 BOOL *quit;
286 struct notify_context *notify;
289 struct aux_message_params
291 UINT dev_id;
292 UINT msg;
293 UINT_PTR user;
294 UINT_PTR param_1;
295 UINT_PTR param_2;
296 UINT *err;
299 enum unix_funcs
301 process_attach,
302 process_detach,
303 main_loop,
304 get_endpoint_ids,
305 create_stream,
306 release_stream,
307 start,
308 stop,
309 reset,
310 timer_loop,
311 get_render_buffer,
312 release_render_buffer,
313 get_capture_buffer,
314 release_capture_buffer,
315 is_format_supported,
316 get_mix_format,
317 get_device_period,
318 get_buffer_size,
319 get_latency,
320 get_current_padding,
321 get_next_packet_size,
322 get_frequency,
323 get_position,
324 set_volumes,
325 set_event_handle,
326 test_connect,
327 is_started,
328 get_prop_value,
329 midi_init,
330 midi_release,
331 midi_out_message,
332 midi_in_message,
333 midi_notify_wait,
334 aux_message,
335 funcs_count