Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Fri, Mar 25, 2022 at 08:42:18AM +0000, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/winealsa.drv/alsa.c | 1 - dlls/winealsa.drv/alsamidi.c | 25 ++++++++++++------------- dlls/winealsa.drv/midi.c | 27 --------------------------- dlls/winealsa.drv/unixlib.h | 7 ------- 4 files changed, 12 insertions(+), 48 deletions(-)
diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index e068f6608f3..e5f755b69ed 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -2444,7 +2444,6 @@ unixlib_entry_t __wine_unix_call_funcs[] = set_event_handle, is_started, get_prop_value,
- midi_init, midi_release, midi_out_message, midi_in_message,
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c index 8ec646281d2..476ea383a25 100644 --- a/dlls/winealsa.drv/alsamidi.c +++ b/dlls/winealsa.drv/alsamidi.c @@ -400,27 +400,22 @@ static void port_add(snd_seq_client_info_t* cinfo, snd_seq_port_info_t* pinfo, u } }
-NTSTATUS midi_init(void *args) +static UINT midi_init(void) {
struct midi_init_params *params = args; static BOOL init_done; snd_seq_client_info_t *cinfo; snd_seq_port_info_t *pinfo; snd_seq_t *seq;
if (init_done) {
*params->err = ERROR_ALREADY_INITIALIZED;
return STATUS_SUCCESS;
}
if (init_done)
return ERROR_ALREADY_INITIALIZED;
TRACE("Initializing the MIDI variables.\n"); init_done = TRUE;
/* try to open device */
- if (!(seq = seq_open(NULL))) {
*params->err = ERROR_OPEN_FAILED;
return STATUS_SUCCESS;
- }
if (!(seq = seq_open(NULL)))
return ERROR_OPEN_FAILED;
cinfo = calloc( 1, snd_seq_client_info_sizeof() ); pinfo = calloc( 1, snd_seq_port_info_sizeof() );
@@ -454,11 +449,9 @@ NTSTATUS midi_init(void *args) free( cinfo ); free( pinfo );
*params->err = NOERROR;
TRACE("End\n");
return STATUS_SUCCESS;
- return NOERROR;
}
NTSTATUS midi_release(void *args) @@ -1369,6 +1362,9 @@ NTSTATUS midi_out_message(void *args)
switch (params->msg) {
- case DRVM_INIT:
*params->err = midi_init();
case DRVM_EXIT: case DRVM_ENABLE: case DRVM_DISABLE:break;
@@ -1424,6 +1420,9 @@ NTSTATUS midi_in_message(void *args)
switch (params->msg) {
- case DRVM_INIT:
*params->err = midi_init();
case DRVM_EXIT: case DRVM_ENABLE: case DRVM_DISABLE:break;
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index b768517e655..4db38537dd0 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -59,22 +59,6 @@ static void notify_client(struct notify_context *notify)
MIDI entry points *
*======================================================================*/
-/**************************************************************************
- ALSA_MidiInit [internal]
- Initializes the MIDI devices information variables
- */
-static BOOL ALSA_MidiInit(void) -{
- struct midi_init_params params;
- UINT err;
- params.err = &err;
- ALSA_CALL(midi_init, ¶ms);
- return TRUE;
-}
/**************************************************************************
midMessage (WINEALSA.@)
*/ @@ -87,11 +71,6 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
case DRVM_INIT:
ALSA_MidiInit();
return 0;
}
params.dev_id = wDevID; params.msg = wMsg;
@@ -123,12 +102,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
- switch (wMsg) {
- case DRVM_INIT:
ALSA_MidiInit();
return 0;
- }
- params.dev_id = wDevID; params.msg = wMsg; params.user = dwUser;
diff --git a/dlls/winealsa.drv/unixlib.h b/dlls/winealsa.drv/unixlib.h index ad8865a0988..7d7be1e140d 100644 --- a/dlls/winealsa.drv/unixlib.h +++ b/dlls/winealsa.drv/unixlib.h @@ -207,11 +207,6 @@ struct get_prop_value_params unsigned int *buffer_size; };
-struct midi_init_params -{
- UINT *err;
-};
struct notify_context { BOOL send_notify; @@ -278,14 +273,12 @@ enum alsa_funcs alsa_set_event_handle, alsa_is_started, alsa_get_prop_value,
- alsa_midi_init, alsa_midi_release, alsa_midi_out_message, alsa_midi_in_message, alsa_midi_notify_wait,
};
-NTSTATUS midi_init(void *args) DECLSPEC_HIDDEN; NTSTATUS midi_release(void *args) DECLSPEC_HIDDEN; NTSTATUS midi_out_message(void *args) DECLSPEC_HIDDEN; NTSTATUS midi_in_message(void *args) DECLSPEC_HIDDEN; -- 2.25.1