From: Huw Davies huw@codeweavers.com
This makes it consistent with the other drivers.
Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/winecoreaudio.drv/coremidi.c | 64 +++++++++++++++---------------- dlls/winecoreaudio.drv/midi.c | 6 +-- dlls/winecoreaudio.drv/unixlib.h | 28 +++++++------- 3 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c index 998b8f1bd46..e8bdbda2185 100644 --- a/dlls/winecoreaudio.drv/coremidi.c +++ b/dlls/winecoreaudio.drv/coremidi.c @@ -116,7 +116,7 @@ struct midi_src MIDIOPENDESC midiDesc; LPMIDIHDR lpQueueHdr; WORD wFlags; - DWORD startTime; + UINT startTime; };
static MIDIClientRef midi_client; @@ -143,7 +143,7 @@ static void midi_in_lock(BOOL lock) }
static void set_in_notify(struct notify_context *notify, struct midi_src *src, WORD dev_id, WORD msg, - DWORD_PTR param_1, DWORD_PTR param_2) + UINT_PTR param_1, UINT_PTR param_2) { notify->send_notify = TRUE; notify->dev_id = dev_id; @@ -220,7 +220,7 @@ static uint64_t get_time_ms(void) static void process_sysex_packet(struct midi_src *src, MIDIPacket *packet) { unsigned int pos = 0, len = packet->length, copy_len; - DWORD current_time = get_time_ms() - src->startTime; + UINT current_time = get_time_ms() - src->startTime; struct notify_context notify;
src->state |= 2; @@ -244,7 +244,7 @@ static void process_sysex_packet(struct midi_src *src, MIDIPacket *packet) src->lpQueueHdr = hdr->lpNext; hdr->dwFlags &= ~MHDR_INQUEUE; hdr->dwFlags |= MHDR_DONE; - set_in_notify(¬ify, src, src->wDevID, MIM_LONGDATA, (DWORD_PTR)hdr, current_time); + set_in_notify(¬ify, src, src->wDevID, MIM_LONGDATA, (UINT_PTR)hdr, current_time); notify_post(¬ify); src->state &= ~2; } @@ -255,7 +255,7 @@ static void process_sysex_packet(struct midi_src *src, MIDIPacket *packet)
static void process_small_packet(struct midi_src *src, MIDIPacket *packet) { - DWORD current_time = get_time_ms() - src->startTime, data; + UINT current_time = get_time_ms() - src->startTime, data; struct notify_context notify; unsigned int pos = 0;
@@ -547,7 +547,7 @@ static BOOL synth_unit_close(AUGraph graph) }
static void set_out_notify(struct notify_context *notify, struct midi_dest *dest, WORD dev_id, WORD msg, - DWORD_PTR param_1, DWORD_PTR param_2) + UINT_PTR param_1, UINT_PTR param_2) { notify->send_notify = TRUE; notify->dev_id = dev_id; @@ -560,7 +560,7 @@ static void set_out_notify(struct notify_context *notify, struct midi_dest *dest notify->instance = dest->midiDesc.dwInstance; }
-static DWORD midi_out_open(WORD dev_id, MIDIOPENDESC *midi_desc, DWORD flags, struct notify_context *notify) +static UINT midi_out_open(WORD dev_id, MIDIOPENDESC *midi_desc, UINT flags, struct notify_context *notify) { struct midi_dest *dest;
@@ -606,7 +606,7 @@ static DWORD midi_out_open(WORD dev_id, MIDIOPENDESC *midi_desc, DWORD flags, st return MMSYSERR_NOERROR; }
-static DWORD midi_out_close(WORD dev_id, struct notify_context *notify) +static UINT midi_out_close(WORD dev_id, struct notify_context *notify) { struct midi_dest *dest;
@@ -642,7 +642,7 @@ static void midi_send(MIDIPortRef port, MIDIEndpointRef dest, UInt8 *buffer, uns if (packet) MIDISend(port, dest, packet_list); }
-static DWORD midi_out_data(WORD dev_id, DWORD data) +static UINT midi_out_data(WORD dev_id, UINT data) { struct midi_dest *dest; UInt8 bytes[3]; @@ -678,7 +678,7 @@ static DWORD midi_out_data(WORD dev_id, DWORD data) return MMSYSERR_NOERROR; }
-static DWORD midi_out_long_data(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size, struct notify_context *notify) +static UINT midi_out_long_data(WORD dev_id, MIDIHDR *hdr, UINT hdr_size, struct notify_context *notify) { struct midi_dest *dest; OSStatus sc; @@ -729,12 +729,12 @@ static DWORD midi_out_long_data(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size, struc hdr->dwFlags &= ~MHDR_INQUEUE; hdr->dwFlags |= MHDR_DONE;
- set_out_notify(notify, dest, dev_id, MOM_DONE, (DWORD_PTR)hdr, 0); + set_out_notify(notify, dest, dev_id, MOM_DONE, (UINT_PTR)hdr, 0);
return MMSYSERR_NOERROR; }
-static DWORD midi_out_prepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) +static UINT midi_out_prepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) { TRACE("dev_id = %d midi_hdr = %p hdr_size = %d\n", dev_id, hdr, hdr_size);
@@ -749,7 +749,7 @@ static DWORD midi_out_prepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) return MMSYSERR_NOERROR; }
-static DWORD midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) +static UINT midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) { TRACE("dev_id = %d midi_hdr = %p hdr_size = %d\n", dev_id, hdr, hdr_size);
@@ -764,7 +764,7 @@ static DWORD midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) return MMSYSERR_NOERROR; }
-static DWORD midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, DWORD size) +static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size) { TRACE("dev_id = %d caps = %p size = %d\n", dev_id, caps, size);
@@ -783,13 +783,13 @@ static DWORD midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, DWORD size) return MMSYSERR_NOERROR; }
-static DWORD midi_out_get_num_devs(void) +static UINT midi_out_get_num_devs(void) { TRACE("\n"); return num_dests; }
-static DWORD midi_out_get_volume(WORD dev_id, DWORD *volume) +static UINT midi_out_get_volume(WORD dev_id, UINT *volume) { TRACE("%d\n", dev_id);
@@ -818,7 +818,7 @@ static DWORD midi_out_get_volume(WORD dev_id, DWORD *volume) return MMSYSERR_NOTSUPPORTED; }
-static DWORD midi_out_set_volume(WORD dev_id, DWORD volume) +static UINT midi_out_set_volume(WORD dev_id, UINT volume) { TRACE("dev_id = %d vol = %08x\n", dev_id, volume);
@@ -843,7 +843,7 @@ static DWORD midi_out_set_volume(WORD dev_id, DWORD volume) return MMSYSERR_NOTSUPPORTED; }
-static DWORD midi_out_reset(WORD dev_id) +static UINT midi_out_reset(WORD dev_id) { unsigned chn;
@@ -870,7 +870,7 @@ static DWORD midi_out_reset(WORD dev_id) return MMSYSERR_NOERROR; }
-static DWORD midi_in_open(WORD dev_id, MIDIOPENDESC *midi_desc, DWORD flags, struct notify_context *notify) +static UINT midi_in_open(WORD dev_id, MIDIOPENDESC *midi_desc, UINT flags, struct notify_context *notify) { struct midi_src *src;
@@ -915,7 +915,7 @@ static DWORD midi_in_open(WORD dev_id, MIDIOPENDESC *midi_desc, DWORD flags, str return MMSYSERR_NOERROR; }
-static DWORD midi_in_close(WORD dev_id, struct notify_context *notify) +static UINT midi_in_close(WORD dev_id, struct notify_context *notify) { struct midi_src *src;
@@ -941,7 +941,7 @@ static DWORD midi_in_close(WORD dev_id, struct notify_context *notify) return MMSYSERR_NOERROR; }
-static DWORD midi_in_add_buffer(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) +static UINT midi_in_add_buffer(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) { MIDIHDR **next;
@@ -984,7 +984,7 @@ static DWORD midi_in_add_buffer(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) return MMSYSERR_NOERROR; }
-static DWORD midi_in_prepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) +static UINT midi_in_prepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) { TRACE("dev_id = %d hdr = %p hdr_size = %d\n", dev_id, hdr, hdr_size);
@@ -999,7 +999,7 @@ static DWORD midi_in_prepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) return MMSYSERR_NOERROR; }
-static DWORD midi_in_unprepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) +static UINT midi_in_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) { TRACE("dev_id = %d hdr = %p hdr_size = %d\n", dev_id, hdr, hdr_size);
@@ -1014,7 +1014,7 @@ static DWORD midi_in_unprepare(WORD dev_id, MIDIHDR *hdr, DWORD hdr_size) return MMSYSERR_NOERROR; }
-static DWORD midi_in_get_devcaps(WORD dev_id, MIDIINCAPSW *caps, DWORD size) +static UINT midi_in_get_devcaps(WORD dev_id, MIDIINCAPSW *caps, UINT size) { TRACE("dev_id = %d caps = %p size = %d\n", dev_id, caps, size);
@@ -1033,13 +1033,13 @@ static DWORD midi_in_get_devcaps(WORD dev_id, MIDIINCAPSW *caps, DWORD size) return MMSYSERR_NOERROR; }
-static DWORD midi_in_get_num_devs(void) +static UINT midi_in_get_num_devs(void) { TRACE("\n"); return num_srcs; }
-static DWORD midi_in_start(WORD dev_id) +static UINT midi_in_start(WORD dev_id) { TRACE("%d\n", dev_id);
@@ -1053,7 +1053,7 @@ static DWORD midi_in_start(WORD dev_id) return MMSYSERR_NOERROR; }
-static DWORD midi_in_stop(WORD dev_id) +static UINT midi_in_stop(WORD dev_id) { TRACE("%d\n", dev_id);
@@ -1066,10 +1066,10 @@ static DWORD midi_in_stop(WORD dev_id) return MMSYSERR_NOERROR; }
-static DWORD midi_in_reset(WORD dev_id, struct notify_context *notify) +static UINT midi_in_reset(WORD dev_id, struct notify_context *notify) { - DWORD cur_time = get_time_ms(); - DWORD err = MMSYSERR_NOERROR; + UINT cur_time = get_time_ms(); + UINT err = MMSYSERR_NOERROR; struct midi_src *src; MIDIHDR *hdr;
@@ -1090,7 +1090,7 @@ static DWORD midi_in_reset(WORD dev_id, struct notify_context *notify) src->lpQueueHdr = hdr->lpNext; hdr->dwFlags &= ~MHDR_INQUEUE; hdr->dwFlags |= MHDR_DONE; - set_in_notify(notify, src, dev_id, MIM_LONGDATA, (DWORD_PTR)hdr, cur_time - src->startTime); + set_in_notify(notify, src, dev_id, MIM_LONGDATA, (UINT)hdr, cur_time - src->startTime); if (src->lpQueueHdr) err = ERROR_RETRY; /* ask the client to call again */ }
@@ -1138,7 +1138,7 @@ NTSTATUS midi_out_message(void *args) *params->err = midi_out_get_num_devs(); break; case MODM_GETVOLUME: - *params->err = midi_out_get_volume(params->dev_id, (DWORD *)params->param_1); + *params->err = midi_out_get_volume(params->dev_id, (UINT *)params->param_1); break; case MODM_SETVOLUME: *params->err = midi_out_set_volume(params->dev_id, params->param_1); diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c index 6c6752c0c76..ea9ec40060a 100644 --- a/dlls/winecoreaudio.drv/midi.c +++ b/dlls/winecoreaudio.drv/midi.c @@ -70,7 +70,7 @@ static DWORD WINAPI notify_thread(void *p) static LONG CoreAudio_MIDIInit(void) { struct midi_init_params params; - DWORD err; + UINT err;
params.err = &err;
@@ -102,7 +102,7 @@ DWORD WINAPI CoreAudio_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, DWOR { struct midi_out_message_params params; struct notify_context notify; - DWORD err; + UINT err;
TRACE("%d %08x %08lx %08lx %08lx\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
@@ -128,7 +128,7 @@ DWORD WINAPI CoreAudio_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, DWOR { struct midi_in_message_params params; struct notify_context notify; - DWORD err; + UINT err;
TRACE("%d %08x %08lx %08lx %08lx\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
diff --git a/dlls/winecoreaudio.drv/unixlib.h b/dlls/winecoreaudio.drv/unixlib.h index d92dbb5e33f..1c7dcebb52d 100644 --- a/dlls/winecoreaudio.drv/unixlib.h +++ b/dlls/winecoreaudio.drv/unixlib.h @@ -185,7 +185,7 @@ struct set_volumes_params
struct midi_init_params { - DWORD *err; + UINT *err; };
struct notify_context @@ -193,22 +193,22 @@ struct notify_context BOOL send_notify; WORD dev_id; WORD msg; - DWORD_PTR param_1; - DWORD_PTR param_2; - DWORD_PTR callback; - DWORD flags; + UINT_PTR param_1; + UINT_PTR param_2; + UINT_PTR callback; + UINT flags; HANDLE device; - DWORD_PTR instance; + UINT_PTR instance; };
struct midi_out_message_params { UINT dev_id; UINT msg; - DWORD_PTR user; - DWORD_PTR param_1; - DWORD_PTR param_2; - DWORD *err; + UINT_PTR user; + UINT_PTR param_1; + UINT_PTR param_2; + UINT *err; struct notify_context *notify; };
@@ -216,10 +216,10 @@ struct midi_in_message_params { UINT dev_id; UINT msg; - DWORD_PTR user; - DWORD_PTR param_1; - DWORD_PTR param_2; - DWORD *err; + UINT_PTR user; + UINT_PTR param_1; + UINT_PTR param_2; + UINT *err; struct notify_context *notify; };