Commit 14029a47 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winecoreaudio: Always start the notification thread.

parent 61337a1d
......@@ -417,19 +417,14 @@ NTSTATUS midi_init(void *args)
dests[i].caps.wNotes = 0;
}
params->num_srcs = num_srcs;
*params->err = DRV_SUCCESS;
return STATUS_SUCCESS;
}
NTSTATUS midi_release(void *args)
{
if (num_srcs)
{
/* stop the notify_wait thread */
notify_post(NULL);
}
/* stop the notify_wait thread */
notify_post(NULL);
if (midi_client) MIDIClientDispose(midi_client); /* MIDIClientDispose will close all ports */
......
......@@ -45,8 +45,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(midi);
static DWORD MIDIIn_NumDevs = 0;
static void notify_client(struct notify_context *notify)
{
TRACE("dev_id=%d msg=%d param1=%04lX param2=%04lX\n", notify->dev_id, notify->msg, notify->param_1, notify->param_2);
......@@ -87,10 +85,7 @@ static LONG CoreAudio_MIDIInit(void)
return err;
}
MIDIIn_NumDevs = params.num_srcs;
if (MIDIIn_NumDevs > 0)
CloseHandle(CreateThread(NULL, 0, notify_thread, NULL, 0, NULL));
CloseHandle(CreateThread(NULL, 0, notify_thread, NULL, 0, NULL));
return err;
}
......
......@@ -186,7 +186,6 @@ struct set_volumes_params
struct midi_init_params
{
DWORD *err;
UINT num_srcs;
};
struct notify_context
......
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