From: Davide Beatrici git@davidebeatrici.dev
--- dlls/mmdevapi/unixlib.h | 31 ++++++++++++++++++++++++++++++- dlls/winealsa.drv/alsa.c | 10 ++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/mmdevapi/unixlib.h b/dlls/mmdevapi/unixlib.h index d17439ebd73..163272c4398 100644 --- a/dlls/mmdevapi/unixlib.h +++ b/dlls/mmdevapi/unixlib.h @@ -1,4 +1,5 @@ /* + * Copyright 2021 Jacek Caban for CodeWeavers * Copyright 2022 Huw Davies * * This library is free software; you can redistribute it and/or @@ -27,6 +28,11 @@ struct endpoint unsigned int device; };
+struct main_loop_params +{ + HANDLE event; +}; + struct get_endpoint_ids_params { EDataFlow flow; @@ -39,6 +45,7 @@ struct get_endpoint_ids_params
struct create_stream_params { + const char *name; const char *device; EDataFlow flow; AUDCLNT_SHAREMODE share; @@ -47,6 +54,7 @@ struct create_stream_params REFERENCE_TIME period; const WAVEFORMATEX *fmt; HRESULT result; + UINT32 *channel_count; stream_handle *stream; };
@@ -110,7 +118,7 @@ struct get_capture_buffer_params struct release_capture_buffer_params { stream_handle stream; - UINT32 done; + BOOL done; HRESULT result; };
@@ -132,6 +140,15 @@ struct get_mix_format_params HRESULT result; };
+struct get_device_period_params +{ + const char *device; + EDataFlow flow; + HRESULT result; + REFERENCE_TIME *def_period; + REFERENCE_TIME *min_period; +}; + struct get_buffer_size_params { stream_handle stream; @@ -170,6 +187,7 @@ struct get_frequency_params struct get_position_params { stream_handle stream; + BOOL device; HRESULT result; UINT64 *pos; UINT64 *qpctime; @@ -190,6 +208,12 @@ struct set_event_handle_params HRESULT result; };
+struct test_connect_params +{ + const char *name; + HRESULT result; +}; + struct is_started_params { stream_handle stream; @@ -251,6 +275,9 @@ struct midi_notify_wait_params
enum unix_funcs { + process_attach, + process_detach, + main_loop, get_endpoint_ids, create_stream, release_stream, @@ -264,6 +291,7 @@ enum unix_funcs release_capture_buffer, is_format_supported, get_mix_format, + get_device_period, get_buffer_size, get_latency, get_current_padding, @@ -272,6 +300,7 @@ enum unix_funcs get_position, set_volumes, set_event_handle, + test_connect, is_started, get_prop_value, midi_release, diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index 3274bae70be..57292c19201 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -2431,6 +2431,9 @@ static NTSTATUS alsa_get_prop_value(void *args)
unixlib_entry_t __wine_unix_call_funcs[] = { + NULL, + NULL, + NULL, alsa_get_endpoint_ids, alsa_create_stream, alsa_release_stream, @@ -2444,6 +2447,7 @@ unixlib_entry_t __wine_unix_call_funcs[] = alsa_release_capture_buffer, alsa_is_format_supported, alsa_get_mix_format, + NULL, alsa_get_buffer_size, alsa_get_latency, alsa_get_current_padding, @@ -2452,6 +2456,7 @@ unixlib_entry_t __wine_unix_call_funcs[] = alsa_get_position, alsa_set_volumes, alsa_set_event_handle, + NULL, alsa_is_started, alsa_get_prop_value, alsa_midi_release, @@ -2837,6 +2842,9 @@ static NTSTATUS alsa_wow64_get_prop_value(void *args)
unixlib_entry_t __wine_unix_call_wow64_funcs[] = { + NULL, + NULL, + NULL, alsa_wow64_get_endpoint_ids, alsa_wow64_create_stream, alsa_wow64_release_stream, @@ -2850,6 +2858,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] = alsa_release_capture_buffer, alsa_wow64_is_format_supported, alsa_wow64_get_mix_format, + NULL, alsa_wow64_get_buffer_size, alsa_wow64_get_latency, alsa_wow64_get_current_padding, @@ -2858,6 +2867,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] = alsa_wow64_get_position, alsa_wow64_set_volumes, alsa_wow64_set_event_handle, + NULL, alsa_is_started, alsa_wow64_get_prop_value, alsa_midi_release,