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
;
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 */
39 struct main_loop_params
44 struct get_endpoint_ids_params
47 struct endpoint
*endpoints
;
51 unsigned int default_idx
;
54 struct create_stream_params
59 AUDCLNT_SHAREMODE share
;
61 REFERENCE_TIME duration
;
62 REFERENCE_TIME period
;
63 const WAVEFORMATEX
*fmt
;
65 UINT32
*channel_count
;
66 stream_handle
*stream
;
69 struct release_stream_params
94 struct timer_loop_params
99 struct get_render_buffer_params
101 stream_handle stream
;
107 struct release_render_buffer_params
109 stream_handle stream
;
110 UINT32 written_frames
;
115 struct get_capture_buffer_params
117 stream_handle stream
;
126 struct release_capture_buffer_params
128 stream_handle stream
;
133 struct is_format_supported_params
137 AUDCLNT_SHAREMODE share
;
138 const WAVEFORMATEX
*fmt_in
;
139 WAVEFORMATEXTENSIBLE
*fmt_out
;
143 struct get_mix_format_params
147 WAVEFORMATEXTENSIBLE
*fmt
;
151 struct get_device_period_params
156 REFERENCE_TIME
*def_period
;
157 REFERENCE_TIME
*min_period
;
160 struct get_buffer_size_params
162 stream_handle stream
;
167 struct get_latency_params
169 stream_handle stream
;
171 REFERENCE_TIME
*latency
;
174 struct get_current_padding_params
176 stream_handle stream
;
181 struct get_next_packet_size_params
183 stream_handle stream
;
188 struct get_frequency_params
190 stream_handle stream
;
195 struct get_position_params
197 stream_handle stream
;
204 struct set_volumes_params
206 stream_handle stream
;
208 const float *volumes
;
209 const float *session_volumes
;
212 struct set_event_handle_params
214 stream_handle stream
;
219 struct test_connect_params
222 enum driver_priority priority
;
225 struct is_started_params
227 stream_handle stream
;
231 struct get_prop_value_params
236 const PROPERTYKEY
*prop
;
239 void *buffer
; /* caller allocated buffer to hold value's strings */
240 unsigned int *buffer_size
;
243 struct midi_init_params
248 struct notify_context
261 struct midi_out_message_params
269 struct notify_context
*notify
;
272 struct midi_in_message_params
280 struct notify_context
*notify
;
283 struct midi_notify_wait_params
286 struct notify_context
*notify
;
289 struct aux_message_params
312 release_render_buffer
,
314 release_capture_buffer
,
321 get_next_packet_size
,