win32u: Move process_sent_messages implementation from user32.
[wine.git] / dlls / winepulse.drv / unixlib.h
blob9089e2829fccafe992145a0f982e16ea6d929c7b
1 /*
2 * Copyright 2021 Jacek Caban for CodeWeavers
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 "wine/list.h"
20 #include "wine/unixlib.h"
22 #define MAX_PULSE_NAME_LEN 256
24 struct pulse_stream;
26 enum phys_device_bus_type {
27 phys_device_bus_invalid = -1,
28 phys_device_bus_pci,
29 phys_device_bus_usb
32 struct pulse_config
34 struct
36 WAVEFORMATEXTENSIBLE format;
37 REFERENCE_TIME def_period;
38 REFERENCE_TIME min_period;
39 } modes[2];
42 struct endpoint
44 WCHAR *name;
45 char *pulse_name;
48 struct main_loop_params
50 HANDLE event;
53 struct get_endpoint_ids_params
55 EDataFlow flow;
56 struct endpoint *endpoints;
57 unsigned int size;
58 HRESULT result;
59 unsigned int num;
60 unsigned int default_idx;
63 struct create_stream_params
65 const char *name;
66 const char *pulse_name;
67 EDataFlow dataflow;
68 AUDCLNT_SHAREMODE mode;
69 DWORD flags;
70 REFERENCE_TIME duration;
71 const WAVEFORMATEX *fmt;
72 HRESULT result;
73 UINT32 *channel_count;
74 struct pulse_stream **stream;
77 struct release_stream_params
79 struct pulse_stream *stream;
80 HANDLE timer;
81 HRESULT result;
84 struct start_params
86 struct pulse_stream *stream;
87 HRESULT result;
90 struct stop_params
92 struct pulse_stream *stream;
93 HRESULT result;
96 struct reset_params
98 struct pulse_stream *stream;
99 HRESULT result;
102 struct timer_loop_params
104 struct pulse_stream *stream;
107 struct get_render_buffer_params
109 struct pulse_stream *stream;
110 UINT32 frames;
111 HRESULT result;
112 BYTE **data;
115 struct release_render_buffer_params
117 struct pulse_stream *stream;
118 UINT32 written_frames;
119 DWORD flags;
120 HRESULT result;
123 struct get_capture_buffer_params
125 struct pulse_stream *stream;
126 HRESULT result;
127 BYTE **data;
128 UINT32 *frames;
129 DWORD *flags;
130 UINT64 *devpos;
131 UINT64 *qpcpos;
134 struct release_capture_buffer_params
136 struct pulse_stream *stream;
137 BOOL done;
138 HRESULT result;
141 struct get_buffer_size_params
143 struct pulse_stream *stream;
144 HRESULT result;
145 UINT32 *size;
148 struct get_latency_params
150 struct pulse_stream *stream;
151 HRESULT result;
152 REFERENCE_TIME *latency;
155 struct get_current_padding_params
157 struct pulse_stream *stream;
158 HRESULT result;
159 UINT32 *padding;
162 struct get_next_packet_size_params
164 struct pulse_stream *stream;
165 HRESULT result;
166 UINT32 *frames;
169 struct get_frequency_params
171 struct pulse_stream *stream;
172 HRESULT result;
173 UINT64 *freq;
176 struct get_position_params
178 struct pulse_stream *stream;
179 BOOL device;
180 HRESULT result;
181 UINT64 *pos;
182 UINT64 *qpctime;
185 struct set_volumes_params
187 struct pulse_stream *stream;
188 float master_volume;
189 const float *volumes;
190 const float *session_volumes;
193 struct set_event_handle_params
195 struct pulse_stream *stream;
196 HANDLE event;
197 HRESULT result;
200 struct test_connect_params
202 const char *name;
203 HRESULT result;
204 struct pulse_config *config;
207 struct is_started_params
209 struct pulse_stream *stream;
210 BOOL started;
213 struct get_prop_value_params
215 const char *pulse_name;
216 const GUID *guid;
217 const PROPERTYKEY *prop;
218 EDataFlow flow;
219 HRESULT result;
220 VARTYPE vt;
221 union
223 WCHAR wstr[128];
224 ULONG ulVal;
228 enum unix_funcs
230 process_attach,
231 process_detach,
232 main_loop,
233 get_endpoint_ids,
234 create_stream,
235 release_stream,
236 start,
237 stop,
238 reset,
239 timer_loop,
240 get_render_buffer,
241 release_render_buffer,
242 get_capture_buffer,
243 release_capture_buffer,
244 get_buffer_size,
245 get_latency,
246 get_current_padding,
247 get_next_packet_size,
248 get_frequency,
249 get_position,
250 set_volumes,
251 set_event_handle,
252 test_connect,
253 is_started,
254 get_prop_value,