Commit 9ad0694a authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winecoreaudio: Implement main_loop in unixlib.

parent b089e4a2
......@@ -196,6 +196,13 @@ static BOOL device_has_channels(AudioDeviceID device, EDataFlow flow)
return ret;
}
static NTSTATUS unix_main_loop(void *args)
{
struct main_loop_params *params = args;
NtSetEvent(params->event, NULL);
return STATUS_SUCCESS;
}
static NTSTATUS unix_get_endpoint_ids(void *args)
{
struct get_endpoint_ids_params *params = args;
......@@ -1775,7 +1782,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
{
unix_not_implemented,
unix_not_implemented,
unix_not_implemented,
unix_main_loop,
unix_get_endpoint_ids,
unix_create_stream,
unix_release_stream,
......@@ -1813,6 +1820,19 @@ unixlib_entry_t __wine_unix_call_funcs[] =
typedef UINT PTR32;
static NTSTATUS unix_wow64_main_loop(void *args)
{
struct
{
PTR32 event;
} *params32 = args;
struct main_loop_params params =
{
.event = ULongToHandle(params32->event)
};
return unix_main_loop(&params);
}
static NTSTATUS unix_wow64_get_endpoint_ids(void *args)
{
struct
......@@ -2157,7 +2177,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] =
{
unix_not_implemented,
unix_not_implemented,
unix_not_implemented,
unix_wow64_main_loop,
unix_wow64_get_endpoint_ids,
unix_wow64_create_stream,
unix_wow64_release_stream,
......
......@@ -70,6 +70,8 @@ static CRITICAL_SECTION_DEBUG g_sessions_lock_debug =
static CRITICAL_SECTION g_sessions_lock = { &g_sessions_lock_debug, -1, 0, 0, 0, 0 };
static struct list g_sessions = LIST_INIT(g_sessions);
extern HRESULT main_loop_start(void) DECLSPEC_HIDDEN;
extern struct audio_session_wrapper *session_wrapper_create(
struct audio_client *client) DECLSPEC_HIDDEN;
......@@ -587,6 +589,11 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
return AUDCLNT_E_ALREADY_INITIALIZED;
}
if(FAILED(params.result = main_loop_start())){
sessions_unlock();
return params.result;
}
params.name = NULL;
params.device = This->device_name;
params.flow = This->dataflow;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment