Commit Graph

41 Commits

Author SHA1 Message Date
Rémi Bernon 2e1934598d mmdevapi: Support new AUDCLNT_* creation flags.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25173
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45700
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>
2020-07-13 21:22:11 +02:00
Andrew Eikum 227c47e7a0 mmdevapi: Return E_INVALIDARG for invalid share mode argument.
Matches Windows 10 behavior.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:16:56 +01:00
Andrew Eikum 3c1ee2f80d mmdevapi: Set data pointer to NULL on IAudioCaptureClient::GetBuffer failure.
Matches Windows 10 behavior.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:16:53 +01:00
Andrew Eikum b56d19d3a0 mmdevapi: Avoid reporting odd numbers of channels.
Fixes sound in Touhou Luna Nights with some surround sound
configurations.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-10 23:20:41 +02:00
Gabriel Ivăncescu 1a7026136b winepulse.drv: Add support for A-law and u-law formats with volume changes.
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>
2019-05-28 20:12:22 +02:00
Gabriel Ivăncescu cad249b688 winepulse.drv: Adjust the buffer volume before sending it to PulseAudio.
Only fixes the PulseAudio driver for the first bug, not ALSA.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38182
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46450
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>
2019-05-28 20:11:57 +02:00
Michael Stefaniuc bfb4de3cd9 winepulse.drv: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:02 +02:00
Andrew Eikum 2157afff48 winepulse: Wake all threads when operations are completed.
If threads A and B queue operations simultaneously, it would
previously be possible for B's operation to complete and wake thread A
from cond_wait, which would fail its condition check and then deadlock
as only thread B is awoken when A's operation completes.

This change wakes all threads waiting on the cond var, and each thread
already checks its condition before choosing to continue.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 22:38:59 +01:00
Andrey Gusev d9131acb89 winepulse.drv: Remove redundant comparison.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-17 17:05:13 +02:00
Michael Stefaniuc 703080afb4 winepulse: Avoid casting a COM object to an interface.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:59:44 +01:00
Michael Stefaniuc b7e066eb30 winepulse.drv: Use debugstr_guid() to trace a guid.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-08 21:51:42 +09:00
Andrew Eikum ee2310f767 winepulse.drv: Don't hold PA-owned buffer between capture callbacks.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 12:42:47 +09:00
Andrew Eikum 87754283be winepulse.drv: Downgrade failed server connection message to WARN.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 10:53:25 +09:00
Michael Stefaniuc cd9aa35f68 winepulse: Remove a redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-09 11:03:46 +09:00
Andrew Eikum 0766334d04 winepulse.drv: Check that the server connection actually succeeded.
When there is no PA server running, some older PulseAudio versions
have pa_mainloop_iterate fail instead of setting the connection state
to failed. So, we should also check the connection state after exiting
the loop to ensure it really succeeded before continuing.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-07 13:16:26 +09:00
Alexandre Julliard 9bfff40db5 winepulse.drv: Avoid some printf format warnings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 22:01:26 +09:00
Andrew Eikum 1245f8335c winepulse.drv: Buffer data locally when needed.
PulseAudio doesn't make any buffer size guarantees. With some hardware
and some configurations, PulseAudio will fail to allocate the full
buffer requested by the application. So, we have to store the data
within winepulse until there is enough room in the PulseAudio buffer
to accept it.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:08:26 +09:00
Andrew Eikum 92da5e5d73 winepulse: Include a period in the stream latency.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:08:16 +09:00
Andrew Eikum 899c3fc4c4 winepulse.drv: Avoid unrealistically low period sizes.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:08:12 +09:00
Andrew Eikum a599ea83c8 winepulse.drv: Print a winediag error when PA buffer size is too small.
winepulse depends on PulseAudio to allocate the entire requested
buffer size. If it allocates less than that size, then mmdevapi
clients may not be able to write as much data as they expect. So, we
should warn the user that the PA buffer is too small.

This is a common symptom of users setting the PULSE_LATENCY_MSEC
environment variable, which would help in some situations with
winealsa, but is no longer required with winepulse.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-12 05:30:27 +01:00
Francois Gouget 413c6f60cf Assorted spelling fixes.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-02 12:59:52 +09:00
Svante Signell 9d5173f77d winepulse.drv: Avoid PATH_MAX in Windows code.
Signed-off-by: Svante Signell <svante.signell@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-24 15:54:00 +09:00
André Hentschel 7f6634b2bd winepulse: Add missing return after default case in a switch (Coverity).
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 01:20:38 +09:00
André Hentschel 005ff50252 winepulse: Avoid 32-bit calculation with 64-bit result (Coverity).
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 01:20:38 +09:00
Andrew Eikum a410990f7c winepulse: Prefer PulseAudio driver.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:40 +09:00
Mark Harmstone b56682cc49 winepulse: Return PKEY_AudioEndpoint_PhysicalSpeakers device prop.
Edited by Maarten Lankhorst: No support for multiple devices in winepulse yet.
Synchronous static data initialization by Andrew Eikum <aeikum@codeweavers.com>.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:40 +09:00
Mark Harmstone 8c62cc5e66 winepulse: Add stub for GetPropValue.
Edited by Maarten Lankhorst: No support for multiple devices in winepulse yet.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:40 +09:00
Andrew Eikum 15323580f8 winepulse: In Shared mode, track device position in bytes.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:39 +09:00
Andrew Eikum 8ed553c3c7 winepulse: Always mute buffer.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:39 +09:00
Mark Harmstone 0d7cee0dd6 winepulse: Handle stream create failing correctly.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:39 +09:00
Sebastian Lackner 64e83ddcad winepulse.drv: Add a missing linebreak to ERR message.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:25:36 +09:00
Maarten Lankhorst e1933acb7b winepulse: Add support for IMarshal.
Based on Jeff Klein's patches for the other drivers.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:12:44 +09:00
Maarten Lankhorst cbbe26ea88 winepulse: Fixup IsFormatSupported calls.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:12:27 +09:00
Maarten Lankhorst 10c72255f2 winepulse: Forward winmm functions to winealsa.
PulseAudio doesn't support MIDI, so we forward to ALSA to provide MIDI
support for winepulse users.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:11:50 +09:00
Maarten Lankhorst 63ce6219b5 winepulse: Add session support.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:10:35 +09:00
Maarten Lankhorst 94d88e000a winepulse: Add audiostreamvolume.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 11:10:29 +09:00
Maarten Lankhorst 8f44307741 winepulse: Add IAudioClock and IAudioClock2.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:28 +09:00
Maarten Lankhorst d7eb9090b7 winepulse: Add IAudioRenderClient and IAudioCaptureClient.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:28 +09:00
Maarten Lankhorst 6f632affa7 winepulse: Add audioclient.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:28 +09:00
Maarten Lankhorst 84d1de17eb winepulse: Add format and period probing.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:28 +09:00
Maarten Lankhorst 3fe0c08992 winepulse: Add initial stub for pulseaudio support.
Includes API compatibility patch by Juergen Tretthahn <orson@orson.at>.
Synchronous static data initialization by Andrew Eikum <aeikum@codeweavers.com>.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:27 +09:00