From: Davide Beatrici git@davidebeatrici.dev
--- dlls/winecoreaudio.drv/coreaudio.c | 194 ++++++++++++++--------------- dlls/winecoreaudio.drv/coremidi.c | 26 ++-- dlls/winecoreaudio.drv/unixlib.h | 70 +++++------ 3 files changed, 145 insertions(+), 145 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c index 2a9dcde0675..e69707e8c50 100644 --- a/dlls/winecoreaudio.drv/coreaudio.c +++ b/dlls/winecoreaudio.drv/coreaudio.c @@ -182,7 +182,7 @@ static BOOL device_has_channels(AudioDeviceID device, EDataFlow flow) return ret; }
-static NTSTATUS get_endpoint_ids(void *args) +static NTSTATUS unix_get_endpoint_ids(void *args) { struct get_endpoint_ids_params *params = args; unsigned int num_devices, i, needed, offset; @@ -624,7 +624,7 @@ static ULONG_PTR zero_bits(void) #endif }
-static NTSTATUS create_stream(void *args) +static NTSTATUS unix_create_stream(void *args) { struct create_stream_params *params = args; struct coreaudio_stream *stream = calloc(1, sizeof(*stream)); @@ -719,7 +719,7 @@ end: return STATUS_SUCCESS; }
-static NTSTATUS release_stream( void *args ) +static NTSTATUS unix_release_stream( void *args ) { struct release_stream_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -893,7 +893,7 @@ static DWORD get_channel_mask(unsigned int channels) return 0; }
-static NTSTATUS get_mix_format(void *args) +static NTSTATUS unix_get_mix_format(void *args) { struct get_mix_format_params *params = args; AudioObjectPropertyAddress addr; @@ -995,7 +995,7 @@ static NTSTATUS get_mix_format(void *args) return STATUS_SUCCESS; }
-static NTSTATUS is_format_supported(void *args) +static NTSTATUS unix_is_format_supported(void *args) { struct is_format_supported_params *params = args; const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)params->fmt_in; @@ -1051,7 +1051,7 @@ unsupported: .fmt = params->fmt_out, };
- get_mix_format(&get_mix_params); + unix_get_mix_format(&get_mix_params); params->result = get_mix_params.result; if(SUCCEEDED(params->result)) params->result = S_FALSE; } @@ -1159,7 +1159,7 @@ static void capture_resample(struct coreaudio_stream *stream) } }
-static NTSTATUS get_buffer_size(void *args) +static NTSTATUS unix_get_buffer_size(void *args) { struct get_buffer_size_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1223,7 +1223,7 @@ static HRESULT ca_get_max_stream_latency(struct coreaudio_stream *stream, UInt32 return S_OK; }
-static NTSTATUS get_latency(void *args) +static NTSTATUS unix_get_latency(void *args) { struct get_latency_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1269,7 +1269,7 @@ static UINT32 get_current_padding_nolock(struct coreaudio_stream *stream) return stream->held_frames; }
-static NTSTATUS get_current_padding(void *args) +static NTSTATUS unix_get_current_padding(void *args) { struct get_current_padding_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1281,7 +1281,7 @@ static NTSTATUS get_current_padding(void *args) return STATUS_SUCCESS; }
-static NTSTATUS start(void *args) +static NTSTATUS unix_start(void *args) { struct start_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1300,7 +1300,7 @@ static NTSTATUS start(void *args) return STATUS_SUCCESS; }
-static NTSTATUS stop(void *args) +static NTSTATUS unix_stop(void *args) { struct stop_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1319,7 +1319,7 @@ static NTSTATUS stop(void *args) return STATUS_SUCCESS; }
-static NTSTATUS reset(void *args) +static NTSTATUS unix_reset(void *args) { struct reset_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1347,7 +1347,7 @@ static NTSTATUS reset(void *args) return STATUS_SUCCESS; }
-static NTSTATUS get_render_buffer(void *args) +static NTSTATUS unix_get_render_buffer(void *args) { struct get_render_buffer_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1404,7 +1404,7 @@ end: return STATUS_SUCCESS; }
-static NTSTATUS release_render_buffer(void *args) +static NTSTATUS unix_release_render_buffer(void *args) { struct release_render_buffer_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1448,7 +1448,7 @@ static NTSTATUS release_render_buffer(void *args) return STATUS_SUCCESS; }
-static NTSTATUS get_capture_buffer(void *args) +static NTSTATUS unix_get_capture_buffer(void *args) { struct get_capture_buffer_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1504,7 +1504,7 @@ end: return STATUS_SUCCESS; }
-static NTSTATUS release_capture_buffer(void *args) +static NTSTATUS unix_release_capture_buffer(void *args) { struct release_capture_buffer_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1532,7 +1532,7 @@ static NTSTATUS release_capture_buffer(void *args) return STATUS_SUCCESS; }
-static NTSTATUS get_next_packet_size(void *args) +static NTSTATUS unix_get_next_packet_size(void *args) { struct get_next_packet_size_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1552,7 +1552,7 @@ static NTSTATUS get_next_packet_size(void *args) return STATUS_SUCCESS; }
-static NTSTATUS get_position(void *args) +static NTSTATUS unix_get_position(void *args) { struct get_position_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1576,7 +1576,7 @@ static NTSTATUS get_position(void *args) return STATUS_SUCCESS; }
-static NTSTATUS get_frequency(void *args) +static NTSTATUS unix_get_frequency(void *args) { struct get_frequency_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1590,7 +1590,7 @@ static NTSTATUS get_frequency(void *args) return STATUS_SUCCESS; }
-static NTSTATUS is_started(void *args) +static NTSTATUS unix_is_started(void *args) { struct is_started_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1603,7 +1603,7 @@ static NTSTATUS is_started(void *args) return STATUS_SUCCESS; }
-static NTSTATUS set_volumes(void *args) +static NTSTATUS unix_set_volumes(void *args) { struct set_volumes_params *params = args; struct coreaudio_stream *stream = handle_get_stream(params->stream); @@ -1635,38 +1635,38 @@ static NTSTATUS set_volumes(void *args)
unixlib_entry_t __wine_unix_call_funcs[] = { - get_endpoint_ids, - create_stream, - release_stream, - start, - stop, - reset, - get_render_buffer, - release_render_buffer, - get_capture_buffer, - release_capture_buffer, - get_mix_format, - is_format_supported, - get_buffer_size, - get_latency, - get_current_padding, - get_next_packet_size, - get_position, - get_frequency, - is_started, - set_volumes, - midi_init, - midi_release, - midi_out_message, - midi_in_message, - midi_notify_wait, + unix_get_endpoint_ids, + unix_create_stream, + unix_release_stream, + unix_start, + unix_stop, + unix_reset, + unix_get_render_buffer, + unix_release_render_buffer, + unix_get_capture_buffer, + unix_release_capture_buffer, + unix_get_mix_format, + unix_is_format_supported, + unix_get_buffer_size, + unix_get_latency, + unix_get_current_padding, + unix_get_next_packet_size, + unix_get_position, + unix_get_frequency, + unix_is_started, + unix_set_volumes, + unix_midi_init, + unix_midi_release, + unix_midi_out_message, + unix_midi_in_message, + unix_midi_notify_wait, };
#ifdef _WIN64
typedef UINT PTR32;
-static NTSTATUS wow64_get_endpoint_ids(void *args) +static NTSTATUS unix_wow64_get_endpoint_ids(void *args) { struct { @@ -1683,7 +1683,7 @@ static NTSTATUS wow64_get_endpoint_ids(void *args) .endpoints = ULongToPtr(params32->endpoints), .size = params32->size }; - get_endpoint_ids(¶ms); + unix_get_endpoint_ids(¶ms); params32->size = params.size; params32->result = params.result; params32->num = params.num; @@ -1691,7 +1691,7 @@ static NTSTATUS wow64_get_endpoint_ids(void *args) return STATUS_SUCCESS; }
-static NTSTATUS wow64_create_stream(void *args) +static NTSTATUS unix_wow64_create_stream(void *args) { struct { @@ -1714,12 +1714,12 @@ static NTSTATUS wow64_create_stream(void *args) .fmt = ULongToPtr(params32->fmt), .stream = ULongToPtr(params32->stream) }; - create_stream(¶ms); + unix_create_stream(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_render_buffer(void *args) +static NTSTATUS unix_wow64_get_render_buffer(void *args) { struct { @@ -1735,13 +1735,13 @@ static NTSTATUS wow64_get_render_buffer(void *args) .frames = params32->frames, .data = &data }; - get_render_buffer(¶ms); + unix_get_render_buffer(¶ms); params32->result = params.result; *(unsigned int *)ULongToPtr(params32->data) = PtrToUlong(data); return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_capture_buffer(void *args) +static NTSTATUS unix_wow64_get_capture_buffer(void *args) { struct { @@ -1763,13 +1763,13 @@ static NTSTATUS wow64_get_capture_buffer(void *args) .devpos = ULongToPtr(params32->devpos), .qpcpos = ULongToPtr(params32->qpcpos) }; - get_capture_buffer(¶ms); + unix_get_capture_buffer(¶ms); params32->result = params.result; *(unsigned int *)ULongToPtr(params32->data) = PtrToUlong(data); return STATUS_SUCCESS; };
-static NTSTATUS wow64_is_format_supported(void *args) +static NTSTATUS unix_wow64_is_format_supported(void *args) { struct { @@ -1788,12 +1788,12 @@ static NTSTATUS wow64_is_format_supported(void *args) .fmt_in = ULongToPtr(params32->fmt_in), .fmt_out = ULongToPtr(params32->fmt_out) }; - is_format_supported(¶ms); + unix_is_format_supported(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_mix_format(void *args) +static NTSTATUS unix_wow64_get_mix_format(void *args) { struct { @@ -1808,12 +1808,12 @@ static NTSTATUS wow64_get_mix_format(void *args) .dev_id = params32->dev_id, .fmt = ULongToPtr(params32->fmt) }; - get_mix_format(¶ms); + unix_get_mix_format(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_buffer_size(void *args) +static NTSTATUS unix_wow64_get_buffer_size(void *args) { struct { @@ -1826,12 +1826,12 @@ static NTSTATUS wow64_get_buffer_size(void *args) .stream = params32->stream, .frames = ULongToPtr(params32->frames) }; - get_buffer_size(¶ms); + unix_get_buffer_size(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_latency(void *args) +static NTSTATUS unix_wow64_get_latency(void *args) { struct { @@ -1844,12 +1844,12 @@ static NTSTATUS wow64_get_latency(void *args) .stream = params32->stream, .latency = ULongToPtr(params32->latency) }; - get_latency(¶ms); + unix_get_latency(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_current_padding(void *args) +static NTSTATUS unix_wow64_get_current_padding(void *args) { struct { @@ -1862,12 +1862,12 @@ static NTSTATUS wow64_get_current_padding(void *args) .stream = params32->stream, .padding = ULongToPtr(params32->padding) }; - get_current_padding(¶ms); + unix_get_current_padding(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_next_packet_size(void *args) +static NTSTATUS unix_wow64_get_next_packet_size(void *args) { struct { @@ -1880,12 +1880,12 @@ static NTSTATUS wow64_get_next_packet_size(void *args) .stream = params32->stream, .frames = ULongToPtr(params32->frames) }; - get_next_packet_size(¶ms); + unix_get_next_packet_size(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_position(void *args) +static NTSTATUS unix_wow64_get_position(void *args) { struct { @@ -1900,12 +1900,12 @@ static NTSTATUS wow64_get_position(void *args) .pos = ULongToPtr(params32->pos), .qpctime = ULongToPtr(params32->qpctime) }; - get_position(¶ms); + unix_get_position(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_get_frequency(void *args) +static NTSTATUS unix_wow64_get_frequency(void *args) { struct { @@ -1918,12 +1918,12 @@ static NTSTATUS wow64_get_frequency(void *args) .stream = params32->stream, .freq = ULongToPtr(params32->freq) }; - get_frequency(¶ms); + unix_get_frequency(¶ms); params32->result = params.result; return STATUS_SUCCESS; }
-static NTSTATUS wow64_set_volumes(void *args) +static NTSTATUS unix_wow64_set_volumes(void *args) { struct { @@ -1941,36 +1941,36 @@ static NTSTATUS wow64_set_volumes(void *args) .session_volumes = ULongToPtr(params32->session_volumes), .channel = params32->channel }; - return set_volumes(¶ms); + return unix_set_volumes(¶ms); }
unixlib_entry_t __wine_unix_call_wow64_funcs[] = { - wow64_get_endpoint_ids, - wow64_create_stream, - release_stream, - start, - stop, - reset, - wow64_get_render_buffer, - release_render_buffer, - wow64_get_capture_buffer, - release_capture_buffer, - wow64_get_mix_format, - wow64_is_format_supported, - wow64_get_buffer_size, - wow64_get_latency, - wow64_get_current_padding, - wow64_get_next_packet_size, - wow64_get_position, - wow64_get_frequency, - is_started, - wow64_set_volumes, - wow64_midi_init, - midi_release, - wow64_midi_out_message, - wow64_midi_in_message, - wow64_midi_notify_wait, + unix_wow64_get_endpoint_ids, + unix_wow64_create_stream, + unix_release_stream, + unix_start, + unix_stop, + unix_reset, + unix_wow64_get_render_buffer, + unix_release_render_buffer, + unix_wow64_get_capture_buffer, + unix_release_capture_buffer, + unix_wow64_get_mix_format, + unix_wow64_is_format_supported, + unix_wow64_get_buffer_size, + unix_wow64_get_latency, + unix_wow64_get_current_padding, + unix_wow64_get_next_packet_size, + unix_wow64_get_position, + unix_wow64_get_frequency, + unix_is_started, + unix_wow64_set_volumes, + unix_wow64_midi_init, + unix_midi_release, + unix_wow64_midi_out_message, + unix_wow64_midi_in_message, + unix_wow64_midi_notify_wait, };
#endif /* _WIN64 */ diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c index 445b760be76..c9b377f68b0 100644 --- a/dlls/winecoreaudio.drv/coremidi.c +++ b/dlls/winecoreaudio.drv/coremidi.c @@ -308,7 +308,7 @@ static void midi_in_read_proc(const MIDIPacketList *pktlist, void *refCon, void } }
-NTSTATUS midi_init(void *args) +NTSTATUS unix_midi_init(void *args) { CFStringRef name = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("wineMIDIClient.%d"), getpid()); struct midi_init_params *params = args; @@ -422,7 +422,7 @@ NTSTATUS midi_init(void *args) return STATUS_SUCCESS; }
-NTSTATUS midi_release(void *args) +NTSTATUS unix_midi_release(void *args) { /* stop the notify_wait thread */ notify_post(NULL); @@ -1122,7 +1122,7 @@ static UINT midi_in_reset(WORD dev_id, struct notify_context *notify) return err; }
-NTSTATUS midi_out_message(void *args) +NTSTATUS unix_midi_out_message(void *args) { struct midi_out_message_params *params = args;
@@ -1177,7 +1177,7 @@ NTSTATUS midi_out_message(void *args) return STATUS_SUCCESS; }
-NTSTATUS midi_in_message(void *args) +NTSTATUS unix_midi_in_message(void *args) { struct midi_in_message_params *params = args;
@@ -1229,7 +1229,7 @@ NTSTATUS midi_in_message(void *args) return STATUS_SUCCESS; }
-NTSTATUS midi_notify_wait(void *args) +NTSTATUS unix_midi_notify_wait(void *args) { struct midi_notify_wait_params *params = args;
@@ -1250,7 +1250,7 @@ NTSTATUS midi_notify_wait(void *args)
typedef UINT PTR32;
-NTSTATUS wow64_midi_init(void *args) +NTSTATUS unix_wow64_midi_init(void *args) { struct { @@ -1260,7 +1260,7 @@ NTSTATUS wow64_midi_init(void *args) { .err = ULongToPtr(params32->err) }; - return midi_init(¶ms); + return unix_midi_init(¶ms); }
struct notify_context32 @@ -1343,7 +1343,7 @@ static UINT wow64_midi_out_unprepare(WORD dev_id, struct midi_hdr32 *hdr, UINT h return MMSYSERR_NOERROR; }
-NTSTATUS wow64_midi_out_message(void *args) +NTSTATUS unix_wow64_midi_out_message(void *args) { struct { @@ -1414,7 +1414,7 @@ NTSTATUS wow64_midi_out_message(void *args) return STATUS_SUCCESS; }
- midi_out_message(¶ms); + unix_midi_out_message(¶ms);
switch (params32->msg) { @@ -1467,7 +1467,7 @@ static UINT wow64_midi_in_unprepare(WORD dev_id, struct midi_hdr32 *hdr, UINT hd return MMSYSERR_NOERROR; }
-NTSTATUS wow64_midi_in_message(void *args) +NTSTATUS unix_wow64_midi_in_message(void *args) { struct { @@ -1539,7 +1539,7 @@ NTSTATUS wow64_midi_in_message(void *args) return STATUS_SUCCESS; }
- midi_in_message(¶ms); + unix_midi_in_message(¶ms);
switch (params32->msg) { @@ -1574,7 +1574,7 @@ NTSTATUS wow64_midi_in_message(void *args) return STATUS_SUCCESS; }
-NTSTATUS wow64_midi_notify_wait(void *args) +NTSTATUS unix_wow64_midi_notify_wait(void *args) { struct { @@ -1592,7 +1592,7 @@ NTSTATUS wow64_midi_notify_wait(void *args) }; notify32->send_notify = FALSE;
- midi_notify_wait(¶ms); + unix_midi_notify_wait(¶ms);
if (!*params.quit && notify.send_notify) { diff --git a/dlls/winecoreaudio.drv/unixlib.h b/dlls/winecoreaudio.drv/unixlib.h index 1c7dcebb52d..243430d02ea 100644 --- a/dlls/winecoreaudio.drv/unixlib.h +++ b/dlls/winecoreaudio.drv/unixlib.h @@ -231,46 +231,46 @@ struct midi_notify_wait_params
enum unix_funcs { - unix_get_endpoint_ids, - unix_create_stream, - unix_release_stream, - unix_start, - unix_stop, - unix_reset, - unix_get_render_buffer, - unix_release_render_buffer, - unix_get_capture_buffer, - unix_release_capture_buffer, - unix_get_mix_format, - unix_is_format_supported, - unix_get_buffer_size, - unix_get_latency, - unix_get_current_padding, - unix_get_next_packet_size, - unix_get_position, - unix_get_frequency, - unix_is_started, - unix_set_volumes, - unix_midi_init, - unix_midi_release, - unix_midi_out_message, - unix_midi_in_message, - unix_midi_notify_wait, + get_endpoint_ids, + create_stream, + release_stream, + start, + stop, + reset, + get_render_buffer, + release_render_buffer, + get_capture_buffer, + release_capture_buffer, + get_mix_format, + is_format_supported, + get_buffer_size, + get_latency, + get_current_padding, + get_next_packet_size, + get_position, + get_frequency, + is_started, + set_volumes, + midi_init, + midi_release, + midi_out_message, + midi_in_message, + midi_notify_wait, };
-NTSTATUS midi_init( void * ) DECLSPEC_HIDDEN; -NTSTATUS midi_release( void * ) DECLSPEC_HIDDEN; -NTSTATUS midi_out_message( void * ) DECLSPEC_HIDDEN; -NTSTATUS midi_in_message( void * ) DECLSPEC_HIDDEN; -NTSTATUS midi_notify_wait( void * ) DECLSPEC_HIDDEN; +NTSTATUS unix_midi_init( void * ) DECLSPEC_HIDDEN; +NTSTATUS unix_midi_release( void * ) DECLSPEC_HIDDEN; +NTSTATUS unix_midi_out_message( void * ) DECLSPEC_HIDDEN; +NTSTATUS unix_midi_in_message( void * ) DECLSPEC_HIDDEN; +NTSTATUS unix_midi_notify_wait( void * ) DECLSPEC_HIDDEN;
#ifdef _WIN64 -NTSTATUS wow64_midi_init(void *args) DECLSPEC_HIDDEN; -NTSTATUS wow64_midi_out_message(void *args) DECLSPEC_HIDDEN; -NTSTATUS wow64_midi_in_message(void *args) DECLSPEC_HIDDEN; -NTSTATUS wow64_midi_notify_wait(void *args) DECLSPEC_HIDDEN; +NTSTATUS unix_wow64_midi_init(void *args) DECLSPEC_HIDDEN; +NTSTATUS unix_wow64_midi_out_message(void *args) DECLSPEC_HIDDEN; +NTSTATUS unix_wow64_midi_in_message(void *args) DECLSPEC_HIDDEN; +NTSTATUS unix_wow64_midi_notify_wait(void *args) DECLSPEC_HIDDEN; #endif
extern unixlib_handle_t coreaudio_handle;
-#define UNIX_CALL( func, params ) __wine_unix_call( coreaudio_handle, unix_ ## func, params ) +#define UNIX_CALL( func, params ) __wine_unix_call( coreaudio_handle, func, params )