winecoreaudio: Always start the notification thread.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2021-11-30 07:56:32 +00:00 committed by Alexandre Julliard
parent 61337a1d16
commit 14029a47c9
3 changed files with 3 additions and 14 deletions

View File

@ -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 */

View File

@ -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;
}

View File

@ -186,7 +186,6 @@ struct set_volumes_params
struct midi_init_params
{
DWORD *err;
UINT num_srcs;
};
struct notify_context