winecoreaudio: Move midi_out_reset to the unixlib.
[wine.git] / dlls / winecoreaudio.drv / unixlib.h
blobbdf38b24c8830e34cd0de6eee08d796a539e033e
1 /*
2 * Unixlib header file for winecoreaudio driver.
4 * Copyright 2021 Huw Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "mmddk.h"
22 struct coreaudio_stream;
24 struct endpoint
26 WCHAR *name;
27 DWORD id;
30 struct get_endpoint_ids_params
32 EDataFlow flow;
33 struct endpoint *endpoints;
34 unsigned int size;
35 HRESULT result;
36 unsigned int num;
37 unsigned int default_idx;
40 struct create_stream_params
42 DWORD dev_id;
43 EDataFlow flow;
44 AUDCLNT_SHAREMODE share;
45 REFERENCE_TIME duration;
46 REFERENCE_TIME period;
47 const WAVEFORMATEX *fmt;
48 HRESULT result;
49 struct coreaudio_stream *stream;
52 struct release_stream_params
54 struct coreaudio_stream *stream;
55 HRESULT result;
58 struct start_params
60 struct coreaudio_stream *stream;
61 HRESULT result;
64 struct stop_params
66 struct coreaudio_stream *stream;
67 HRESULT result;
70 struct reset_params
72 struct coreaudio_stream *stream;
73 HRESULT result;
76 struct get_render_buffer_params
78 struct coreaudio_stream *stream;
79 UINT32 frames;
80 HRESULT result;
81 BYTE **data;
84 struct release_render_buffer_params
86 struct coreaudio_stream *stream;
87 UINT32 frames;
88 DWORD flags;
89 HRESULT result;
92 struct get_capture_buffer_params
94 struct coreaudio_stream *stream;
95 HRESULT result;
96 BYTE **data;
97 UINT32 *frames;
98 DWORD *flags;
99 UINT64 *devpos;
100 UINT64 *qpcpos;
103 struct release_capture_buffer_params
105 struct coreaudio_stream *stream;
106 UINT32 done;
107 HRESULT result;
110 struct get_mix_format_params
112 EDataFlow flow;
113 DWORD dev_id;
114 WAVEFORMATEXTENSIBLE *fmt;
115 HRESULT result;
118 struct is_format_supported_params
120 EDataFlow flow;
121 DWORD dev_id;
122 AUDCLNT_SHAREMODE share;
123 const WAVEFORMATEX *fmt_in;
124 WAVEFORMATEXTENSIBLE *fmt_out;
125 HRESULT result;
128 struct get_buffer_size_params
130 struct coreaudio_stream *stream;
131 HRESULT result;
132 UINT32 *frames;
135 struct get_latency_params
137 struct coreaudio_stream *stream;
138 HRESULT result;
139 REFERENCE_TIME *latency;
142 struct get_current_padding_params
144 struct coreaudio_stream *stream;
145 HRESULT result;
146 UINT32 *padding;
149 struct get_next_packet_size_params
151 struct coreaudio_stream *stream;
152 HRESULT result;
153 UINT32 *frames;
156 struct get_position_params
158 struct coreaudio_stream *stream;
159 HRESULT result;
160 UINT64 *pos;
161 UINT64 *qpctime;
164 struct get_frequency_params
166 struct coreaudio_stream *stream;
167 HRESULT result;
168 UINT64 *freq;
171 struct is_started_params
173 struct coreaudio_stream *stream;
174 HRESULT result;
177 struct set_volumes_params
179 struct coreaudio_stream *stream;
180 float master_volume;
181 const float *volumes;
182 const float *session_volumes;
183 int channel;
186 struct midi_init_params
188 DWORD *err;
189 UINT num_srcs;
190 void *srcs;
191 void *midi_in_port;
194 struct notify_context
196 BOOL send_notify;
197 WORD dev_id;
198 WORD msg;
199 DWORD_PTR param_1;
200 DWORD_PTR param_2;
201 DWORD_PTR callback;
202 DWORD flags;
203 HANDLE device;
204 DWORD_PTR instance;
207 struct midi_out_message_params
209 UINT dev_id;
210 UINT msg;
211 DWORD_PTR user;
212 DWORD_PTR param_1;
213 DWORD_PTR param_2;
214 DWORD *err;
215 struct notify_context *notify;
218 enum unix_funcs
220 unix_get_endpoint_ids,
221 unix_create_stream,
222 unix_release_stream,
223 unix_start,
224 unix_stop,
225 unix_reset,
226 unix_get_render_buffer,
227 unix_release_render_buffer,
228 unix_get_capture_buffer,
229 unix_release_capture_buffer,
230 unix_get_mix_format,
231 unix_is_format_supported,
232 unix_get_buffer_size,
233 unix_get_latency,
234 unix_get_current_padding,
235 unix_get_next_packet_size,
236 unix_get_position,
237 unix_get_frequency,
238 unix_is_started,
239 unix_set_volumes,
240 unix_midi_init,
241 unix_midi_release,
242 unix_midi_out_message,
245 NTSTATUS midi_init( void * ) DECLSPEC_HIDDEN;
246 NTSTATUS midi_release( void * ) DECLSPEC_HIDDEN;
247 NTSTATUS midi_out_message( void * ) DECLSPEC_HIDDEN;
249 extern unixlib_handle_t coreaudio_handle;
251 #define UNIX_CALL( func, params ) __wine_unix_call( coreaudio_handle, unix_ ## func, params )