diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 37a78610..3681a44b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -5027,12 +5027,13 @@ fi # | * [#48684] BlazBlue: Calamity Trigger requires for xactengine 3.3 interface. # | # | Modified files: -# | * dlls/x3daudio1_7/Makefile.in, dlls/xaudio2_7/tests/Makefile.in, dlls/xaudio2_7/tests/globals.xgs, -# | dlls/xaudio2_7/tests/rsrc.rc, dlls/xaudio2_7/tests/xact.c, dlls/xaudio2_7/tests/xaudio2.c +# | * dlls/x3daudio1_7/Makefile.in, dlls/xactengine3_7/tests/Makefile.in, dlls/xactengine3_7/tests/globals.xgs, +# | dlls/xactengine3_7/tests/rsrc.rc, dlls/xactengine3_7/tests/xact3.c # | if test "$enable_xactengine_initial" -eq 1; then - patch_apply xactengine-initial/0011-xaudio2_7-Initial-IXACT3Engine-tests.patch - patch_apply xactengine-initial/0016-xaudio2_7-tests-Add-more-tests.patch + patch_apply xactengine-initial/0001-x3daudio1_7-Create-import-library.patch + patch_apply xactengine-initial/0002-xactengine3_7-Initial-IXACT3Engine-tests.patch + patch_apply xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch fi # Patchset xactengine2-dll diff --git a/patches/xactengine-initial/0001-x3daudio1_7-Create-import-library.patch b/patches/xactengine-initial/0001-x3daudio1_7-Create-import-library.patch new file mode 100644 index 00000000..0c84c6f8 --- /dev/null +++ b/patches/xactengine-initial/0001-x3daudio1_7-Create-import-library.patch @@ -0,0 +1,23 @@ +From 03d74fd162643ccc362dd3405a1df0328645cf24 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +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 267a93fd6da..5438bc6d801 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 + EXTRALIBS = $(FAUDIO_LIBS) + EXTRAINCL = $(FAUDIO_CFLAGS) +-- +2.28.0 + diff --git a/patches/xactengine-initial/0002-xactengine3_7-Initial-IXACT3Engine-tests.patch b/patches/xactengine-initial/0002-xactengine3_7-Initial-IXACT3Engine-tests.patch new file mode 100644 index 00000000..c8d7fcd3 --- /dev/null +++ b/patches/xactengine-initial/0002-xactengine3_7-Initial-IXACT3Engine-tests.patch @@ -0,0 +1,133 @@ +From 22c14dbdcad2e20cadb80f0353727875583a39fc Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 14 Jan 2020 13:42:48 +1100 +Subject: [PATCH] xactengine3_7: Initial IXACT3Engine tests + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/xactengine3_7/tests/Makefile.in | 5 ++ + dlls/xactengine3_7/tests/xact3.c | 100 +++++++++++++++++++++++++++ + 2 files changed, 105 insertions(+) + create mode 100644 dlls/xactengine3_7/tests/Makefile.in + create mode 100644 dlls/xactengine3_7/tests/xact3.c + +diff --git a/dlls/xactengine3_7/tests/Makefile.in b/dlls/xactengine3_7/tests/Makefile.in +new file mode 100644 +index 00000000000..c32b2562546 +--- /dev/null ++++ b/dlls/xactengine3_7/tests/Makefile.in +@@ -0,0 +1,5 @@ ++TESTDLL = xactengine3_7.dll ++IMPORTS = ole32 ++ ++C_SRCS = \ ++ xact3.c +diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c +new file mode 100644 +index 00000000000..9b0d3defb09 +--- /dev/null ++++ b/dlls/xactengine3_7/tests/xact3.c +@@ -0,0 +1,100 @@ ++/* ++ * Copyright (c) 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 ++#include ++#include ++#include ++ ++#define COBJMACROS ++#include "wine/test.h" ++ ++#include "x3daudio.h" ++ ++#include "initguid.h" ++#include "xact3.h" ++ ++DEFINE_GUID(IID_IXACT3Engine30, 0x9e33f661, 0x2d07, 0x43ec, 0x97, 0x04, 0xbb, 0xcb, 0x71, 0xa5, 0x49, 0x72); ++DEFINE_GUID(IID_IXACT3Engine31, 0xe72c1b9a, 0xd717, 0x41c0, 0x81, 0xa6, 0x50, 0xeb, 0x56, 0xe8, 0x06, 0x49); ++ ++DEFINE_GUID(CLSID_XACTEngine30, 0x3b80ee2a, 0xb0f5, 0x4780, 0x9e, 0x30, 0x90, 0xcb, 0x39, 0x68, 0x5b, 0x03); ++DEFINE_GUID(CLSID_XACTEngine31, 0x962f5027, 0x99be, 0x4692, 0xa4, 0x68, 0x85, 0x80, 0x2c, 0xf8, 0xde, 0x61); ++DEFINE_GUID(CLSID_XACTEngine32, 0xd3332f02, 0x3dd0, 0x4de9, 0x9a, 0xec, 0x20, 0xd8, 0x5c, 0x41, 0x11, 0xb6); ++DEFINE_GUID(CLSID_XACTEngine33, 0x94c1affa, 0x66e7, 0x4961, 0x95, 0x21, 0xcf, 0xde, 0xf3, 0x12, 0x8d, 0x4f); ++DEFINE_GUID(CLSID_XACTEngine34, 0x0977d092, 0x2d95, 0x4e43, 0x8d, 0x42, 0x9d, 0xdc, 0xc2, 0x54, 0x5e, 0xd5); ++DEFINE_GUID(CLSID_XACTEngine35, 0x074b110f, 0x7f58, 0x4743, 0xae, 0xa5, 0x12, 0xf1, 0x5b, 0x50, 0x74, 0xed); ++DEFINE_GUID(CLSID_XACTEngine36, 0x248d8a3b, 0x6256, 0x44d3, 0xa0, 0x18, 0x2a, 0xc9, 0x6c, 0x45, 0x9f, 0x47); ++ ++struct xact_interfaces ++{ ++ REFGUID clsid; ++ REFIID iid; ++ HRESULT expected; ++} xact_interfaces[] = ++{ ++ {&CLSID_XACTEngine30, &IID_IXACT3Engine30, S_OK }, ++ {&CLSID_XACTEngine30, &IID_IXACT3Engine31, E_NOINTERFACE}, ++ {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE }, ++ ++ /* Version 3.1 to 3.4 use the same inteface */ ++ {&CLSID_XACTEngine31, &IID_IXACT3Engine31, S_OK }, ++ {&CLSID_XACTEngine32, &IID_IXACT3Engine31, S_OK }, ++ {&CLSID_XACTEngine33, &IID_IXACT3Engine31, S_OK }, ++ {&CLSID_XACTEngine34, &IID_IXACT3Engine31, S_OK }, ++ ++ /* Version 3.5 to 3.7 use the same inteface */ ++ {&CLSID_XACTEngine35, &IID_IXACT3Engine31, E_NOINTERFACE }, ++ {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK }, ++ ++ {&CLSID_XACTEngine36, &IID_IXACT3Engine31, E_NOINTERFACE }, ++ {&CLSID_XACTEngine36, &IID_IXACT3Engine, S_OK }, ++ ++ {&CLSID_XACTEngine, &IID_IXACT3Engine31, E_NOINTERFACE }, ++ {&CLSID_XACTEngine, &IID_IXACT3Engine, S_OK }, ++ {&CLSID_XACTEngine, &IID_IUnknown, S_OK }, ++}; ++ ++static void test_interfaces(void) ++{ ++ IUnknown *unk; ++ HRESULT hr; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(xact_interfaces); i++) ++ { ++ hr = CoCreateInstance(xact_interfaces[i].clsid, NULL, CLSCTX_INPROC_SERVER, ++ xact_interfaces[i].iid, (void**)&unk); ++ if (hr == REGDB_E_CLASSNOTREG) ++ { ++ trace("%d %s not registered. Skipping\n", i, wine_dbgstr_guid(xact_interfaces[i].clsid) ); ++ continue; ++ } ++ ok(hr == xact_interfaces[i].expected, "%d, Unexpected value 0x%08x\n", i, hr); ++ if (hr == S_OK) ++ IUnknown_Release(unk); ++ } ++} ++ ++START_TEST(xact3) ++{ ++ CoInitialize(NULL); ++ ++ test_interfaces(); ++ ++ CoUninitialize(); ++} +-- +2.28.0 + diff --git a/patches/xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch b/patches/xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch new file mode 100644 index 00000000..466f28a6 --- /dev/null +++ b/patches/xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch @@ -0,0 +1,150 @@ +From 15db62a185b57a926dec63b48267bd7550f3e4f3 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Thu, 1 Oct 2020 18:34:23 +1000 +Subject: [PATCH] xactengine3_7/tests: Add Global settings test + +--- + dlls/xactengine3_7/tests/Makefile.in | 5 ++- + dlls/xactengine3_7/tests/globals.xgs | Bin 0 -> 440 bytes + dlls/xactengine3_7/tests/rsrc.rc | 22 ++++++++++ + dlls/xactengine3_7/tests/xact3.c | 60 +++++++++++++++++++++++++++ + 4 files changed, 86 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 c32b2562546..0da28c85922 100644 +--- a/dlls/xactengine3_7/tests/Makefile.in ++++ b/dlls/xactengine3_7/tests/Makefile.in +@@ -1,5 +1,8 @@ + TESTDLL = xactengine3_7.dll +-IMPORTS = ole32 ++IMPORTS = ole32 x3daudio1_7 + + C_SRCS = \ + xact3.c ++ ++RC_SRCS = \ ++ rsrc.rc +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* -Date: Tue, 14 Jan 2020 13:42:48 +1100 -Subject: [PATCH] xaudio2_7: Initial IXACT3Engine tests - -Signed-off-by: Alistair Leslie-Hughes ---- - dlls/xaudio2_7/tests/Makefile.in | 1 + - dlls/xaudio2_7/tests/xact.c | 88 ++++++++++++++++++++++++++++++++ - dlls/xaudio2_7/tests/xaudio2.c | 2 +- - 3 files changed, 90 insertions(+), 1 deletion(-) - create mode 100644 dlls/xaudio2_7/tests/xact.c - -diff --git a/dlls/xaudio2_7/tests/Makefile.in b/dlls/xaudio2_7/tests/Makefile.in -index ba56d94a1f..ecd728d659 100644 ---- a/dlls/xaudio2_7/tests/Makefile.in -+++ b/dlls/xaudio2_7/tests/Makefile.in -@@ -2,4 +2,5 @@ TESTDLL = xaudio2_7.dll - IMPORTS = ole32 - - C_SRCS = \ -+ xact.c \ - xaudio2.c -diff --git a/dlls/xaudio2_7/tests/xact.c b/dlls/xaudio2_7/tests/xact.c -new file mode 100644 -index 0000000000..afe8e4d83a ---- /dev/null -+++ b/dlls/xaudio2_7/tests/xact.c -@@ -0,0 +1,88 @@ -+/* -+ * Copyright (c) 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 -+#include -+ -+#define COBJMACROS -+#include "wine/test.h" -+ -+#include "xact3.h" -+ -+#include "initguid.h" -+DEFINE_GUID(IID_IXACT3Engine301, 0xe72c1b9a, 0xd717, 0x41c0, 0x81, 0xa6, 0x50, 0xeb, 0x56, 0xe8, 0x06, 0x49); -+ -+struct xact_interfaces -+{ -+ REFGUID clsid; -+ REFIID iid; -+ HRESULT expected; -+ BOOL todo; -+} xact_interfaces[] = -+{ -+ {&CLSID_XACTEngine30, &IID_IXACT3Engine301, E_NOINTERFACE, TRUE }, -+ {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE, TRUE }, -+ -+ /* Version 3.1 to 3.4 use the same inteface */ -+ {&CLSID_XACTEngine31, &IID_IXACT3Engine301, S_OK }, -+ {&CLSID_XACTEngine32, &IID_IXACT3Engine301, S_OK }, -+ {&CLSID_XACTEngine33, &IID_IXACT3Engine301, S_OK }, -+ {&CLSID_XACTEngine34, &IID_IXACT3Engine301, S_OK }, -+ -+ /* Version 3.5 to 3.7 use the same inteface */ -+ {&CLSID_XACTEngine35, &IID_IXACT3Engine301, E_NOINTERFACE }, -+ {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK }, -+ -+ {&CLSID_XACTEngine36, &IID_IXACT3Engine301, E_NOINTERFACE }, -+ {&CLSID_XACTEngine36, &IID_IXACT3Engine, S_OK }, -+ -+ {&CLSID_XACTEngine37, &IID_IXACT3Engine301, E_NOINTERFACE }, -+ {&CLSID_XACTEngine37, &IID_IXACT3Engine, S_OK }, -+ {&CLSID_XACTEngine37, &IID_IUnknown, S_OK }, -+}; -+ -+static void test_interfaces(void) -+{ -+ IUnknown *unk; -+ HRESULT hr; -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(xact_interfaces); i++) -+ { -+ hr = CoCreateInstance(xact_interfaces[i].clsid, NULL, CLSCTX_INPROC_SERVER, -+ xact_interfaces[i].iid, (void**)&unk); -+ if (hr == REGDB_E_CLASSNOTREG || (hr != xact_interfaces[i].expected && -+ xact_interfaces[i].todo)) -+ { -+ trace("%d not registered. Skipping\n", wine_dbgstr_guid(xact_interfaces[i].clsid) ); -+ continue; -+ } -+ ok(hr == xact_interfaces[i].expected, "%d, Unexpected value 0x%08x\n", i, hr); -+ if (hr == S_OK) -+ IUnknown_Release(unk); -+ } -+} -+ -+START_TEST(xact) -+{ -+ CoInitialize(NULL); -+ -+ test_interfaces(); -+ -+ CoUninitialize(); -+} -diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c -index f2bffdf29f..05b1dc3aba 100644 ---- a/dlls/xaudio2_7/tests/xaudio2.c -+++ b/dlls/xaudio2_7/tests/xaudio2.c -@@ -22,7 +22,7 @@ - #define COBJMACROS - #include "wine/test.h" - #include "initguid.h" --#include "xaudio2.h" -+#include "xact3.h" - #include "xaudio2fx.h" - #include "xapo.h" - #include "xapofx.h" --- -2.25.1 - diff --git a/patches/xactengine-initial/0016-xaudio2_7-tests-Add-more-tests.patch b/patches/xactengine-initial/0016-xaudio2_7-tests-Add-more-tests.patch deleted file mode 100644 index 942f54e6..00000000 --- a/patches/xactengine-initial/0016-xaudio2_7-tests-Add-more-tests.patch +++ /dev/null @@ -1,229 +0,0 @@ -From 7212b91306542f5a71fe51a99b012a402db700ab Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 18 Jan 2020 18:50:34 +1100 -Subject: [PATCH] xaudio2_7/tests: Add more tests - ---- - dlls/x3daudio1_7/Makefile.in | 1 + - dlls/xaudio2_7/tests/Makefile.in | 5 +- - dlls/xaudio2_7/tests/globals.xgs | Bin 0 -> 440 bytes - dlls/xaudio2_7/tests/rsrc.rc | 22 +++++++ - dlls/xaudio2_7/tests/xact.c | 99 ++++++++++++++++++++++++++----- - 5 files changed, 112 insertions(+), 15 deletions(-) - create mode 100644 dlls/xaudio2_7/tests/globals.xgs - create mode 100644 dlls/xaudio2_7/tests/rsrc.rc - -diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in -index 267a93fd6..5438bc6d8 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 - EXTRALIBS = $(FAUDIO_LIBS) - EXTRAINCL = $(FAUDIO_CFLAGS) -diff --git a/dlls/xaudio2_7/tests/Makefile.in b/dlls/xaudio2_7/tests/Makefile.in -index ecd728d65..1bb39cc56 100644 ---- a/dlls/xaudio2_7/tests/Makefile.in -+++ b/dlls/xaudio2_7/tests/Makefile.in -@@ -1,6 +1,9 @@ - TESTDLL = xaudio2_7.dll --IMPORTS = ole32 -+IMPORTS = ole32 x3daudio1_7 - - C_SRCS = \ - xact.c \ - xaudio2.c -+ -+RC_SRCS = \ -+ rsrc.rc -diff --git a/dlls/xaudio2_7/tests/globals.xgs b/dlls/xaudio2_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* - #include -+#include -+#include - - #define COBJMACROS - #include "wine/test.h" - - #include "xact3.h" -+#include "x3daudio.h" - - #include "initguid.h" --DEFINE_GUID(IID_IXACT3Engine301, 0xe72c1b9a, 0xd717, 0x41c0, 0x81, 0xa6, 0x50, 0xeb, 0x56, 0xe8, 0x06, 0x49); -+DEFINE_GUID(IID_IXACT3Engine31, 0xe72c1b9a, 0xd717, 0x41c0, 0x81, 0xa6, 0x50, 0xeb, 0x56, 0xe8, 0x06, 0x49); -+ -+DEFINE_GUID(CLSID_XACTEngine30, 0x3b80ee2a, 0xb0f5, 0x4780, 0x9e,0x30, 0x90,0xcb,0x39,0x68,0x5b,0x03); -+DEFINE_GUID(CLSID_XACTEngine31, 0x962f5027, 0x99be, 0x4692, 0xa4,0x68, 0x85,0x80,0x2c,0xf8,0xde,0x61); -+DEFINE_GUID(CLSID_XACTEngine32, 0xd3332f02, 0x3dd0, 0x4de9, 0x9a,0xec, 0x20,0xd8,0x5c,0x41,0x11,0xb6); -+DEFINE_GUID(CLSID_XACTEngine33, 0x94c1affa, 0x66e7, 0x4961, 0x95,0x21, 0xcf,0xde,0xf3,0x12,0x8d,0x4f); -+DEFINE_GUID(CLSID_XACTEngine34, 0x0977d092, 0x2d95, 0x4e43, 0x8d,0x42, 0x9d,0xdc,0xc2,0x54,0x5e,0xd5); -+DEFINE_GUID(CLSID_XACTEngine35, 0x074b110f, 0x7f58, 0x4743, 0xae,0xa5, 0x12,0xf1,0x5b,0x50,0x74,0xed); -+DEFINE_GUID(CLSID_XACTEngine36, 0x248d8a3b, 0x6256, 0x44d3, 0xa0,0x18, 0x2a,0xc9,0x6c,0x45,0x9f,0x47); - - struct xact_interfaces - { -@@ -35,25 +46,25 @@ struct xact_interfaces - BOOL todo; - } xact_interfaces[] = - { -- {&CLSID_XACTEngine30, &IID_IXACT3Engine301, E_NOINTERFACE, TRUE }, -- {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE, TRUE }, -+ {&CLSID_XACTEngine30, &IID_IXACT3Engine31, E_NOINTERFACE, TRUE }, -+ {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE, TRUE }, - - /* Version 3.1 to 3.4 use the same inteface */ -- {&CLSID_XACTEngine31, &IID_IXACT3Engine301, S_OK }, -- {&CLSID_XACTEngine32, &IID_IXACT3Engine301, S_OK }, -- {&CLSID_XACTEngine33, &IID_IXACT3Engine301, S_OK }, -- {&CLSID_XACTEngine34, &IID_IXACT3Engine301, S_OK }, -+ {&CLSID_XACTEngine31, &IID_IXACT3Engine31, S_OK }, -+ {&CLSID_XACTEngine32, &IID_IXACT3Engine31, S_OK }, -+ {&CLSID_XACTEngine33, &IID_IXACT3Engine31, S_OK }, -+ {&CLSID_XACTEngine34, &IID_IXACT3Engine31, S_OK }, - - /* Version 3.5 to 3.7 use the same inteface */ -- {&CLSID_XACTEngine35, &IID_IXACT3Engine301, E_NOINTERFACE }, -- {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK }, -+ {&CLSID_XACTEngine35, &IID_IXACT3Engine31, E_NOINTERFACE }, -+ {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK }, - -- {&CLSID_XACTEngine36, &IID_IXACT3Engine301, E_NOINTERFACE }, -- {&CLSID_XACTEngine36, &IID_IXACT3Engine, S_OK }, -+ {&CLSID_XACTEngine36, &IID_IXACT3Engine31, E_NOINTERFACE }, -+ {&CLSID_XACTEngine36, &IID_IXACT3Engine, S_OK }, - -- {&CLSID_XACTEngine37, &IID_IXACT3Engine301, E_NOINTERFACE }, -- {&CLSID_XACTEngine37, &IID_IXACT3Engine, S_OK }, -- {&CLSID_XACTEngine37, &IID_IUnknown, S_OK }, -+ {&CLSID_XACTEngine, &IID_IXACT3Engine31, E_NOINTERFACE }, -+ {&CLSID_XACTEngine, &IID_IXACT3Engine, S_OK }, -+ {&CLSID_XACTEngine, &IID_IUnknown, S_OK }, - }; - - static void test_interfaces(void) -@@ -78,11 +89,71 @@ static void test_interfaces(void) - } - } - -+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%08x\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%08x\n", hr); -+ ok(value == 0.0f, "got %f\n", value); -+ -+ hr = IXACT3Engine_GetFinalMixFormat(engine, &format); -+ ok(hr == S_OK, "got 0x%08x\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%08x\n", hr); -+ ok(value == 0.0f, "got %f\n", value); -+ -+end: -+ IXACT3Engine_Release(engine); -+} -+ - START_TEST(xact) - { - CoInitialize(NULL); - - test_interfaces(); -+ test_global_properties(); - - CoUninitialize(); - } --- -2.25.1 -