msvcrt: Use EnumSystemLocalesEx instead of directly accessing kernel32 resources.
[wine.git] / dlls / winealsa.drv / unixlib.h
blob7d7be1e140d34d888786075cb79353c61795662f
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 "audioclient.h"
21 struct alsa_stream;
23 struct endpoint
25 WCHAR *name;
26 char *device;
29 struct get_endpoint_ids_params
31 EDataFlow flow;
32 struct endpoint *endpoints;
33 unsigned int size;
34 HRESULT result;
35 unsigned int num;
36 unsigned int default_idx;
39 struct create_stream_params
41 const char *alsa_name;
42 EDataFlow flow;
43 AUDCLNT_SHAREMODE share;
44 DWORD flags;
45 REFERENCE_TIME duration;
46 REFERENCE_TIME period;
47 const WAVEFORMATEX *fmt;
48 HRESULT result;
49 struct alsa_stream **stream;
52 struct release_stream_params
54 struct alsa_stream *stream;
55 HANDLE timer_thread;
56 HRESULT result;
59 struct start_params
61 struct alsa_stream *stream;
62 HRESULT result;
65 struct stop_params
67 struct alsa_stream *stream;
68 HRESULT result;
71 struct reset_params
73 struct alsa_stream *stream;
74 HRESULT result;
77 struct timer_loop_params
79 struct alsa_stream *stream;
82 struct get_render_buffer_params
84 struct alsa_stream *stream;
85 UINT32 frames;
86 HRESULT result;
87 BYTE **data;
90 struct release_render_buffer_params
92 struct alsa_stream *stream;
93 UINT32 written_frames;
94 UINT flags;
95 HRESULT result;
98 struct get_capture_buffer_params
100 struct alsa_stream *stream;
101 HRESULT result;
102 BYTE **data;
103 UINT32 *frames;
104 UINT *flags;
105 UINT64 *devpos;
106 UINT64 *qpcpos;
109 struct release_capture_buffer_params
111 struct alsa_stream *stream;
112 UINT32 done;
113 HRESULT result;
116 struct is_format_supported_params
118 const char *alsa_name;
119 EDataFlow flow;
120 AUDCLNT_SHAREMODE share;
121 const WAVEFORMATEX *fmt_in;
122 WAVEFORMATEXTENSIBLE *fmt_out;
123 HRESULT result;
126 struct get_mix_format_params
128 const char *alsa_name;
129 EDataFlow flow;
130 WAVEFORMATEXTENSIBLE *fmt;
131 HRESULT result;
134 struct get_buffer_size_params
136 struct alsa_stream *stream;
137 HRESULT result;
138 UINT32 *size;
141 struct get_latency_params
143 struct alsa_stream *stream;
144 HRESULT result;
145 REFERENCE_TIME *latency;
148 struct get_current_padding_params
150 struct alsa_stream *stream;
151 HRESULT result;
152 UINT32 *padding;
155 struct get_next_packet_size_params
157 struct alsa_stream *stream;
158 HRESULT result;
159 UINT32 *frames;
162 struct get_frequency_params
164 struct alsa_stream *stream;
165 HRESULT result;
166 UINT64 *freq;
169 struct get_position_params
171 struct alsa_stream *stream;
172 HRESULT result;
173 UINT64 *pos;
174 UINT64 *qpctime;
177 struct set_volumes_params
179 struct alsa_stream *stream;
180 float master_volume;
181 const float *volumes;
182 const float *session_volumes;
185 struct set_event_handle_params
187 struct alsa_stream *stream;
188 HANDLE event;
189 HRESULT result;
192 struct is_started_params
194 struct alsa_stream *stream;
195 HRESULT result;
198 struct get_prop_value_params
200 const char *alsa_name;
201 EDataFlow flow;
202 const GUID *guid;
203 const PROPERTYKEY *prop;
204 HRESULT result;
205 PROPVARIANT *value;
206 void *buffer; /* caller allocated buffer to hold value's strings */
207 unsigned int *buffer_size;
210 struct notify_context
212 BOOL send_notify;
213 WORD dev_id;
214 WORD msg;
215 UINT_PTR param_1;
216 UINT_PTR param_2;
217 UINT_PTR callback;
218 UINT flags;
219 HANDLE device;
220 UINT_PTR instance;
223 struct midi_out_message_params
225 UINT dev_id;
226 UINT msg;
227 UINT_PTR user;
228 UINT_PTR param_1;
229 UINT_PTR param_2;
230 UINT *err;
231 struct notify_context *notify;
234 struct midi_in_message_params
236 UINT dev_id;
237 UINT msg;
238 UINT_PTR user;
239 UINT_PTR param_1;
240 UINT_PTR param_2;
241 UINT *err;
242 struct notify_context *notify;
245 struct midi_notify_wait_params
247 BOOL *quit;
248 struct notify_context *notify;
251 enum alsa_funcs
253 alsa_get_endpoint_ids,
254 alsa_create_stream,
255 alsa_release_stream,
256 alsa_start,
257 alsa_stop,
258 alsa_reset,
259 alsa_timer_loop,
260 alsa_get_render_buffer,
261 alsa_release_render_buffer,
262 alsa_get_capture_buffer,
263 alsa_release_capture_buffer,
264 alsa_is_format_supported,
265 alsa_get_mix_format,
266 alsa_get_buffer_size,
267 alsa_get_latency,
268 alsa_get_current_padding,
269 alsa_get_next_packet_size,
270 alsa_get_frequency,
271 alsa_get_position,
272 alsa_set_volumes,
273 alsa_set_event_handle,
274 alsa_is_started,
275 alsa_get_prop_value,
276 alsa_midi_release,
277 alsa_midi_out_message,
278 alsa_midi_in_message,
279 alsa_midi_notify_wait,
282 NTSTATUS midi_release(void *args) DECLSPEC_HIDDEN;
283 NTSTATUS midi_out_message(void *args) DECLSPEC_HIDDEN;
284 NTSTATUS midi_in_message(void *args) DECLSPEC_HIDDEN;
285 NTSTATUS midi_notify_wait(void *args) DECLSPEC_HIDDEN;
287 extern unixlib_handle_t alsa_handle;
289 #define ALSA_CALL(func, params) __wine_unix_call(alsa_handle, alsa_ ## func, params)