Huw Davies
186e4ac533
winepulse: Implement Wow64 entry points in the Unix library.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 18:58:28 +02:00
Huw Davies
27cb3324df
winepulse: Limit Wow64 buffer allocations to 32-bit addresses.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 18:58:25 +02:00
Huw Davies
5199420f46
winepulse: Return offsets rather than ptrs to the strings.
...
This will make the Wow64 syscall rather simpler.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 18:58:22 +02:00
Huw Davies
94d3e2b366
winepulse: Use UINT64 handles to represent the stream.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 18:58:18 +02:00
Huw Davies
3b45b4d52e
winepulse: Move "last_time" to a local variable.
...
It's unused outside of pulse_timer_loop().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 21:31:20 +01:00
Mark Harmstone
5a65a60347
winepulse.drv: Implement PKEY_AudioEndpoint_PhysicalSpeakers device prop.
...
And get rid of config->speakers_mask and g_phys_speakers_mask since they
are no longer needed.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Mark Harmstone
0b6640e3e7
winepulse.drv: Fetch actual application name, if possible.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Gabriel Ivăncescu
8ba4e8f85b
winepulse.drv: Implement GetPropValue.
...
Based on a patch by Mark Harmstone <mark@harmstone.com>.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Gabriel Ivăncescu
0f4fe1c149
winepulse.drv: Cache the devices looked up in the registry.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Gabriel Ivăncescu
1ccdbcf475
winepulse.drv: Expose audio devices to the application.
...
This exposes the actual devices (and virtual sinks/sources) as reported by
PulseAudio to an application, allowing it to select the devices itself and,
for example, record from (or render to) two devices at the same time. The
"PulseAudio" device (which is movable) is still the default, as before,
with the same GUID to preserve compatibility with existing setups.
Based on a patch by Mark Harmstone <mark@harmstone.com>, with changes by
Sebastian Lackner <sebastian@fds-team.de>.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Nikolay Sivov
820c77319d
winepulse: Use FAILED() instead of non-zero result check.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +01:00
Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Huw Davies
bbd26ea8e5
winepulse: Remove unnecessary alloc_size.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:57:47 +01:00
Huw Davies
0863a8b0a8
winepulse: Remove unused member "mute".
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:52 +01:00
Andrew Eikum
6fa197c3ec
winepulse.drv: Fix memory leak.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-14 17:30:41 +01:00
Rémi Bernon
033cd6013e
winepulse.drv: Write data to pulse in pulse_release_render_buffer.
...
Instead of waiting for the timer loop, which sometimes causes pulse
buffer underflows.
This greatly reduces the amount of underflows in Prince of Persia: The
Forgotten Sands, as well as in Forza Horizon 4 introduction and menu
audio, which are suffering from audio clicks since PE xaudio conversion.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52225
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:15:02 +01:00
Rémi Bernon
262c52110c
winepulse.drv: Keep buffer size separate from allocated size.
...
So that it rounds to integral audio frame count.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52225
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:15:00 +01:00
Rémi Bernon
6995b77a6d
winepulse.drv: Stop writing the same data again on underflow.
...
Data in [lcl_offs_bytes;lcl_offs_bytes+held_bytes] is the data we've
received from the client and that we consider being used by pulse,
regardless of how we write it to it.
A subset of this is [pa_offs_bytes;pa_offs_bytes+pa_held_bytes], which
is the data we have received from the client but not yet written to
pulse.
If pulsed has underflown it means that it has used all the data we've
written already, and resetting pa_offs_bytes and pa_held_bytes like here
will only make us write the same data again (in addition to silence) to
mend the underflow, ending up with potentially duplicate audio frames
being played.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52225
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:14:56 +01:00
Jacek Caban
a7ecf08040
include: Don't use DECLSPEC_HIDDEN for NTSYSAPI in Unix libs.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Alexandre Julliard
5e0479c497
makefiles: Don't use winegcc to build native Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 11:50:26 +02:00
Alexandre Julliard
ab5664a5e6
makefiles: Explicitly name the Unix library in the makefile instead of using --subsystem unixlib.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 17:49:48 +02:00
Alexandre Julliard
088a787a2c
makefiles: Make -mno-cygwin the default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Francois Gouget
18b98df060
winepulse.drv: Use the official PulseAudio case for the endpoint id.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Alexandre Julliard
e309bad98c
include: Add a private header for Unix libraries definitions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Alexandre Julliard
7d60d0d7bb
winegcc: Use custom subsystem 'unixlib' instead of 'native' for Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 11:33:57 +02:00
Alexandre Julliard
4303e75313
winepulse.drv: Convert the Unix call initialization to NtQueryVirtualMemory().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 18:09:50 +02:00
Jacek Caban
2e64d91428
winepulse: Use syscall interface to call unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 18:18:17 +02:00
Jacek Caban
f77af3dd63
winepulse: Wrap unix call parameters in structs.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 18:00:49 +02:00
Jacek Caban
ce151dd681
winepulse: Use NtAllocateVirtualMemory for local_buffer.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:42:53 +02:00
Jacek Caban
77813eb758
winepulse: Use NtAllocateVirtualMemory for tmp_buffer.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:42:44 +02:00
Jacek Caban
d8e9621cfa
winepulse: Use native memory allocators where possible.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:42:34 +02:00
Jacek Caban
a4149d53f7
winepulse: Use a critical section for PE-side locking.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:42:24 +02:00
Jacek Caban
b4c7823bbb
winepulse: Use event handle to signal main loop readiness.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:42:00 +02:00
Jacek Caban
70f59eb179
winepulse: Build with msvcrt.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
e19d97ff4e
winepulse: Allocate ACImpl volumes when channel count is known.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
4432b66e37
winepulse: Simplify IAudioStreamVolume::GetChannelVolume implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
6a6296562f
winepulse: Simplify IAudioStreamVolume::SetChannelVolume implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
aba40bd50a
winepulse: Move pulse_is_started to unix lib.
...
And move pulse_stream to pulse.c since it's accessed only from unix lib now.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
bf74f36350
winepulse: Simplify checks for stream being initialized.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
1518e73b23
winepulse: Move pulse_get_position to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Jacek Caban
44e4132489
winepulse: Move pulse_get_frequency to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
a6131544e8
winepulse: Move pulse_get_next_packet_size to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
80b996c53c
winepulse: Move pulse_release_capture_buffer to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
459e911b65
winepulse: Move pulse_get_capture_buffer to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
42d826bc8c
winepulse: Move pulse_get_current_padding to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
30c17619e5
winepulse: Move pulse_get_latency to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
af84907cca
winepulse: Move pulse_get_buffer_size to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Jacek Caban
a5997bece7
winepulse: Move pulse_set_event_handle to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:32:10 +02:00
Jacek Caban
24a7c33fc1
winepulse: Move release_render_buffer to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:32:08 +02:00
Jacek Caban
8cb88173d8
winepulse: Move pulse_get_render_buffer to unix lib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:32:06 +02:00