ddraw/tests: Move the capability tests for enumerated devices.
[wine.git] / dlls / wineoss.drv / unixlib.h
blobe36c82ff35b575fe3ae2267d074f3e81810984a0
1 /*
2 * Copyright 2022 Huw Davies
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "mmdeviceapi.h"
21 typedef UINT64 stream_handle;
23 /* From <dlls/mmdevapi/mmdevapi.h> */
24 enum DriverPriority
26 Priority_Unavailable = 0,
27 Priority_Low,
28 Priority_Neutral,
29 Priority_Preferred
32 struct test_connect_params
34 enum DriverPriority priority;
37 struct endpoint
39 unsigned int name;
40 unsigned int device;
43 struct get_endpoint_ids_params
45 EDataFlow flow;
46 struct endpoint *endpoints;
47 unsigned int size;
48 HRESULT result;
49 unsigned int num;
50 unsigned int default_idx;
53 struct create_stream_params
55 const char *device;
56 EDataFlow flow;
57 AUDCLNT_SHAREMODE share;
58 UINT flags;
59 REFERENCE_TIME duration;
60 REFERENCE_TIME period;
61 const WAVEFORMATEX *fmt;
62 HRESULT result;
63 stream_handle *stream;
66 struct release_stream_params
68 stream_handle stream;
69 HANDLE timer_thread;
70 HRESULT result;
73 struct start_params
75 stream_handle stream;
76 HRESULT result;
79 struct stop_params
81 stream_handle stream;
82 HRESULT result;
85 struct reset_params
87 stream_handle stream;
88 HRESULT result;
91 struct timer_loop_params
93 stream_handle stream;
96 struct get_render_buffer_params
98 stream_handle stream;
99 UINT32 frames;
100 HRESULT result;
101 BYTE **data;
104 struct release_render_buffer_params
106 stream_handle stream;
107 UINT32 written_frames;
108 UINT flags;
109 HRESULT result;
112 struct get_capture_buffer_params
114 stream_handle stream;
115 HRESULT result;
116 BYTE **data;
117 UINT32 *frames;
118 UINT *flags;
119 UINT64 *devpos;
120 UINT64 *qpcpos;
123 struct release_capture_buffer_params
125 stream_handle stream;
126 UINT32 done;
127 HRESULT result;
130 struct is_format_supported_params
132 const char *device;
133 EDataFlow flow;
134 AUDCLNT_SHAREMODE share;
135 const WAVEFORMATEX *fmt_in;
136 WAVEFORMATEXTENSIBLE *fmt_out;
137 HRESULT result;
140 struct get_mix_format_params
142 const char *device;
143 EDataFlow flow;
144 WAVEFORMATEXTENSIBLE *fmt;
145 HRESULT result;
148 struct get_buffer_size_params
150 stream_handle stream;
151 HRESULT result;
152 UINT32 *size;
155 struct get_latency_params
157 stream_handle stream;
158 HRESULT result;
159 REFERENCE_TIME *latency;
162 struct get_current_padding_params
164 stream_handle stream;
165 HRESULT result;
166 UINT32 *padding;
169 struct get_next_packet_size_params
171 stream_handle stream;
172 HRESULT result;
173 UINT32 *frames;
176 struct get_frequency_params
178 stream_handle stream;
179 HRESULT result;
180 UINT64 *frequency;
183 struct get_position_params
185 stream_handle stream;
186 HRESULT result;
187 UINT64 *position;
188 UINT64 *qpctime;
191 struct set_volumes_params
193 stream_handle stream;
194 float master_volume;
195 const float *volumes;
196 const float *session_volumes;
199 struct set_event_handle_params
201 stream_handle stream;
202 HANDLE event;
203 HRESULT result;
206 struct is_started_params
208 stream_handle stream;
209 HRESULT result;
212 struct notify_context
214 BOOL send_notify;
215 WORD dev_id;
216 WORD msg;
217 UINT_PTR param_1;
218 UINT_PTR param_2;
219 UINT_PTR callback;
220 UINT flags;
221 HANDLE device;
222 UINT_PTR instance;
225 struct midi_out_message_params
227 UINT dev_id;
228 UINT msg;
229 UINT_PTR user;
230 UINT_PTR param_1;
231 UINT_PTR param_2;
232 UINT *err;
233 struct notify_context *notify;
236 struct midi_in_message_params
238 UINT dev_id;
239 UINT msg;
240 UINT_PTR user;
241 UINT_PTR param_1;
242 UINT_PTR param_2;
243 UINT *err;
244 struct notify_context *notify;
247 struct midi_notify_wait_params
249 BOOL *quit;
250 struct notify_context *notify;
253 struct aux_message_params
255 UINT dev_id;
256 UINT msg;
257 UINT_PTR user;
258 UINT_PTR param_1;
259 UINT_PTR param_2;
260 UINT *err;
263 enum oss_funcs
265 oss_test_connect,
266 oss_get_endpoint_ids,
267 oss_create_stream,
268 oss_release_stream,
269 oss_start,
270 oss_stop,
271 oss_reset,
272 oss_timer_loop,
273 oss_get_render_buffer,
274 oss_release_render_buffer,
275 oss_get_capture_buffer,
276 oss_release_capture_buffer,
277 oss_is_format_supported,
278 oss_get_mix_format,
279 oss_get_buffer_size,
280 oss_get_latency,
281 oss_get_current_padding,
282 oss_get_next_packet_size,
283 oss_get_frequency,
284 oss_get_position,
285 oss_set_volumes,
286 oss_set_event_handle,
287 oss_is_started,
288 oss_midi_release,
289 oss_midi_out_message,
290 oss_midi_in_message,
291 oss_midi_notify_wait,
292 oss_aux_message,
295 NTSTATUS midi_release(void *args) DECLSPEC_HIDDEN;
296 NTSTATUS midi_out_message(void *args) DECLSPEC_HIDDEN;
297 NTSTATUS midi_in_message(void *args) DECLSPEC_HIDDEN;
298 NTSTATUS midi_notify_wait(void *args) DECLSPEC_HIDDEN;
300 #ifdef _WIN64
301 NTSTATUS wow64_midi_out_message(void *args) DECLSPEC_HIDDEN;
302 NTSTATUS wow64_midi_in_message(void *args) DECLSPEC_HIDDEN;
303 NTSTATUS wow64_midi_notify_wait(void *args) DECLSPEC_HIDDEN;
304 #endif
306 extern unixlib_handle_t oss_handle;
308 #define OSS_CALL(func, params) __wine_unix_call(oss_handle, oss_ ## func, params)