Commit Graph

117 Commits

Author SHA1 Message Date
Ethan Lee d341efeff0 xaudio2: Use new features from FAudio 19.06 (but keep compatibility for <=19.05).
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:22:22 +02:00
Nikolay Sivov 2de9d9ec44 xaudio2: Fix 32-bit build.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 09:35:46 +02:00
Paul Gofman a5b22c86b4 xaudio2_7: Also preserve %ebx in call_on_voice_processing_pass_start().
It is tested that EBX register is not preserved by
IXAudio2VoiceCallback_OnVoiceProcessingPassStart callback
in League of Legends. It doesn't lead to crash in the
present xaudio, while it might still be a potential issue.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46870
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:38:56 +02:00
Michael Stefaniuc 61d825ca3e xaudio2_7/tests: Remove redundant not-NULL checks (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:47 +01:00
Francois Gouget e664c29351 xaudio2_7: Add a trailing '\n' to an ERR() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:52:06 +01:00
Andrew Eikum 53cd694e6a xaudio2: IXAPO::Process out parameter should not be const.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Ethan Lee b49b78db49 xaudio2: IXAudio23 needs its own interface, for XAUDIO23_VOICE_SENDS parameters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46727
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Ethan Lee ac8be6a1a2 xaudio2: Fix uninitialized variable access (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46724
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Ethan Lee 3e390b1aaf xaudio2: Rewrite to use FAudio.
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 17:35:14 +01:00
Michael Stefaniuc 47fbcece36 xaudio2_7: 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-11-20 16:57:01 +01:00
Sebastian Lackner c649ec3a02 xaudio2: Use assembly wrapper to call OnVoiceProcessingPassStart callback.
During a callback function, some games use the wrong function
signature for an xaudio2 function, which changed between xaudio2
versions.  As a result, the EDI and ESI registers are overwritten by
the game.  Apparently Windows's implementation happens not to use
these registers in a way that causes the crash.

This patch pushes EDI and ESI onto the stack before calling the
callback, then pops them back after the callback exits.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42520
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43358
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:58 +01:00
Roger Zoellner a303f9cd10 xaudio2: Don't return XAudio28 interface for XAudio2[0..7] objects in QueryInterface().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43660
Signed-off-by: Roger Zoellner <zoellner.roger@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 23:09:07 +02:00
Andrew Eikum ff9168a458 xaudio2: IXAPO::Reset returns void.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 12:05:35 +02:00
Andrew Eikum a235530ac5 xaudio2: Fix XAUDIO2_VOICE_SENDS usage before version 2.4.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 12:05:33 +02:00
Michael Stefaniuc 8226f877d9 xaudio2/tests: Use the available 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-05-31 20:00:38 +02:00
Andrew Eikum b747d6f6cc xaudio2: Prefer builtin version.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 21:07:18 +02:00
Andrew Eikum 45babd780f xaudio2: Fix ClassFactory ref counting.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 19:39:12 +01:00
Masanori Kakura 7ff0881775 xaudio2: Partially implement XA2SRC_SetChannelVolumes().
Signed-off-by: Masanori Kakura <kakurasan@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:47 +01:00
Andrew Eikum f57246e5e5 xaudio2: Account for abandoned buffer bytes.
This should fix bug 44148, a regression caused by e2c73fc394.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-11 18:21:29 +01:00
Andrew Eikum e2c73fc394 xaudio2: Ignore buffers returned from OpenAL after Stop.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 19:07:04 +01:00
Kimmo Myllyvirta 8b94c5b51c xaudio2: Add support for float formats with more than 2 channels.
Signed-off-by: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 17:20:16 +01:00
Andrew Eikum 986a14f950 xaudio2: Try to increase OpenAL source limit.
openal-soft recently added support for applications to request new
source count limits. Older versions will silently ignore these
attributes.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:11:27 +02:00
Sebastian Lackner 2fc6720988 xaudio2_7: Only declare debug channel when needed.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:04 -05:00
Andrew Eikum 49078e00a5 xaudio2: Always set current OpenAL context before making AL calls.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:24 +09:00
Andrew Eikum e733770416 xaudio2: Implement GetVoiceDetails for source and submix voices.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-02 13:25:10 +09:00
Andrew Eikum b77ec00f1c xaudio2: Shut down OpenAL in the correct order.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-02 13:25:07 +09:00
Nikolay Sivov 05e39f6af8 xaudio2_7/tests: Use todo_wine_if() in tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-17 13:08:13 +09:00
Sebastian Lackner caff64333f xaudio2_7: Unset DebugInfo->Spare[0] before destroying critical sections.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:06:50 +09:00
Andrew Eikum 7bb885a3d3 xaudio2: Protect access to submix voice during creation (Coverity).
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:18:08 +09:00
Andrew Eikum 2c82e8b477 xaudio2: Protect access to source voice during creation (Coverity).
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:18:05 +09:00
Andrew Eikum ecadabe25b xaudio2: Handle openal source allocation failure.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:46:12 +09:00
Andrew Eikum 3934253513 xaudio2: Report incoming underruns to the application.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-26 14:54:35 +09:00
Andrew Eikum 2b2b179422 xaudio2: Use an HRESULT return code.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-21 17:01:44 +09:00
Andrew Eikum 121a69e028 xaudio2_9: Add xaudio2_9.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 14:48:37 +09:00
Andrew Eikum d9e6a31c6e xaudio2: Don't build interfaces for other versions.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 20:48:07 +09:00
Andrew Eikum fb954b7b9f xaudio2_8: Don't use IXAudio27 interface to call Initialize.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 20:48:07 +09:00
Andrew Eikum 0a8e8d190f xaudio2: Remove run-time versioning of xapo objects.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-17 15:41:12 +09:00
Andrew Eikum fb9f616b2b xaudio2: Remove run-time version checks for XAudio2 object.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-17 15:40:58 +09:00
Alexandre Julliard 668e975446 xaudio2: Remove unnecessary kernel32 imports.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 15:10:25 +09:00
Andrew Eikum 63ef6b9a7d x3daudio1_7: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 15:05:37 +09:00
Andrew Eikum adc6281ea1 xapofx1_1: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 01:44:53 +09:00
Andrew Eikum 80de4ba64d xapofx1_2: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 01:44:53 +09:00
Andrew Eikum 1559b715a8 xapofx1_3: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 01:44:53 +09:00
Andrew Eikum 12d7ce689a xapofx1_4: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 01:44:53 +09:00
Andrew Eikum d8739d4433 xapofx1_5: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 01:44:53 +09:00
Andrew Eikum a6126ea284 xaudio2_0: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 15:54:28 +09:00
Andrew Eikum 719d226392 xaudio2_1: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 15:53:19 +09:00
Andrew Eikum 279b35354d xaudio2_2: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 15:52:19 +09:00
Andrew Eikum 1a08e07e2b xaudio2_3: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 15:51:33 +09:00
Andrew Eikum 2fa2d7f738 xaudio2_4: Use shared source.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-13 15:50:47 +09:00