Rebase against f49b8aec794913f94b30ffbe44dbbafc13eb723b.

This commit is contained in:
Elizabeth Figura
2025-11-19 15:49:54 -06:00
parent 3e92d6c89c
commit 959925fc2f
4 changed files with 1 additions and 178 deletions

View File

@@ -1,23 +0,0 @@
From 9c11f23079351f107a3bbcd3cd274f0a5656518f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 1 Oct 2020 18:37:06 +1000
Subject: [PATCH] x3daudio1_7: Create import library
---
dlls/x3daudio1_7/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in
index c6a8ed5102a..323d3fad60a 100644
--- a/dlls/x3daudio1_7/Makefile.in
+++ b/dlls/x3daudio1_7/Makefile.in
@@ -1,5 +1,6 @@
EXTRADEFS = -DX3DAUDIO1_VER=7 -DXAUDIO2_VER=7
MODULE = x3daudio1_7.dll
+IMPORTLIB = x3daudio1_7
PARENTSRC = ../xaudio2_7
IMPORTS = $(FAUDIO_PE_LIBS)
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
--
2.33.0

View File

@@ -1,149 +0,0 @@
From d64e7549840a2b59682be076a6cb540a9f7143b7 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 1 Oct 2020 18:34:23 +1000
Subject: [PATCH] xactengine3_7/tests: Add Global settings test
---
dlls/xactengine3_7/tests/Makefile.in | 3 +-
dlls/xactengine3_7/tests/globals.xgs | Bin 0 -> 440 bytes
dlls/xactengine3_7/tests/rsrc.rc | 22 ++++++++++
dlls/xactengine3_7/tests/xact3.c | 61 +++++++++++++++++++++++++++
4 files changed, 85 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine3_7/tests/globals.xgs
create mode 100644 dlls/xactengine3_7/tests/rsrc.rc
diff --git a/dlls/xactengine3_7/tests/Makefile.in b/dlls/xactengine3_7/tests/Makefile.in
index 54046e85b88..a749ff99ebc 100644
--- a/dlls/xactengine3_7/tests/Makefile.in
+++ b/dlls/xactengine3_7/tests/Makefile.in
@@ -1,5 +1,6 @@
TESTDLL = xactengine3_7.dll
-IMPORTS = ole32
+IMPORTS = ole32 x3daudio1_7
SOURCES = \
+ rsrc.rc \
xact3.c
diff --git a/dlls/xactengine3_7/tests/globals.xgs b/dlls/xactengine3_7/tests/globals.xgs
new file mode 100644
index 0000000000000000000000000000000000000000..37bd75b44d64fdf0862ba41c5548ec140f6607e6
GIT binary patch
literal 440
zcmZ8cF;2rk5FFb;L=nLwsF0vai3CxsL@7cLMuL*V*@R0jXUjgf$Uoo@e1L`@Af=?E
z-~&8>iq5R>EJ(Q1&d!YXR&zIlsDF$@e3d63Q8j;i_ksW|?DKVJ#BIT~;`-!jd%zLb
zH}h-m)%sztc3%9-GGL7bdyU7f4FAOKyuTsZZmjbPbb2hxQ)iTCyY)*e4$QC_W68qX
zjKPuo#&H4buxwgv+0X-(+zEw{rlL>=qav3vd<6d%0Uox0J@?-kFW5q6*F0E!wD`oh
zgJ;Xni)F8%q0WuaG3DqQBjUxCToNuxk;uvNaVAL{VPvAadZq|rlBSBX3u)r}C>Ba&
Sh*F}-cp4>zo*<NNBYptThnF`1
literal 0
HcmV?d00001
diff --git a/dlls/xactengine3_7/tests/rsrc.rc b/dlls/xactengine3_7/tests/rsrc.rc
new file mode 100644
index 00000000000..2c1961c727a
--- /dev/null
+++ b/dlls/xactengine3_7/tests/rsrc.rc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * 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 "windef.h"
+
+/* @makedep: globals.xgs*/
+globals.xgs RCDATA "globals.xgs"
diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c
index 48a5f0a4374..d1e168d1489 100644
--- a/dlls/xactengine3_7/tests/xact3.c
+++ b/dlls/xactengine3_7/tests/xact3.c
@@ -287,11 +287,72 @@ static void test_notifications(void)
DeleteFileW(filename);
}
+static void test_global_properties(void)
+{
+ HRESULT hr;
+ IXACT3Engine *engine;
+ XACTVARIABLEINDEX index;
+ XACTVARIABLEVALUE value;
+ HRSRC res;
+ void *ptr;
+ XACT_RUNTIME_PARAMETERS xparams = {0};
+ WAVEFORMATEXTENSIBLE format;
+ X3DAUDIO_HANDLE instance = {0};
+
+ hr = CoCreateInstance(&CLSID_XACTEngine, NULL, CLSCTX_INPROC_SERVER, &IID_IXACT3Engine, (void**)&engine);
+
+ if (FAILED(hr))
+ {
+ win_skip("IXACT3Engine Unsupported.\n");
+ return;
+ }
+
+ index = IXACT3Engine_GetGlobalVariableIndex(engine, "SpeedOfSound");
+ ok(index == XACTVARIABLEINDEX_INVALID , "Found variable 0x%08x\n", index);
+
+ res = FindResourceW(NULL, L"globals.xgs", (LPCWSTR)RT_RCDATA);
+
+ ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res));
+
+ xparams.lookAheadTime = 250;
+ xparams.globalSettingsBufferSize = SizeofResource( GetModuleHandleA(NULL), res);
+ xparams.pGlobalSettingsBuffer = ptr;
+ hr = IXACT3Engine_Initialize(engine, &xparams);
+ ok(hr == S_OK ||
+ hr == XAUDIO2_E_INVALID_CALL /* Vista */, "got 0x%08lx\n", hr);
+ if (FAILED(hr))
+ goto end;
+
+ index = IXACT3Engine_GetGlobalVariableIndex(engine, "SpeedOfSound");
+ ok(index != XACTVARIABLEINDEX_INVALID, "Failed to find variable %d\n", index);
+
+ value = 0.1f;
+ hr = IXACT3Engine_GetGlobalVariable(engine, index, &value);
+ ok(hr == S_OK, "got 0x%08lx\n", hr);
+ ok(value == 0.0f, "got %f\n", value);
+
+ hr = IXACT3Engine_GetFinalMixFormat(engine, &format);
+ ok(hr == S_OK, "got 0x%08lx\n", hr);
+
+ /* Invalid SpeedOfSound value */
+ X3DAudioInitialize(format.dwChannelMask, value, instance);
+ ok(instance[0] != 0, "got 0x%08x\n", instance[0]);
+
+ hr = IXACT3Engine_GetGlobalVariable(engine, index, &value);
+ ok(hr == S_OK, "got 0x%08lx\n", hr);
+ ok(value == 0.0f, "got %f\n", value);
+
+end:
+ IXACT3Engine_Release(engine);
+
+}
+
START_TEST(xact3)
{
CoInitialize(NULL);
test_interfaces();
+ test_global_properties();
test_notifications();
CoUninitialize();
--
2.43.0

View File

@@ -1,5 +0,0 @@
Fixes: [31476] Support Bully Scholarship Edition xactengine3_1.dll.
Fixes: [38615] DSA: Drakensang Demo fails on IXACTEngine::Initialize
Fixes: [41030] Pac-Man Museum requires xactengine3_7
Fixes: [41045] Captain Morgane requires xactengine3_4
Fixes: [48684] BlazBlue: Calamity Trigger requires for xactengine 3.3 interface.