Commit Graph

31 Commits

Author SHA1 Message Date
Huw Davies 14029a47c9 winecoreaudio: Always start the notification thread.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Huw Davies 92f7c86f68 winecoreaudio: Move the midi input event processing to the unixlib.
Notifications of incoming data are now directly added to a notify
ring-buffer by macOS's midi read callback.  The ring-buffer is
implemented with an unused sentinel directly before the read ptr to
distinguish between the full vs empty state.  Notifications are
processed by the client's notify thread via the midi_notify_wait
syscall.

Note that the read callback thread is not a Win32 thread, so the
Win32 api cannot be used in anything that it calls.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Huw Davies 06bb1bdb14 winecoreaudio: Introduce a notification thread.
Currently the thread just blocks until told to quit by midi_release.
Eventually, this thread will dispatch the MIM_DATA and MIM_LONGDATA
notifications and essentially replace the existing RunLoop-based
mechanism.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Huw Davies 9eeee3ddbf winecoreaudio: Move the midi in lock to the unixlib.
The syscall itself is temporary.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Huw Davies a9dec89f49 winecoreaudio: Move midi_in_open to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Huw Davies b74a8ab202 winecoreaudio: Move midi_out_reset to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:10:48 +01:00
Huw Davies ec9d2a7773 winecoreaudio: Move midi_out_open to the unixlib.
Notifications are filled out by the unixlib and returned to
the user-side for dispatch.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:10:30 +01:00
Huw Davies e506d99ceb winecoreaudio: Move midi_init and midi_release to the unixlib.
midi_init temporarily returns unix-side info, which will eventually
be removed.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:10:28 +01:00
Huw Davies 37265acd51 winecoreaudio: Make the coreaudio_stream structure private to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:56 +01:00
Huw Davies b3bfa1e54b winecoreaudio: Move set_volumes to the unixlib.
The session setvol helper has been removed to reduce the number of
helper functions as the loop over the session's clients isn't very
complicated.

Session mute is handled by setting the master volume to zero.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:53 +01:00
Huw Davies 22981cc913 winecoreaudio: Move is_started to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:51 +01:00
Huw Davies b884ca314d winecoreaudio: Move get_frequency to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:49 +01:00
Huw Davies 46f5083e23 winecoreaudio: Move get_position to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:42 +01:00
Huw Davies 5ff056f399 winecoreaudio: Move get_next_packet_size to the unixlib.
The capture_resample syscall can now be removed.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:47:39 +01:00
Huw Davies 58c8cafb10 winecoreaudio: Move release_capture_buffer to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:13 +01:00
Huw Davies d9a2ae562c winecoreaudio: Move get_capture_buffer to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies e9b9229754 winecoreaudio: Move release_render_buffer to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies c45df2763c winecoreaudio: Move get_render_buffer to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 5e97e50e95 winecoreaudio: Move reset to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies ac960ef94d winecoreaudio: Move stop to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 272a7b0ba5 winecoreaudio: Move start to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 2dd83eed7b winecoreaudio: Move get_current_padding to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 881e0f18fb winecoreaudio: Move get_latency to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 68c63beeca winecoreaudio: Move get_buffer_size to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies de39001552 winecoreaudio: Add a temporary capture_resample syscall.
Eventually everything that calls this will reside in the unixlib.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies 75b57ea13d winecoreaudio: Move is_format_supported to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:12 +01:00
Huw Davies bdbb8591c6 winecoreaudio: Move get_mix_format to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Huw Davies 129c7fafe6 winecoreaudio: Move create_stream and release_stream to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Huw Davies 7d76fee5f4 winecoreaudio: Use NtAllocateVirtualMemory() for local and tmp buffers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Huw Davies 9281d01544 winecoreaudio: Introduce a stream structure.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 16:23:14 +01:00
Huw Davies c84923b200 winecoreaudio: Move get_endpoint_ids to a unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 16:23:01 +01:00