From: Davide Beatrici git@davidebeatrici.dev
--- dlls/winecoreaudio.drv/coreaudio.c | 30 +++- dlls/winecoreaudio.drv/mmdevdrv.c | 8 - dlls/winecoreaudio.drv/unixlib.h | 244 +---------------------------- 3 files changed, 25 insertions(+), 257 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c index 697b2411376..d8f3373455b 100644 --- a/dlls/winecoreaudio.drv/coreaudio.c +++ b/dlls/winecoreaudio.drv/coreaudio.c @@ -1637,31 +1637,40 @@ static NTSTATUS unix_set_volumes(void *args)
unixlib_entry_t __wine_unix_call_funcs[] = { + NULL, + NULL, + NULL, unix_get_endpoint_ids, unix_create_stream, unix_release_stream, unix_start, unix_stop, unix_reset, + NULL, 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_mix_format, + NULL, 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_get_position, unix_set_volumes, + NULL, + NULL, + unix_is_started, + NULL, unix_midi_init, unix_midi_release, unix_midi_out_message, unix_midi_in_message, unix_midi_notify_wait, + NULL, };
#ifdef _WIN64 @@ -1972,31 +1981,40 @@ static NTSTATUS unix_wow64_set_volumes(void *args)
unixlib_entry_t __wine_unix_call_wow64_funcs[] = { + NULL, + NULL, + NULL, unix_wow64_get_endpoint_ids, unix_wow64_create_stream, unix_wow64_release_stream, unix_start, unix_stop, unix_reset, + NULL, 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_mix_format, + NULL, 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_get_position, unix_wow64_set_volumes, + NULL, + NULL, + unix_is_started, + NULL, unix_wow64_midi_init, unix_midi_release, unix_wow64_midi_out_message, unix_wow64_midi_in_message, unix_wow64_midi_notify_wait, + NULL, };
#endif /* _WIN64 */ diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 2a23b95ff7e..9468ef714e1 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -215,14 +215,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) return TRUE; }
-/* From <dlls/mmdevapi/mmdevapi.h> */ -enum DriverPriority { - Priority_Unavailable = 0, - Priority_Low, - Priority_Neutral, - Priority_Preferred -}; - int WINAPI AUDDRV_GetPriority(void) { return Priority_Neutral; diff --git a/dlls/winecoreaudio.drv/unixlib.h b/dlls/winecoreaudio.drv/unixlib.h index b91f90496d5..caa352d2dfa 100644 --- a/dlls/winecoreaudio.drv/unixlib.h +++ b/dlls/winecoreaudio.drv/unixlib.h @@ -17,250 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "mmddk.h"
-typedef UINT64 stream_handle; - -struct endpoint -{ - unsigned int name; - unsigned int device; -}; - -struct get_endpoint_ids_params -{ - EDataFlow flow; - struct endpoint *endpoints; - unsigned int size; - HRESULT result; - unsigned int num; - unsigned int default_idx; -}; - -struct create_stream_params -{ - const char *name; - const char *device; - EDataFlow flow; - AUDCLNT_SHAREMODE share; - DWORD flags; - REFERENCE_TIME duration; - REFERENCE_TIME period; - const WAVEFORMATEX *fmt; - HRESULT result; - UINT32 *channel_count; - stream_handle *stream; -}; - -struct release_stream_params -{ - stream_handle stream; - HANDLE timer_thread; - HRESULT result; -}; - -struct start_params -{ - stream_handle stream; - HRESULT result; -}; - -struct stop_params -{ - stream_handle stream; - HRESULT result; -}; - -struct reset_params -{ - stream_handle stream; - HRESULT result; -}; - -struct get_render_buffer_params -{ - stream_handle stream; - UINT32 frames; - HRESULT result; - BYTE **data; -}; - -struct release_render_buffer_params -{ - stream_handle stream; - UINT32 written_frames; - UINT flags; - HRESULT result; -}; - -struct get_capture_buffer_params -{ - stream_handle stream; - HRESULT result; - BYTE **data; - UINT32 *frames; - UINT *flags; - UINT64 *devpos; - UINT64 *qpcpos; -}; - -struct release_capture_buffer_params -{ - stream_handle stream; - UINT32 done; - HRESULT result; -}; - -struct get_mix_format_params -{ - const char *device; - EDataFlow flow; - WAVEFORMATEXTENSIBLE *fmt; - HRESULT result; -}; - -struct is_format_supported_params -{ - const char *device; - EDataFlow flow; - AUDCLNT_SHAREMODE share; - const WAVEFORMATEX *fmt_in; - WAVEFORMATEXTENSIBLE *fmt_out; - HRESULT result; -}; - -struct get_buffer_size_params -{ - stream_handle stream; - HRESULT result; - UINT32 *frames; -}; - -struct get_latency_params -{ - stream_handle stream; - HRESULT result; - REFERENCE_TIME *latency; -}; - -struct get_current_padding_params -{ - stream_handle stream; - HRESULT result; - UINT32 *padding; -}; - -struct get_next_packet_size_params -{ - stream_handle stream; - HRESULT result; - UINT32 *frames; -}; - -struct get_position_params -{ - stream_handle stream; - HRESULT result; - UINT64 *pos; - UINT64 *qpctime; -}; - -struct get_frequency_params -{ - stream_handle stream; - HRESULT result; - UINT64 *freq; -}; - -struct is_started_params -{ - stream_handle stream; - HRESULT result; -}; - -struct set_volumes_params -{ - stream_handle stream; - float master_volume; - const float *volumes; - const float *session_volumes; - int channel; -}; - -struct midi_init_params -{ - UINT *err; -}; - -struct notify_context -{ - BOOL send_notify; - WORD dev_id; - WORD msg; - UINT_PTR param_1; - UINT_PTR param_2; - UINT_PTR callback; - UINT flags; - HANDLE device; - UINT_PTR instance; -}; - -struct midi_out_message_params -{ - UINT dev_id; - UINT msg; - UINT_PTR user; - UINT_PTR param_1; - UINT_PTR param_2; - UINT *err; - struct notify_context *notify; -}; - -struct midi_in_message_params -{ - UINT dev_id; - UINT msg; - UINT_PTR user; - UINT_PTR param_1; - UINT_PTR param_2; - UINT *err; - struct notify_context *notify; -}; - -struct midi_notify_wait_params -{ - struct notify_context *notify; - BOOL *quit; -}; - -enum unix_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, -}; +#include "../mmdevapi/unixlib.h"
NTSTATUS unix_midi_init( void * ) DECLSPEC_HIDDEN; NTSTATUS unix_midi_release( void * ) DECLSPEC_HIDDEN;