Huw Davies : winecoreaudio: Always start the notification thread.
Alexandre Julliard
julliard at winehq.org
Wed Dec 1 15:23:50 CST 2021
Module: wine
Branch: master
Commit: 14029a47c9ab6d89a25a35da7be07128fbccc4ca
URL: https://source.winehq.org/git/wine.git/?a=commit;h=14029a47c9ab6d89a25a35da7be07128fbccc4ca
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Nov 30 07:56:32 2021 +0000
winecoreaudio: Always start the notification thread.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winecoreaudio.drv/coremidi.c | 9 ++-------
dlls/winecoreaudio.drv/midi.c | 7 +------
dlls/winecoreaudio.drv/unixlib.h | 1 -
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c
index 5777236bd26..8c09d4a2c1b 100644
--- a/dlls/winecoreaudio.drv/coremidi.c
+++ b/dlls/winecoreaudio.drv/coremidi.c
@@ -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 */
diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c
index 262713dd003..6191885553a 100644
--- a/dlls/winecoreaudio.drv/midi.c
+++ b/dlls/winecoreaudio.drv/midi.c
@@ -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;
}
diff --git a/dlls/winecoreaudio.drv/unixlib.h b/dlls/winecoreaudio.drv/unixlib.h
index d44a7a013e8..bd9a5ce03bd 100644
--- a/dlls/winecoreaudio.drv/unixlib.h
+++ b/dlls/winecoreaudio.drv/unixlib.h
@@ -186,7 +186,6 @@ struct set_volumes_params
struct midi_init_params
{
DWORD *err;
- UINT num_srcs;
};
struct notify_context
More information about the wine-cvs
mailing list