Added xactengine2-dll

This commit is contained in:
Alistair Leslie-Hughes 2020-09-19 18:08:01 +10:00
parent 003d5833c2
commit 22ed5ee061
24 changed files with 3914 additions and 1 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "2cf69bb5a5b43951abb251f415ccb81e809bd32e"
echo "36e6ea9767473204b0e1635a1d54af3868fa0188"
}
# Show version information
@ -332,6 +332,7 @@ patch_enable_all ()
enable_ws2_32_getaddrinfo="$1"
enable_ws2_32_getsockopt="$1"
enable_wtsapi32_EnumerateProcesses="$1"
enable_xactengine2_dll="$1"
enable_xactengine3_7_PrepareWave="$1"
}
@ -1089,6 +1090,9 @@ patch_enable ()
wtsapi32-EnumerateProcesses)
enable_wtsapi32_EnumerateProcesses="$2"
;;
xactengine2-dll)
enable_xactengine2_dll="$2"
;;
xactengine3_7-PrepareWave)
enable_xactengine3_7_PrepareWave="$2"
;;
@ -5135,6 +5139,50 @@ if test "$enable_wtsapi32_EnumerateProcesses" -eq 1; then
patch_apply wtsapi32-EnumerateProcesses/0001-wtsapi32-Partial-implementation-of-WTSEnumerateProce.patch
fi
# Patchset xactengine2-dll
# |
# | This patchset fixes the following Wine bugs:
# | * [#41048] xactengine2_0: Roller Coaster Rampage
# | * [#49671] xactengine2_4: Supreme Commander demo
# | * [#49668] xactengine2_7: Two Worlds Epic Edition
# | * [#41468] xactengine2_9: Supreme Commander Forged Alliance
# |
# | Modified files:
# | * configure, configure.ac, dlls/xactengine2_0/Makefile.in, dlls/xactengine2_0/xactengine2_0.spec,
# | dlls/xactengine2_1/Makefile.in, dlls/xactengine2_1/xactengine2_1.spec, dlls/xactengine2_10/Makefile.in,
# | dlls/xactengine2_10/xact2_classes.idl, dlls/xactengine2_10/xact2_dll.c, dlls/xactengine2_10/xactengine2_10.spec,
# | dlls/xactengine2_2/Makefile.in, dlls/xactengine2_2/xactengine2_2.spec, dlls/xactengine2_3/Makefile.in,
# | dlls/xactengine2_3/xactengine2_3.spec, dlls/xactengine2_4/Makefile.in, dlls/xactengine2_4/xactengine2_4.spec,
# | dlls/xactengine2_5/Makefile.in, dlls/xactengine2_5/xactengine2_5.spec, dlls/xactengine2_6/Makefile.in,
# | dlls/xactengine2_6/xactengine2_6.spec, dlls/xactengine2_7/Makefile.in, dlls/xactengine2_7/xactengine2_7.spec,
# | dlls/xactengine2_8/Makefile.in, dlls/xactengine2_8/xactengine2_8.spec, dlls/xactengine2_9/Makefile.in,
# | dlls/xactengine2_9/xactengine2_9.spec, include/Makefile.in, include/xact.h, include/xact2wb.h
# |
if test "$enable_xactengine2_dll" -eq 1; then
patch_apply xactengine2-dll/0001-include-Add-xact2wb.h.patch
patch_apply xactengine2-dll/0002-include-Add-xact.h.patch
patch_apply xactengine2-dll/0003-xactengine2_10-Add-new-dll.patch
patch_apply xactengine2-dll/0004-xactengine2_10-Implement-IXACTEngine-interface.patch
patch_apply xactengine2-dll/0005-xactengine2_10-Implement-IXACTSoundBank-interface.patch
patch_apply xactengine2-dll/0006-xactengine2_10-Implement-IXACTCue-Interface.patch
patch_apply xactengine2-dll/0007-xactengine2_10-Implement-IXACTWaveBank-interface.patch
patch_apply xactengine2-dll/0008-xactengine2_10-Implement-IXACTEngine-CreateStreaming.patch
patch_apply xactengine2-dll/0009-xactengine2_10-Implement-IXACTWave-interface.patch
patch_apply xactengine2-dll/0010-xactengine2_10-Implement-IXACTSoundBank-Play-functio.patch
patch_apply xactengine2-dll/0011-xactengine2_10-Implement-IXACTWaveBank-Play-function.patch
patch_apply xactengine2-dll/0012-xactengine2_10-Implement-IXACTEngine-Un-RegisterNoti.patch
patch_apply xactengine2-dll/0013-xactengine2_9-New-Dll.patch
patch_apply xactengine2-dll/0014-xactengine2_8-New-Dll.patch
patch_apply xactengine2-dll/0015-xactengine2_7-New-Dll.patch
patch_apply xactengine2-dll/0016-xactengine2_6-New-Dll.patch
patch_apply xactengine2-dll/0017-xactengine2_5-New-Dll.patch
patch_apply xactengine2-dll/0018-xactengine2_4-New-Dll.patch
patch_apply xactengine2-dll/0019-xactengine2_3-New-Dll.patch
patch_apply xactengine2-dll/0020-xactengine2_2-New-Dll.patch
patch_apply xactengine2-dll/0021-xactengine2_1-New-Dll.patch
patch_apply xactengine2-dll/0022-xactengine2_0-New-Dll.patch
fi
# Patchset xactengine3_7-PrepareWave
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,182 @@
From 05cdff3abe82f3b79473df940c407881f5b09eea Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Wed, 12 Aug 2020 11:06:30 +0200
Subject: [PATCH 01/23] include: Add xact2wb.h
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
include/Makefile.in | 1 +
include/xact2wb.h | 149 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 150 insertions(+)
create mode 100644 include/xact2wb.h
diff --git a/include/Makefile.in b/include/Makefile.in
index d32b0a225c1..9983d1151ca 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -818,6 +818,7 @@ SOURCES = \
wuapi.idl \
x3daudio.h \
xact3.h \
+ xact2wb.h \
xact3wb.h \
xapo.idl \
xapofx.h \
diff --git a/include/xact2wb.h b/include/xact2wb.h
new file mode 100644
index 00000000000..2bdc7f5c0dd
--- /dev/null
+++ b/include/xact2wb.h
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2020 Vijay Kiran Kamuju
+ *
+ * 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
+ */
+#ifndef __XACT2WB_H__
+#define __XACT2WB_H__
+
+#include <pshpack1.h>
+
+typedef DWORD WAVEBANKOFFSET;
+
+#define WAVEBANK_HEADER_SIGNATURE 0x444e4257 /* DNBW */
+#define WAVEBANK_HEADER_VERSION 42
+#define WAVEBANK_BANKNAME_LENGTH 64
+#define WAVEBANK_ENTRYNAME_LENGTH 64
+
+#define WAVEBANK_TYPE_BUFFER 0x00000000
+#define WAVEBANK_TYPE_STREAMING 0x00000001
+#define WAVEBANK_TYPE_MASK 0x00000001
+
+#define WAVEBANK_FLAGS_ENTRYNAMES 0x00010000
+#define WAVEBANK_FLAGS_COMPACT 0x00020000
+#define WAVEBANK_FLAGS_SYNC_DISABLED 0x00040000
+#define WAVEBANK_FLAGS_SEEKTABLES 0x00080000
+#define WAVEBANK_FLAGS_MASK 0x000f0000
+
+#define WAVEBANK_DVD_SECTOR_SIZE 2048
+#define WAVEBANK_DVD_BLOCK_SIZE (WAVEBANK_DVD_SECTOR_SIZE * 16)
+#define WAVEBANK_ALIGNMENT_MIN 4
+#define WAVEBANK_ALIGNMENT_DVD WAVEBANK_DVD_SECTOR_SIZE
+
+typedef enum WAVEBANKSEGIDX
+{
+ WAVEBANK_SEGIDX_BANKDATA = 0,
+ WAVEBANK_SEGIDX_ENTRYMETADATA,
+ WAVEBANK_SEGIDX_SEEKTABLES,
+ WAVEBANK_SEGIDX_ENTRYNAMES,
+ WAVEBANK_SEGIDX_ENTRYWAVEDATA,
+ WAVEBANK_SEGIDX_COUNT
+} WAVEBANKSEGIDX, *LPWAVEBANKSEGIDX;
+typedef const WAVEBANKSEGIDX *LPCWAVEBANKSEGIDX;
+
+#define WAVEBANKMINIFORMAT_TAG_PCM 0x0
+#define WAVEBANKMINIFORMAT_TAG_XMA 0x1
+#define WAVEBANKMINIFORMAT_TAG_ADPCM 0x2
+
+#define WAVEBANKMINIFORMAT_BITDEPTH_8 0x0
+#define WAVEBANKMINIFORMAT_BITDEPTH_16 0x1
+
+typedef union WAVEBANKMINIWAVEFORMAT
+{
+ struct
+ {
+ DWORD wFormatTag : 2;
+ DWORD nChannels : 3;
+ DWORD nSamplesPerSec : 18;
+ DWORD wBlockAlign : 8;
+ DWORD wBitsPerSample : 1;
+ } DUMMYSTRUCTNAME;
+ DWORD dwValue;
+} WAVEBANKMINIWAVEFORMAT, *LPWAVEBANKMINIWAVEFORMAT;
+typedef const WAVEBANKMINIWAVEFORMAT *LPCWAVEBANKMINIWAVEFORMAT;
+
+typedef struct WAVEBANKREGION
+{
+ DWORD dwOffset;
+ DWORD dwLength;
+} WAVEBANKREGION, *LPWAVEBANKREGION;
+typedef const WAVEBANKREGION *LPCWAVEBANKREGION;
+
+typedef struct WAVEBANKSAMPLEREGION
+{
+ DWORD dwStartSample;
+ DWORD dwTotalSamples;
+} WAVEBANKSAMPLEREGION, *LPWAVEBANKSAMPLEREGION;
+typedef const WAVEBANKSAMPLEREGION *LPCWAVEBANKSAMPLEREGION;
+
+typedef struct WAVEBANKHEADER
+{
+ DWORD dwSignature;
+ DWORD dwVersion;
+ DWORD dwHeaderVersion;
+ WAVEBANKREGION Segments[WAVEBANK_SEGIDX_COUNT];
+} WAVEBANKHEADER, *LPWAVEBANKHEADER;
+typedef const WAVEBANKHEADER *LPCWAVEBANKHEADER;
+
+#define WAVEBANKENTRY_XMASTREAMS_MAX 3
+#define WAVEBANKENTRY_XMACHANNELS_MAX 6
+
+#define WAVEBANKENTRY_FLAGS_READAHEAD 0x00000001
+#define WAVEBANKENTRY_FLAGS_LOOPCACHE 0x00000002
+#define WAVEBANKENTRY_FLAGS_REMOVELOOPTAIL 0x00000004
+#define WAVEBANKENTRY_FLAGS_IGNORELOOP 0x00000008
+#define WAVEBANKENTRY_FLAGS_MASK 0x00000008
+
+typedef struct WAVEBANKENTRY
+{
+ union
+ {
+ struct
+ {
+ DWORD dwFlags : 4;
+ DWORD Duration : 28;
+ } DUMMYSTRUCTNAME;
+ DWORD dwFlagsAndDuration;
+ } DUMMYUNIONNAME;
+
+ WAVEBANKMINIWAVEFORMAT Format;
+ WAVEBANKREGION PlayRegion;
+ WAVEBANKSAMPLEREGION LoopRegion;
+} WAVEBANKENTRY, *LPWAVEBANKENTRY;
+typedef const WAVEBANKENTRY *LPCWAVEBANKENTRY;
+
+typedef struct WAVEBANKENTRYCOMPACT
+{
+ DWORD dwOffset : 21;
+ DWORD dwLengthDeviation : 11;
+} WAVEBANKENTRYCOMPACT, *LPWAVEBANKENTRYCOMPACT;
+typedef const WAVEBANKENTRYCOMPACT *LPCWAVEBANKENTRYCOMPACT;
+
+typedef struct WAVEBANKDATA
+{
+ DWORD dwFlags;
+ DWORD dwEntryCount;
+ CHAR szBankName[WAVEBANK_BANKNAME_LENGTH];
+ DWORD dwEntryMetaDataElementSize;
+ DWORD dwEntryNameElementSize;
+ DWORD dwAlignment;
+ WAVEBANKMINIWAVEFORMAT CompactFormat;
+ FILETIME BuildTime;
+} WAVEBANKDATA, *LPWAVEBANKDATA;
+typedef const WAVEBANKDATA *LPCWAVEBANKDATA;
+
+#include <poppack.h>
+
+#endif /* __XACT2WB_H__ */
--
2.28.0

View File

@ -0,0 +1,886 @@
From 340065f9f75f8b4c2fb6333e1b2c391a69242aed Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Wed, 12 Aug 2020 11:07:11 +0200
Subject: [PATCH 02/23] include: Add xact.h
Differentiate interface changes between xactengine2_x dll versions.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
include/Makefile.in | 1 +
include/xact.h | 851 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 852 insertions(+)
create mode 100644 include/xact.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 9983d1151ca..d13b5bc9420 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -817,6 +817,7 @@ SOURCES = \
wtypes.idl \
wuapi.idl \
x3daudio.h \
+ xact.h \
xact3.h \
xact2wb.h \
xact3wb.h \
diff --git a/include/xact.h b/include/xact.h
new file mode 100644
index 00000000000..8bb5134b8d7
--- /dev/null
+++ b/include/xact.h
@@ -0,0 +1,851 @@
+/*
+ * Copyright (C) 2020 Vijay Kiran Kamuju
+ *
+ * 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
+ */
+
+#ifndef __WINE_XACT_H
+#define __WINE_XACT_H
+
+#include <windows.h>
+#include <objbase.h>
+#include <float.h>
+#include <limits.h>
+#include <xact2wb.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if XACT3_VER == 0x0210
+ DEFINE_GUID(CLSID_XACTEngine, 0x65d822a4, 0x4799, 0x42c6, 0x9b, 0x18, 0xd2, 0x6c, 0xf6, 0x6d, 0xd3, 0x20);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x03dd980d, 0xeca1, 0x4de0, 0x98, 0x22, 0xeb, 0x22, 0x44, 0xa0, 0xe2, 0x75);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x871dc2b3, 0xc947, 0x4aed, 0xbf, 0xad, 0xa1, 0x79, 0x18, 0xfb, 0xcf, 0x05);
+ DEFINE_GUID(IID_IXACTEngine, 0x5ac3994b, 0xac77, 0x4c40, 0xb9, 0xfd, 0x7d, 0x5a, 0xfb, 0xe9, 0x64, 0xc5);
+#elif XACT3_VER == 0x0209
+ DEFINE_GUID(CLSID_XACTEngine, 0x343e68e6, 0x8f82, 0x4a8d, 0xa2, 0xda, 0x6e, 0x9a, 0x94, 0x4b, 0x37, 0x8c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xcedde475, 0x50b5, 0x47ef, 0x91, 0xa7, 0x3b, 0x49, 0xa0, 0xe8, 0xe5, 0x88);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x3cbb606b, 0x06f1, 0x473e, 0x9d, 0xd5, 0x0e, 0x4a, 0x3b, 0x47, 0x14, 0x13);
+ DEFINE_GUID(IID_IXACTEngine, 0x893ff2e4, 0x8d03, 0x4d5f, 0xb0, 0xaa, 0x36, 0x3a, 0x9c, 0xbb, 0xf4, 0x37);
+#elif XACT3_VER == 0x0208
+ DEFINE_GUID(CLSID_XACTEngine, 0x77c56bf4, 0x18a1, 0x42b0, 0x88, 0xaf, 0x50, 0x72, 0xce, 0x81, 0x49, 0x49);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x46f7c2b1, 0x774b, 0x419e, 0x9a, 0xbe, 0xa4, 0x8f, 0xb0, 0x42, 0xa3, 0xb0);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x307473ef, 0xc3d4, 0x4d97, 0x9b, 0x9c, 0xce, 0x23, 0x92, 0x85, 0x21, 0xdb);
+ DEFINE_GUID(IID_IXACTEngine, 0xf1fff4f0, 0xec75, 0x45cb, 0x98, 0x6d, 0xe6, 0x37, 0xf7, 0xe7, 0xcd, 0xd5);
+#elif XACT3_VER == 0x0207
+ DEFINE_GUID(CLSID_XACTEngine, 0xcd0d66ec, 0x8057, 0x43f5, 0xac, 0xbd, 0x66, 0xdf, 0xb3, 0x6f, 0xd7, 0x8c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x9b94bf7a, 0xce0f, 0x4c68, 0x8b, 0x5e, 0xd0, 0x62, 0xcb, 0x37, 0x30, 0xc3);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x1bd54a4b, 0xa1dc, 0x4e4c, 0x92, 0xa2, 0x73, 0xed, 0x33, 0x55, 0x21, 0x48);
+ DEFINE_GUID(IID_IXACTEngine, 0xc2f0af68, 0x1f6d, 0x40ed, 0x96, 0x4f, 0x26, 0x25, 0x68, 0x42, 0xed, 0xc4);
+#elif XACT3_VER == 0x0206
+ DEFINE_GUID(CLSID_XACTEngine, 0x3a2495ce, 0x31d0, 0x435b, 0x8c, 0xcf, 0xe9, 0xf0, 0x84, 0x3f, 0xd9, 0x60);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xa17e147b, 0xc168, 0x45d4, 0x95, 0xf6, 0xb2, 0x15, 0x15, 0xec, 0x1e, 0x66);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0xfe7e064f, 0xf9ea, 0x49ee, 0xba, 0x64, 0x84, 0x5e, 0x42, 0x35, 0x59, 0xc5);
+ DEFINE_GUID(IID_IXACTEngine, 0x5a5d41d0, 0x2161, 0x4a39, 0xaa, 0xdc, 0x11, 0x49, 0x30, 0x14, 0x7e, 0xaa);
+#elif XACT3_VER == 0x0205
+ DEFINE_GUID(CLSID_XACTEngine, 0x54b68bc7, 0x3a45, 0x416b, 0xa8, 0xc9, 0x19, 0xbf, 0x19, 0xec, 0x1d, 0xf5);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xaeaf4809, 0x6e94, 0x4663, 0x8f, 0xf8, 0x1b, 0x4c, 0x7c, 0x0e, 0x6d, 0xfd);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x290d0a8c, 0xa131, 0x4cf4, 0x8b, 0xbd, 0x37, 0xd0, 0x2b, 0x59, 0xcc, 0x4a);
+ DEFINE_GUID(IID_IXACTEngine, 0xf9df94ad, 0x6960, 0x4307, 0xbf, 0xad, 0x4e, 0x97, 0xac, 0x18, 0x94, 0xc6);
+#elif XACT3_VER == 0x0204
+ DEFINE_GUID(CLSID_XACTEngine, 0xbc3e0fc6, 0x2e0d, 0x4c45, 0xbc, 0x61, 0xd9, 0xc3, 0x28, 0x31, 0x9b, 0xd8);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x30bad9f7, 0x0018, 0x49e9, 0xbf, 0x94, 0x4a, 0xe8, 0x9c, 0xc5, 0x4d, 0x64);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x74ee14d5, 0xca1d, 0x44ac, 0x8b, 0xd3, 0xfa, 0x94, 0xf7, 0x34, 0x6e, 0x24);
+ DEFINE_GUID(IID_IXACTEngine, 0x43a0d4a8, 0x9387, 0x4e06, 0x94, 0x33, 0x65, 0x41, 0x8f, 0xe7, 0x0a, 0x67);
+#elif XACT3_VER == 0x0203
+ DEFINE_GUID(CLSID_XACTEngine, 0x1138472b, 0xd187, 0x44e9, 0x81, 0xf2, 0xae, 0x1b, 0x0e, 0x77, 0x85, 0xf1);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x07fb2b69, 0x0ee4, 0x4eee, 0xbb, 0xe8, 0xc7, 0x62, 0x89, 0x79, 0x87, 0x17);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x9ebf716a, 0x4c83, 0x4db0, 0x9a, 0x5a, 0xc7, 0x27, 0xde, 0x92, 0xb2, 0x73);
+ DEFINE_GUID(IID_IXACTEngine, 0xb28629f1, 0x0cb0, 0x47bc, 0xb4, 0x6a, 0xa2, 0xa1, 0xa7, 0x29, 0x6f, 0x02);
+#elif XACT3_VER == 0x0202
+ DEFINE_GUID(CLSID_XACTEngine, 0xc60fae90, 0x4183, 0x4a3f, 0xb2, 0xf7, 0xac, 0x1d, 0xc4, 0x9b, 0x0e, 0x5c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x4cb2112c, 0x62e9, 0x43fc, 0x8d, 0x9d, 0x6c, 0xa0, 0x8c, 0xed, 0x45, 0xf1);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x3ec76fdc, 0xb626, 0x43fb, 0xbe, 0x22, 0x9b, 0x43, 0x1d, 0x06, 0xb9, 0x68);
+ DEFINE_GUID(IID_IXACTEngine, 0x9c454686, 0xb827, 0x4e5e, 0x88, 0xd9, 0x5b, 0x99, 0xd6, 0x6b, 0x02, 0x2f);
+#elif XACT3_VER == 0x0201
+ DEFINE_GUID(CLSID_XACTEngine, 0x1f1b577e, 0x5e5a, 0x4e8a, 0xba, 0x73, 0xc6, 0x57, 0xea, 0x8e, 0x85, 0x98);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xfcecc8be, 0xb09a, 0x48cb, 0x92, 0x08, 0x95, 0xa7, 0xed, 0x45, 0x82, 0xa6);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x2b4a46bb, 0xae7a, 0x4072, 0xae, 0x18, 0x11, 0x28, 0x15, 0x4f, 0xba, 0x97);
+ DEFINE_GUID(IID_IXACTEngine, 0x7cdd1894, 0x643b, 0x4168, 0x83, 0x6f, 0xd1, 0x9d, 0x59, 0xd0, 0xce, 0x53);
+#else
+ DEFINE_GUID(CLSID_XACTEngine, 0x0aa000aa, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x0aa000ab, 0xf404, 0x1109, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x0aa000ac, 0xf404, 0x1109, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(IID_IXACTEngine, 0x0aa000a0, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+#endif
+
+typedef struct IXACTSoundBank IXACTSoundBank;
+typedef struct IXACTWaveBank IXACTWaveBank;
+typedef struct IXACTCue IXACTCue;
+typedef struct IXACTWave IXACTWave;
+typedef struct IXACTEngine IXACTEngine;
+
+typedef WORD XACTCATEGORY;
+typedef BYTE XACTCHANNEL;
+typedef WORD XACTINDEX;
+typedef BYTE XACTINSTANCELIMIT;
+typedef BYTE XACTLOOPCOUNT;
+typedef BYTE XACTNOTIFICATIONTYPE;
+typedef SHORT XACTPITCH;
+typedef BYTE XACTPRIORITY;
+typedef LONG XACTTIME;
+typedef WORD XACTVARIABLEINDEX;
+typedef FLOAT XACTVARIABLEVALUE;
+typedef BYTE XACTVARIATIONWEIGHT;
+typedef FLOAT XACTVOLUME;
+
+static const XACTTIME XACTTIME_MIN = INT_MIN;
+static const XACTTIME XACTTIME_MAX = INT_MAX;
+static const XACTTIME XACTTIME_INFINITE = INT_MAX;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_INFINITE = 0xff;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MIN = 0x00;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MAX = 0xfe;
+static const XACTINDEX XACTINDEX_MIN = 0x0;
+static const XACTINDEX XACTINDEX_MAX = 0xfffe;
+static const XACTINDEX XACTINDEX_INVALID = 0xffff;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MIN = 0x00;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MAX = 0xff;
+static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MIN = -FLT_MAX;
+static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MAX = FLT_MAX;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MIN = 0x0000;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MAX = 0xfffe;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_INVALID = 0xffff;
+static const XACTCATEGORY XACTCATEGORY_MIN = 0x0;
+static const XACTCATEGORY XACTCATEGORY_MAX = 0xfffe;
+static const XACTCATEGORY XACTCATEGORY_INVALID = 0xffff;
+static const XACTCHANNEL XACTCHANNEL_MIN = 0;
+static const XACTCHANNEL XACTCHANNEL_MAX = 0xff;
+static const XACTPITCH XACTPITCH_MIN = -1200;
+static const XACTPITCH XACTPITCH_MAX = 1200;
+static const XACTPITCH XACTPITCH_MIN_TOTAL = -2400;
+static const XACTPITCH XACTPITCH_MAX_TOTAL = 2400;
+static const XACTVOLUME XACTVOLUME_MIN = 0.0f;
+static const XACTVOLUME XACTVOLUME_MAX = FLT_MAX;
+static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MIN = -FLT_MAX;
+static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MAX = FLT_MAX;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_MIN = 0x0;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_MAX = 0xfe;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_INFINITE = 0xff;
+static const DWORD XACTWAVEALIGNMENT_MIN = 2048;
+
+
+#define FACILITY_XACTENGINE 0xAC7
+#define XACTENGINEERROR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XACTENGINE, n)
+
+#define XACTENGINE_E_OUTOFMEMORY E_OUTOFMEMORY
+#define XACTENGINE_E_INVALIDARG E_INVALIDARG
+#define XACTENGINE_E_NOTIMPL E_NOTIMPL
+#define XACTENGINE_E_FAIL E_FAIL
+
+#define XACTENGINE_E_ALREADYINITIALIZED XACTENGINEERROR(0x001)
+#define XACTENGINE_E_NOTINITIALIZED XACTENGINEERROR(0x002)
+#define XACTENGINE_E_EXPIRED XACTENGINEERROR(0x003)
+#define XACTENGINE_E_NONOTIFICATIONCALLBACK XACTENGINEERROR(0x004)
+#define XACTENGINE_E_NOTIFICATIONREGISTERED XACTENGINEERROR(0x005)
+#define XACTENGINE_E_INVALIDUSAGE XACTENGINEERROR(0x006)
+#define XACTENGINE_E_INVALIDDATA XACTENGINEERROR(0x007)
+#define XACTENGINE_E_INSTANCELIMITFAILTOPLAY XACTENGINEERROR(0x008)
+#define XACTENGINE_E_NOGLOBALSETTINGS XACTENGINEERROR(0x009)
+#define XACTENGINE_E_INVALIDVARIABLEINDEX XACTENGINEERROR(0x00a)
+#define XACTENGINE_E_INVALIDCATEGORY XACTENGINEERROR(0x00b)
+#define XACTENGINE_E_INVALIDCUEINDEX XACTENGINEERROR(0x00c)
+#define XACTENGINE_E_INVALIDWAVEINDEX XACTENGINEERROR(0x00d)
+#define XACTENGINE_E_INVALIDTRACKINDEX XACTENGINEERROR(0x00e)
+#define XACTENGINE_E_INVALIDSOUNDOFFSETORINDEX XACTENGINEERROR(0x00f)
+#define XACTENGINE_E_READFILE XACTENGINEERROR(0x010)
+#define XACTENGINE_E_UNKNOWNEVENT XACTENGINEERROR(0x011)
+#define XACTENGINE_E_INCALLBACK XACTENGINEERROR(0x012)
+#define XACTENGINE_E_NOWAVEBANK XACTENGINEERROR(0x013)
+#define XACTENGINE_E_SELECTVARIATION XACTENGINEERROR(0x014)
+#define XACTENGINE_E_MULTIPLEAUDITIONENGINES XACTENGINEERROR(0x015)
+#define XACTENGINE_E_WAVEBANKNOTPREPARED XACTENGINEERROR(0x016)
+#define XACTENGINE_E_NORENDERER XACTENGINEERROR(0x017)
+#define XACTENGINE_E_INVALIDENTRYCOUNT XACTENGINEERROR(0x018)
+#define XACTENGINE_E_SEEKTIMEBEYONDCUEEND XACTENGINEERROR(0x019)
+#define XACTENGINE_E_SEEKTIMEBEYONDWAVEEND XACTENGINEERROR(0x019)
+#define XACTENGINE_E_NOFRIENDLYNAMES XACTENGINEERROR(0x01a)
+#define XACTENGINE_E_AUDITION_WRITEFILE XACTENGINEERROR(0x101)
+#define XACTENGINE_E_AUDITION_NOSOUNDBANK XACTENGINEERROR(0x102)
+#define XACTENGINE_E_AUDITION_INVALIDRPCINDEX XACTENGINEERROR(0x103)
+#define XACTENGINE_E_AUDITION_MISSINGDATA XACTENGINEERROR(0x104)
+#define XACTENGINE_E_AUDITION_UNKNOWNCOMMAND XACTENGINEERROR(0x105)
+#define XACTENGINE_E_AUDITION_INVALIDDSPINDEX XACTENGINEERROR(0x106)
+#define XACTENGINE_E_AUDITION_MISSINGWAVE XACTENGINEERROR(0x107)
+#define XACTENGINE_E_AUDITION_CREATEDIRECTORYFAILED XACTENGINEERROR(0x108)
+#define XACTENGINE_E_AUDITION_INVALIDSESSION XACTENGINEERROR(0x109)
+
+static const DWORD XACT_FLAG_STOP_RELEASE = 0x00000000;
+static const DWORD XACT_FLAG_STOP_IMMEDIATE = 0x00000001;
+
+static const DWORD XACT_FLAG_MANAGEDATA = 0x00000001;
+static const DWORD XACT_FLAG_BACKGROUND_MUSIC = 0x00000002;
+static const DWORD XACT_FLAG_UNITS_MS = 0x00000004;
+static const DWORD XACT_FLAG_UNITS_SAMPLES = 0x00000008;
+
+static const DWORD XACT_STATE_CREATED = 0x00000001;
+static const DWORD XACT_STATE_PREPARING = 0x00000002;
+static const DWORD XACT_STATE_PREPARED = 0x00000004;
+static const DWORD XACT_STATE_PLAYING = 0x00000008;
+static const DWORD XACT_STATE_STOPPING = 0x00000010;
+static const DWORD XACT_STATE_STOPPED = 0x00000020;
+static const DWORD XACT_STATE_PAUSED = 0x00000040;
+static const DWORD XACT_STATE_INUSE = 0x00000080;
+static const DWORD XACT_STATE_PREPAREFAILED = 0x80000000;
+
+#define XACT_FLAG_GLOBAL_SETTINGS_MANAGEDATA XACT_FLAG_MANAGEDATA
+
+#define XACT_RENDERER_ID_LENGTH 0xff
+#define XACT_RENDERER_NAME_LENGTH 0xff
+#define XACT_CUE_NAME_LENGTH 0xff
+
+#define XACT_CONTENT_VERSION 43
+
+#define XACT_ENGINE_LOOKAHEAD_DEFAULT 250
+
+static const DWORD XACT_FLAG_API_AUDITION_MODE = 0x00000001;
+static const DWORD XACT_FLAG_API_DEBUG_MODE = 0x00000002;
+
+#define XACT_DEBUGENGINE_REGISTRY_KEY L"Software\\Microsoft\\XACT"
+#define XACT_DEBUGENGINE_REGISTRY_VALUE L"DebugEngine"
+
+typedef struct XACT_RENDERER_DETAILS
+{
+ WCHAR rendererID[XACT_RENDERER_ID_LENGTH];
+ WCHAR displayName[XACT_RENDERER_NAME_LENGTH];
+ BOOL defaultDevice;
+} XACT_RENDERER_DETAILS, *LPXACT_RENDERER_DETAILS;
+
+typedef BOOL (__stdcall *XACT_READFILE_CALLBACK)(
+ HANDLE hFile,
+ LPVOID lpBuffer,
+ DWORD nNumberOfBytesRead,
+ LPDWORD lpNumberOfBytesRead,
+ LPOVERLAPPED lpOverlapped
+);
+typedef BOOL (__stdcall *XACT_GETOVERLAPPEDRESULT_CALLBACK)(
+ HANDLE hFile,
+ LPOVERLAPPED lpOverlapped,
+ LPDWORD lpNumberOfBytesTransferred,
+ BOOL bWait
+);
+
+typedef struct XACT_FILEIO_CALLBACKS
+{
+ XACT_READFILE_CALLBACK readFileCallback;
+ XACT_GETOVERLAPPEDRESULT_CALLBACK getOverlappedResultCallback;
+} XACT_FILEIO_CALLBACKS, *PXACT_FILEIO_CALLBACKS;
+typedef const XACT_FILEIO_CALLBACKS *PCXACT_FILEIO_CALLBACKS;
+
+typedef struct XACT_STREAMING_PARAMETERS
+{
+ HANDLE file;
+ DWORD offset;
+ DWORD flags;
+ WORD packetSize;
+} XACT_STREAMING_PARAMETERS, *LPXACT_STREAMING_PARAMETERS, XACT_WAVEBANK_STREAMING_PARAMETERS, *LPXACT_WAVEBANK_STREAMING_PARAMETERS;
+typedef const XACT_STREAMING_PARAMETERS *LPCXACT_STREAMING_PARAMETERS;
+typedef const XACT_WAVEBANK_STREAMING_PARAMETERS *LPCXACT_WAVEBANK_STREAMING_PARAMETERS;
+
+typedef struct XACT_CUE_PROPERTIES
+{
+ char friendlyName[XACT_CUE_NAME_LENGTH];
+ BOOL interactive;
+ XACTINDEX iaVariableIndex;
+ XACTINDEX numVariations;
+ XACTINSTANCELIMIT maxInstances;
+ XACTINSTANCELIMIT currentInstances;
+} XACT_CUE_PROPERTIES, *LPXACT_CUE_PROPERTIES;
+
+typedef struct XACT_TRACK_PROPERTIES
+{
+ XACTTIME duration;
+ XACTINDEX numVariations;
+ XACTCHANNEL numChannels;
+ XACTINDEX waveVariation;
+ XACTLOOPCOUNT loopCount;
+} XACT_TRACK_PROPERTIES, *LPXACT_TRACK_PROPERTIES;
+
+typedef struct XACT_VARIATION_PROPERTIES
+{
+ XACTINDEX index;
+ XACTVARIATIONWEIGHT weight;
+ XACTVARIABLEVALUE iaVariableMin;
+ XACTVARIABLEVALUE iaVariableMax;
+ BOOL linger;
+} XACT_VARIATION_PROPERTIES, *LPXACT_VARIATION_PROPERTIES;
+
+typedef struct XACT_SOUND_PROPERTIES
+{
+ XACTCATEGORY category;
+ BYTE priority;
+ XACTPITCH pitch;
+ XACTVOLUME volume;
+ XACTINDEX numTracks;
+ XACT_TRACK_PROPERTIES arrTrackProperties[1];
+} XACT_SOUND_PROPERTIES, *LPXACT_SOUND_PROPERTIES;
+
+typedef struct XACT_SOUND_VARIATION_PROPERTIES
+{
+ XACT_VARIATION_PROPERTIES variationProperties;
+ XACT_SOUND_PROPERTIES soundProperties;
+} XACT_SOUND_VARIATION_PROPERTIES, *LPXACT_SOUND_VARIATION_PROPERTIES;
+
+typedef struct XACT_CUE_INSTANCE_PROPERTIES
+{
+ DWORD allocAttributes;
+ XACT_CUE_PROPERTIES cueProperties;
+ XACT_SOUND_VARIATION_PROPERTIES activeVariationProperties;
+} XACT_CUE_INSTANCE_PROPERTIES, *LPXACT_CUE_INSTANCE_PROPERTIES;
+
+typedef struct XACTCHANNELMAPENTRY
+{
+ XACTCHANNEL InputChannel;
+ XACTCHANNEL OutputChannel;
+ XACTVOLUME Volume;
+} XACTCHANNELMAPENTRY, *LPXACTCHANNELMAPENTRY;
+typedef const XACTCHANNELMAPENTRY *LPCXACTCHANNELMAPENTRY;
+
+typedef struct XACTCHANNELMAP
+{
+ XACTCHANNEL EntryCount;
+ XACTCHANNELMAPENTRY* paEntries;
+} XACTCHANNELMAP, *LPXACTCHANNELMAP;
+typedef const XACTCHANNELMAP *LPCXACTCHANNELMAP;
+
+typedef struct XACTCHANNELVOLUMEENTRY
+{
+ XACTCHANNEL EntryIndex;
+ XACTVOLUME Volume;
+} XACTCHANNELVOLUMEENTRY, *LPXACTCHANNELVOLUMEENTRY;
+typedef const XACTCHANNELVOLUMEENTRY *LPCXACTCHANNELVOLUMEENTRY;
+
+typedef struct XACTCHANNELVOLUME
+{
+ XACTCHANNEL EntryCount;
+ XACTCHANNELVOLUMEENTRY* paEntries;
+} XACTCHANNELVOLUME, *LPXACTCHANNELVOLUME;
+typedef const XACTCHANNELVOLUME *LPCXACTCHANNELVOLUME;
+
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPREPARED = 1;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPLAY = 2;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUESTOP = 3;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEDESTROYED = 4;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MARKER = 5;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED = 6;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED = 7;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_LOCALVARIABLECHANGED = 8;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GLOBALVARIABLECHANGED = 9;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUICONNECTED = 10;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUIDISCONNECTED = 11;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPREPARED = 12;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPLAY = 13;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVESTOP = 14;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVELOOPED = 15;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEDESTROYED = 16;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKPREPARED = 17;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT = 18;
+
+static const BYTE XACT_FLAG_NOTIFICATION_PERSIST = 0x01;
+
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+ #define WAVE_FORMAT_IEEE_FLOAT 0x0003
+#endif
+#ifndef WAVE_FORMAT_EXTENSIBLE
+ #define WAVE_FORMAT_EXTENSIBLE 0xfffe
+#endif
+
+#include <pshpack1.h>
+
+#ifndef _WAVEFORMATEX_
+#define _WAVEFORMATEX_
+typedef struct _WAVEFORMATEX {
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
+#endif /* _WAVEFORMATEX_ */
+
+#ifndef _WAVEFORMATEXTENSIBLE_
+#define _WAVEFORMATEXTENSIBLE_
+typedef struct {
+ WAVEFORMATEX Format;
+ union {
+ WORD wValidBitsPerSample;
+ WORD wSamplesPerBlock;
+ WORD wReserved;
+ } Samples;
+ DWORD dwChannelMask;
+ GUID SubFormat;
+} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
+#endif /* _WAVEFORMATEXTENSIBLE_ */
+
+typedef struct XACT_NOTIFICATION_DESCRIPTION
+{
+ XACTNOTIFICATIONTYPE type;
+ BYTE flags;
+ IXACTSoundBank *pSoundBank;
+ IXACTWaveBank *pWaveBank;
+ IXACTCue *pCue;
+ IXACTWave *pWave;
+ XACTINDEX cueIndex;
+ XACTINDEX waveIndex;
+ PVOID pvContext;
+} XACT_NOTIFICATION_DESCRIPTION, *LPXACT_NOTIFICATION_DESCRIPTION;
+typedef const XACT_NOTIFICATION_DESCRIPTION *LPCXACT_NOTIFICATION_DESCRIPTION;
+
+typedef struct XACT_NOTIFICATION_CUE
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+} XACT_NOTIFICATION_CUE, *LPXACT_NOTIFICATION_CUE;
+typedef const XACT_NOTIFICATION_CUE *LPCXACT_NOTIFICATION_CUE;
+
+typedef struct XACT_WAVE_PROPERTIES
+{
+ char friendlyName[WAVEBANK_ENTRYNAME_LENGTH];
+ WAVEBANKMINIWAVEFORMAT format;
+ DWORD durationInSamples;
+ WAVEBANKSAMPLEREGION loopRegion;
+ BOOL streaming;
+} XACT_WAVE_PROPERTIES, *LPXACT_WAVE_PROPERTIES;
+typedef const XACT_WAVE_PROPERTIES *LPCXACT_WAVE_PROPERTIES;
+
+typedef struct XACT_WAVE_INSTANCE_PROPERTIES
+{
+ XACT_WAVE_PROPERTIES properties;
+ BOOL backgroundMusic;
+} XACT_WAVE_INSTANCE_PROPERTIES, *LPXACT_WAVE_INSTANCE_PROPERTIES;
+typedef const XACT_WAVE_INSTANCE_PROPERTIES *LPCXACT_WAVE_INSTANCE_PROPERTIES;
+
+typedef struct XACT_NOTIFICATION_MARKER
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+ DWORD marker;
+} XACT_NOTIFICATION_MARKER, *LPXACT_NOTIFICATION_MARKER;
+typedef const XACT_NOTIFICATION_MARKER *LPCXACT_NOTIFICATION_MARKER;
+
+typedef struct XACT_NOTIFICATION_SOUNDBANK
+{
+ IXACTSoundBank *pSoundBank;
+} XACT_NOTIFICATION_SOUNDBANK, *LPXACT_NOTIFICATION_SOUNDBANK;
+typedef const XACT_NOTIFICATION_SOUNDBANK *LPCXACT_NOTIFICATION_SOUNDBANK;
+
+typedef struct XACT_NOTIFICATION_WAVEBANK
+{
+ IXACTWaveBank *pWaveBank;
+} XACT_NOTIFICATION_WAVEBANK, *LPXACT_NOTIFICATION_WAVEBANK;
+typedef const XACT_NOTIFICATION_WAVEBANK *LPCXACT_NOTIFICATION_WAVEBANK;
+
+typedef struct XACT_NOTIFICATION_VARIABLE
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+ XACTVARIABLEINDEX variableIndex;
+ XACTVARIABLEVALUE variableValue;
+ BOOL local;
+} XACT_NOTIFICATION_VARIABLE, *LPXACT_NOTIFICATION_VARIABLE;
+typedef const XACT_NOTIFICATION_VARIABLE *LPCXACT_NOTIFICATION_VARIABLE;
+
+
+typedef struct XACT_NOTIFICATION_GUI
+{
+ DWORD reserved;
+} XACT_NOTIFICATION_GUI, *LPXACT_NOTIFICATION_GUI;
+typedef const XACT_NOTIFICATION_GUI *LPCXACT_NOTIFICATION_GUI;
+
+typedef struct XACT_NOTIFICATION_WAVE
+{
+ IXACTWaveBank *pWaveBank;
+ XACTINDEX waveIndex;
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+ IXACTWave *pWave;
+} XACT_NOTIFICATION_WAVE, *LPXACT_NOTIFICATION_WAVE;
+typedef const XACT_NOTIFICATION_WAVE *LPCXACT_NOTIFICATION_NAME;
+
+typedef struct XACT_NOTIFICATION
+{
+ XACTNOTIFICATIONTYPE type;
+ LONG timeStamp;
+ PVOID pvContext;
+ union
+ {
+ XACT_NOTIFICATION_CUE cue;
+ XACT_NOTIFICATION_MARKER marker;
+ XACT_NOTIFICATION_SOUNDBANK soundBank;
+ XACT_NOTIFICATION_WAVEBANK waveBank;
+ XACT_NOTIFICATION_VARIABLE variable;
+ XACT_NOTIFICATION_GUI gui;
+ XACT_NOTIFICATION_WAVE wave;
+ } DUMMYUNIONNAME;
+} XACT_NOTIFICATION, *LPXACT_NOTIFICATION;
+typedef const XACT_NOTIFICATION *LPCXACT_NOTIFICATION;
+
+typedef void (__stdcall *XACT_NOTIFICATION_CALLBACK)(
+ const XACT_NOTIFICATION *pNotification
+);
+
+typedef struct XACT_RUNTIME_PARAMETERS
+{
+ DWORD lookAheadTime;
+ void* pGlobalSettingsBuffer;
+ DWORD globalSettingsBufferSize;
+ DWORD globalSettingsFlags;
+ DWORD globalSettingsAllocAttributes;
+ XACT_FILEIO_CALLBACKS fileIOCallbacks;
+ XACT_NOTIFICATION_CALLBACK fnNotificationCallback;
+ LPCWSTR pRendererID;
+} XACT_RUNTIME_PARAMETERS, *LPXACT_RUNTIME_PARAMETERS;
+typedef const XACT_RUNTIME_PARAMETERS *LPCXACT_RUNTIME_PARAMETERS;
+
+#include <poppack.h>
+
+#define XACT_FLAG_CUE_STOP_RELEASE XACT_FLAG_STOP_RELEASE
+#define XACT_FLAG_CUE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+
+#define XACT_CUESTATE_CREATED XACT_STATE_CREATED
+#define XACT_CUESTATE_PREPARING XACT_STATE_PREPARING
+#define XACT_CUESTATE_PREPARED XACT_STATE_PREPARED
+#define XACT_CUESTATE_PLAYING XACT_STATE_PLAYING
+#define XACT_CUESTATE_STOPPING XACT_STATE_STOPPING
+#define XACT_CUESTATE_STOPPED XACT_STATE_STOPPED
+#define XACT_CUESTATE_PAUSED XACT_STATE_PAUSED
+
+/*****************************************************************************
+ * IXACTCue interface
+ */
+#define INTERFACE IXACTCue
+DECLARE_INTERFACE(IXACTCue)
+{
+ /*** IXACTCue methods ***/
+ STDMETHOD(Play)(THIS) PURE;
+ STDMETHOD(Stop)(THIS_ DWORD pdwFlags) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *pdwState) PURE;
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(GetChannelMap)(THIS_ LPXACTCHANNELMAP pChannelMap, DWORD BufferSize, LPDWORD pRequiredSize) PURE;
+ STDMETHOD(SetChannelMap)(THIS_ LPXACTCHANNELMAP pChannelMap) PURE;
+ STDMETHOD(GetChannelVolume)(THIS_ LPXACTCHANNELVOLUME pVolume) PURE;
+ STDMETHOD(SetChannelVolume)(THIS_ LPXACTCHANNELVOLUME pVolume) PURE;
+ STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 uSrcChannelCount, UINT32 uDstChannelCount, float *pMatrixCoefficients) PURE;
+ STDMETHOD_(XACTVARIABLEINDEX,GetVariableIndex)(THIS_ PCSTR szFriendlyName) PURE;
+ STDMETHOD(SetVariable)(THIS_ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE nValue) PURE;
+ STDMETHOD(GetVariable)(THIS_ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE *nValue) PURE;
+ STDMETHOD(Pause)(THIS_ BOOL fPause) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetProperties)(THIS_ LPXACT_CUE_INSTANCE_PROPERTIES *ppProperties) PURE;
+#endif
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IXACTCue methods ***/
+#define IXACTCue_Play(p) (p)->lpVtbl->Destroy(p)
+#define IXACTCue_Stop(p,a) (p)->lpVtbl->Stop(p,a)
+#define IXACTCue_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#define IXACTCue_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTCue_GetChannelMap(p,a,b,c) (p)->lpVtbl->GetChannelMap(p,a,b,c)
+#define IXACTCue_SetChannelMap(p,a) (p)->lpVtbl->SetChannelMap(p,a)
+#define IXACTCue_GetChannelVolume(p,a) (p)->lpVtbl->GetChannelVolume(p,a)
+#define IXACTCue_SetChannelVolume(p,a) (p)->lpVtbl->SetChannelVolume(p,a)
+#define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
+#define IXACTCue_GetVariableIndex(p,a) (p)->lpVtbl->GetVariableIndex(p,a)
+#define IXACTCue_SetVariable(p,a,b) (p)->lpVtbl->SetVariable(p,a,b)
+#define IXACTCue_GetVariable(p,a,b) (p)->lpVtbl->GetVariable(p,a,b)
+#define IXACTCue_Pause(p,a) (p)->lpVtbl->Pause(p,a)
+#if XACT3_VER >= 0x0205
+#define IXACTCue_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
+#endif
+#else
+/*** IXACTCue methods ***/
+#define IXACTCue_Play(p) (p)->Destroy()
+#define IXACTCue_Stop(p,a) (p)->Stop(a)
+#define IXACTCue_GetState(p,a) (p)->Stop(a)
+#define IXACTCue_Destroy(p) (p)->Destroy()
+#define IXACTCue_GetChannelMap(p,a,b,c) (p)->GetChannelMap(a,b,c)
+#define IXACTCue_SetChannelMap(p,a) (p)->SetChannelMap(a)
+#define IXACTCue_GetChannelVolume(p,a) (p)->GetChannelVolume(a)
+#define IXACTCue_SetChannelVolume(p,a) (p)->SetChannelVolume(a)
+#define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
+#define IXACTCue_GetVariableIndex(p,a) (p)->GetVariableIndex(a)
+#define IXACTCue_SetVariable(p,a,b) (p)->SetVariable(a,b)
+#define IXACTCue_GetVariable(p,a,b) (p)->GetVariable(a,b)
+#define IXACTCue_Pause(p,a) (p)->Pause(a)
+#if XACT3_VER >= 0x0205
+#define IXACTCue_GetProperties(p,a) (p)->GetProperties(a)
+#endif
+#endif
+
+/*****************************************************************************
+ * IXACTWave interface
+ */
+#define INTERFACE IXACTWave
+DECLARE_INTERFACE(IXACTWave)
+{
+ /*** IXACTWave methods ***/
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(Play)(THIS) PURE;
+ STDMETHOD(Stop)(THIS_ DWORD pdwFlags) PURE;
+ STDMETHOD(Pause)(THIS_ BOOL fPause) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *pdwState) PURE;
+ STDMETHOD(SetPitch)(THIS_ XACTPITCH pitch) PURE;
+ STDMETHOD(SetVolume)(THIS_ XACTVOLUME volume) PURE;
+ STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 uSrcChannelCount, UINT32 uDstChannelCount, float *pMatrixCoefficients) PURE;
+ STDMETHOD(GetProperties)(THIS_ LPXACT_WAVE_INSTANCE_PROPERTIES pProperties) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IXACTWave methods ***/
+#define IXACTWave_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTWave_Play(p) (p)->lpVtbl->Destroy(p)
+#define IXACTWave_Stop(p,a) (p)->lpVtbl->Stop(p,a)
+#define IXACTWave_Pause(p,a) (p)->lpVtbl->Pause(p,a)
+#define IXACTWave_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#define IXACTWave_SetPitch(p,a) (p)->lpVtbl->SetPitch(p,a)
+#define IXACTWave_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
+#define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
+#define IXACTWave_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
+#else
+/*** IXACTWave methods ***/
+#define IXACTWave_Destroy(p) (p)->Destroy()
+#define IXACTWave_Play(p) (p)->Destroy()
+#define IXACTWave_Stop(p,a) (p)->Stop(a)
+#define IXACTWave_Pause(p,a) (p)->Pause(a)
+#define IXACTWave_GetState(p,a) (p)->Stop(a)
+#define IXACTWave_SetPitch(p,a) (p)->SetVariable(a)
+#define IXACTWave_SetVolume(p,a) (p)->SetVolume(a)
+#define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
+#define IXACTWave_GetProperties(p,a) (p)->GetProperties(a)
+#endif
+
+#define XACT_FLAG_SOUNDBANK_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+#define XACT_SOUNDBANKSTATE_INUSE XACT_STATE_INUSE
+
+/*****************************************************************************
+ * IXACTSoundBank interface
+ */
+#define INTERFACE IXACTSoundBank
+DECLARE_INTERFACE(IXACTSoundBank)
+{
+ /*** IXACTSoundBank methods ***/
+ STDMETHOD_(XACTINDEX,GetCueIndex)(THIS_ PCSTR szFriendlyName) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetNumCues)(THIS_ XACTINDEX *pnNumCues) PURE;
+ STDMETHOD(GetCueProperties)(THIS_ XACTINDEX nCueIndex, LPXACT_CUE_PROPERTIES pProperties) PURE;
+#endif
+ STDMETHOD(Prepare)(THIS_ XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset, IXACTCue **ppCue) PURE;
+ STDMETHOD(Play)(THIS_ XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset, IXACTCue **ppCue) PURE;
+ STDMETHOD(Stop)(THIS_ XACTINDEX nCueIndex, DWORD dwFlags) PURE;
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *pdwState) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IXACTSoundBank methods ***/
+#define IXACTSoundBank_GetCueIndex(p,a) (p)->lpVtbl->GetCueIndex(p,a)
+#if XACT3_VER >= 0x0205
+#define IXACTSoundBank_GetNumCues(p,a) (p)->lpVtbl->GetNumCues(p,a)
+#define IXACTSoundBank_GetCueProperties(p,a,b) (p)->lpVtbl->GetCueProperties(p,a,b)
+#endif
+#define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->lpVtbl->Prepare(p,a,b,c,d)
+#define IXACTSoundBank_Play(p,a,b,c,d) (p)->lpVtbl->Play(p,a,b,c,d)
+#define IXACTSoundBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
+#define IXACTSoundBank_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTSoundBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#else
+/*** IXACTSoundBank methods ***/
+#define IXACTSoundBank_GetCueIndex(p,a) (p)->GetCueIndex(a)
+#if XACT3_VER >= 0x0205
+#define IXACTSoundBank_GetNumCues(p,a) (p)->GetNumCues(a)
+#define IXACTSoundBank_GetCueProperties(p,a,b) (p)->GetCueProperties(a,b)
+#endif
+#define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->Prepare(a,b,c,d)
+#define IXACTSoundBank_Play(p,a,b,c,d) (p)->Play(a,b,c,d)
+#define IXACTSoundBank_Stop(p,a,b) (p)->Stop(a,b)
+#define IXACTSoundBank_Destroy(p) (p)->Destroy()
+#define IXACTSoundBank_GetState(p,a) (p)->GetState(a)
+#endif
+
+#define XACT_WAVEBANKSTATE_INUSE XACT_STATE_INUSE
+#define XACT_WAVEBANKSTATE_PREPARED XACT_STATE_PREPARED
+#define XACT_WAVEBANKSTATE_PREPAREFAILED XACT_STATE_PREPAREFAILED
+
+/*****************************************************************************
+ * IXACTWaveBank interface
+ */
+#define INTERFACE IXACTWaveBank
+DECLARE_INTERFACE(IXACTWaveBank)
+{
+ /*** IXACTWaveBank methods ***/
+ STDMETHOD(Destroy)(THIS) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetNumWaves)(THIS_ XACTINDEX *pnNumWaves) PURE;
+ STDMETHOD_(XACTINDEX,GetWaveIndex)(THIS_ PCSTR szFriendlyName) PURE;
+ STDMETHOD(GetWaveProperties)(THIS_ XACTINDEX nWaveIndex, LPXACT_WAVE_PROPERTIES pWaveProperties) PURE;
+ STDMETHOD(Prepare)(THIS_ XACTINDEX nWaveIndex, DWORD dwFlags, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave) PURE;
+ STDMETHOD(Play)(THIS_ XACTINDEX nWaveIndex, DWORD dwFlags, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave) PURE;
+ STDMETHOD(Stop)(THIS_ XACTINDEX nWaveIndex, DWORD dwFlags) PURE;
+#endif
+ STDMETHOD(GetState)(THIS_ DWORD *pdwState) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IXACTWaveBank methods ***/
+#define IXACTWaveBank_Destroy(p) (p)->lpVtbl->Destroy(p)
+#if XACT3_VER >= 0x0205
+#define IXACTWaveBank_GetNumWaves(p,a) (p)->lpVtbl->GetNumCues(p,a)
+#define IXACTWaveBank_GetWaveIndex(p,a) (p)->lpVtbl->GetWaveIndex(p,a)
+#define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->lpVtbl->GetWaveProperties(p,a,b)
+#define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->lpVtbl->Prepare(p,a,b,c,d,e)
+#define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->lpVtbl->Play(p,a,b,c,d,e)
+#define IXACTWaveBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
+#endif
+#define IXACTWaveBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#else
+/*** IXACTWaveBank methods ***/
+#define IXACTWaveBank_Destroy(p) (p)->Destroy()
+#if XACT3_VER >= 0x0205
+#define IXACTWaveBank_GetNumWaves(p,a) (p)->GetNumWaves(a)
+#define IXACTWaveBank_GetWaveIndex(p,a) (p)->GetWaveIndex(a)
+#define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->GetWaveProperties(a,b)
+#define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->Prepare(a,b,c,d,e)
+#define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->Play(a,b,c,d,e)
+#define IXACTWaveBank_Stop(p,a,b) (p)->Stop(a,b)
+#endif
+#define IXACTWaveBank_GetState(p,a) (p)->GetState(a)
+#endif
+
+#define XACT_FLAG_ENGINE_CREATE_MANAGEDATA XACT_FLAG_MANAGEDATA
+#define XACT_FLAG_ENGINE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+
+#define INTERFACE IXACTEngine
+DECLARE_INTERFACE_(IXACTEngine,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IXACTEngine methods ***/
+ STDMETHOD(GetRendererCount)(THIS_ XACTINDEX *pnRendererCount) PURE;
+ STDMETHOD(GetRendererDetails)(THIS_ XACTINDEX nRendererIndex, LPXACT_RENDERER_DETAILS pRendererDetails) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetFinalMixFormat)(THIS_ WAVEFORMATEXTENSIBLE *pFinalMixFormat) PURE;
+#endif
+ STDMETHOD(Initialize)(THIS_ const XACT_RUNTIME_PARAMETERS *pParams) PURE;
+ STDMETHOD(Shutdown)(THIS) PURE;
+ STDMETHOD(DoWork)(THIS) PURE;
+ STDMETHOD(CreateSoundBank)(THIS_ const void *pvBuffer, DWORD dwSize, DWORD dwFlags, DWORD dwAllocAttributes, IXACTSoundBank **ppSoundBank) PURE;
+ STDMETHOD(CreateInMemoryWaveBank)(THIS_ const void *pvBuffer, DWORD dwSize, DWORD dwFlags, DWORD dwAllocAttributes, IXACTWaveBank **ppWaveBank) PURE;
+ STDMETHOD(CreateStreamingWaveBank)(THIS_ const XACT_WAVEBANK_STREAMING_PARAMETERS *pParams, IXACTWaveBank **ppWaveBank) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(PrepareWave)(THIS_ DWORD dwFlags, PCSTR szWavePath, WORD wStreamingPacketSize, DWORD dwAlignment,
+ DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave) PURE;
+ STDMETHOD(PrepareInMemoryWave)(THIS_ DWORD dwFlags, WAVEBANKENTRY entry, DWORD *pdwSeekTable, BYTE *pbWaveData,
+ DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave) PURE;
+ STDMETHOD(PrepareStreamingWave)(THIS_ DWORD dwFlags, WAVEBANKENTRY entry, XACT_STREAMING_PARAMETERS streamingParams, DWORD dwAlignment, DWORD *pdwSeekTable,
+ DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount, IXACTWave **ppWave) PURE;
+#endif
+ STDMETHOD(RegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc) PURE;
+ STDMETHOD(UnRegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc) PURE;
+ STDMETHOD_(XACTCATEGORY,GetCategory)(THIS_ PCSTR szFriendlyName) PURE;
+ STDMETHOD(Stop)(THIS_ XACTCATEGORY nCategory, DWORD dwFlags) PURE;
+ STDMETHOD(SetVolume)(THIS_ XACTCATEGORY nCategory, XACTVOLUME nVolume) PURE;
+ STDMETHOD(Pause)(THIS_ XACTCATEGORY nCategory, BOOL fPause) PURE;
+ STDMETHOD_(XACTVARIABLEINDEX,GetGlobalVariableIndex)(THIS_ PCSTR szFriendlyName) PURE;
+ STDMETHOD(SetGlobalVariable)(THIS_ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE nValue) PURE;
+ STDMETHOD(GetGlobalVariable)(THIS_ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE *nValue) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IXACTEngine_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IXACTEngine_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IXACTEngine_Release(p) (p)->lpVtbl->Release(p)
+/*** IXACTEngine methods ***/
+#define IXACTEngine_GetRendererCount(p,a) (p)->lpVtbl->GetRendererCount(p,a)
+#define IXACTEngine_GetRendererDetails(p,a,b) (p)->lpVtbl->GetRendererDetails(p,a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_GetFinalMixFormat(p,a) (p)->lpVtbl->GetFinalMixFormat(p,a)
+#endif
+#define IXACTEngine_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
+#define IXACTEngine_Shutdown(p) (p)->lpVtbl->Shutdown(p)
+#define IXACTEngine_DoWork(p) (p)->lpVtbl->DoWork(p)
+#define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->lpVtbl->CreateSoundBank(p,a,b,c,d,e)
+#define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->lpVtbl->CreateInMemoryWaveBank(p,a,b,c,d,e)
+#define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->lpVtbl->CreateStreamingWaveBank(p,a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareWave(p,a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareInMemoryWave(p,a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->PrepareStreamingWave(p,a,b,c,d,e,f,g,h)
+#endif
+#define IXACTEngine_RegisterNotification(p,a) (p)->lpVtbl->RegisterNotification(p,a)
+#define IXACTEngine_UnRegisterNotification(p,a) (p)->lpVtbl->UnRegisterNotification(p,a)
+#define IXACTEngine_GetCategory(p,a) (p)->lpVtbl->GetCategory(p,a)
+#define IXACTEngine_Stop(p,a,b) (p)->lpVtbl->Stop(a,b)
+#define IXACTEngine_SetVolume(p,a,b) (p)->lpVtbl->SetVolume(p,a,b)
+#define IXACTEngine_Pause(p,a,b) (p)->lpVtbl->Pause(a,b)
+#define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->lpVtbl->GetGlobalVariableIndex(p,a)
+#define IXACTEngine_SetGlobalVariable(p,a,b) (p)->lpVtbl->SetGlobalVariable(p,a,b)
+#define IXACTEngine_GetGlobalVariable(p,a,b) (p)->lpVtbl->GetGlobalVariable(p,a,b)
+#else
+*** IUnknown methods ***/
+#define IXACTEngine_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IXACTEngine_AddRef(p) (p)->AddRef()
+#define IXACTEngine_Release(p) (p)->Release()
+/*** IXACTEngine methods ***/
+#define IXACTEngine_GetRendererCount(p,a) (p)->GetRendererCount(a)
+#define IXACTEngine_GetRendererDetails(p,a,b) (p)->GetRendererDetails(a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_GetFinalMixFormat(p,a) (p)->GetFinalMixFormat(a)
+#endif
+#define IXACTEngine_Initialize(p,a) (p)->Initialize(a)
+#define IXACTEngine_Shutdown(p) (p)->Shutdown()
+#define IXACTEngine_DoWork(p) (p)->DoWork()
+#define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->CreateSoundBank(a,b,c,d,e)
+#define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->CreateInMemoryWaveBank(a,b,c,d,e)
+#define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->CreateStreamingWaveBank(a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->PrepareWave(a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->PrepareInMemoryWave(a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->PrepareStreamingWave(a,b,c,d,e,f,g,h)
+#endif
+#define IXACTEngine_RegisterNotification(p,a) (p)->RegisterNotification(a)
+#define IXACTEngine_UnRegisterNotification(p,a) (p)->UnRegisterNotification(a)
+#define IXACTEngine_GetCategory(p,a) (p)->GetCategory(a)
+#define IXACTEngine_Stop(p,a,b) (p)->Stop(a,b)
+#define IXACTEngine_SetVolume(p,a,b) (p)->SetVolume(p,a,b)
+#define IXACTEngine_Pause(p,a,b) (p)->Pause(a,b)
+#define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->GetGlobalVariableIndex(a)
+#define IXACTEngine_SetGlobalVariable(p,a,b) (p)->SetGlobalVariable(a,b)
+#define IXACTEngine_GetGlobalVariable(p,a,b) (p)->GetGlobalVariable(a,b)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_XACT_H */
--
2.28.0

View File

@ -0,0 +1,160 @@
From fb2f51e8cacba6adcc47f61ae937323b2de76388 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 12:56:33 +0200
Subject: [PATCH 03/23] xactengine2_10: Add new dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 1 +
dlls/xactengine2_10/Makefile.in | 8 ++++
dlls/xactengine2_10/xact2_classes.idl | 27 +++++++++++
dlls/xactengine2_10/xact2_dll.c | 64 +++++++++++++++++++++++++
dlls/xactengine2_10/xactengine2_10.spec | 4 ++
5 files changed, 104 insertions(+)
create mode 100644 dlls/xactengine2_10/Makefile.in
create mode 100644 dlls/xactengine2_10/xact2_classes.idl
create mode 100644 dlls/xactengine2_10/xact2_dll.c
create mode 100644 dlls/xactengine2_10/xactengine2_10.spec
diff --git a/configure.ac b/configure.ac
index 110f50d762a..aa1d315da41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3983,6 +3983,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_4)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_1)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_2)
diff --git a/dlls/xactengine2_10/Makefile.in b/dlls/xactengine2_10/Makefile.in
new file mode 100644
index 00000000000..b1c131ddfd9
--- /dev/null
+++ b/dlls/xactengine2_10/Makefile.in
@@ -0,0 +1,8 @@
+MODULE = xactengine2_10.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0210
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
new file mode 100644
index 00000000000..1a248327bb7
--- /dev/null
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -0,0 +1,27 @@
+/*
+ * COM Classes for xactengine
+ *
+ * Copyright 2018 Ethan Lee for CodeWeavers
+ *
+ * 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
+ */
+
+#pragma makedep register
+
+[
+ threading(both),
+ uuid(65d822a4-4799-42c6-9b18-d26cf66dd320)
+]
+coclass XACTEngine {}
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
new file mode 100644
index 00000000000..743f17c0691
--- /dev/null
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018 Ethan Lee for CodeWeavers
+ *
+ * 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 "config.h"
+
+#include <stdarg.h>
+
+#include "initguid.h"
+#include "xact.h"
+#include "rpcproxy.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(xact3);
+
+static HINSTANCE instance;
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
+{
+ TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved);
+
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ instance = hinstDLL;
+ DisableThreadLibraryCalls( hinstDLL );
+ break;
+ }
+ return TRUE;
+}
+
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+ return S_FALSE;
+}
+
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
+{
+ FIXME("Unknown class %s\n", debugstr_guid(rclsid));
+ return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+HRESULT WINAPI DllRegisterServer(void)
+{
+ return __wine_register_resources(instance);
+}
+
+HRESULT WINAPI DllUnregisterServer(void)
+{
+ return __wine_unregister_resources(instance);
+}
diff --git a/dlls/xactengine2_10/xactengine2_10.spec b/dlls/xactengine2_10/xactengine2_10.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_10/xactengine2_10.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,564 @@
From d487c457d30e5ace5cf98cd76e4add11580dd159 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Mon, 17 Aug 2020 13:40:59 +0200
Subject: [PATCH 04/23] xactengine2_10: Implement IXACTEngine interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure | 1 +
configure.ac | 1 +
dlls/xactengine2_10/Makefile.in | 2 +
dlls/xactengine2_10/xact2_dll.c | 479 ++++++++++++++++++++++++++++++++
4 files changed, 483 insertions(+)
diff --git a/configure b/configure
index 3c58e678719..7c7d3b3ce16 100755
--- a/configure
+++ b/configure
@@ -16871,6 +16871,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_10=${enable_xactengine2_10:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
enable_xactengine3_2=${enable_xactengine3_2:-no}
diff --git a/configure.ac b/configure.ac
index aa1d315da41..bcbeb230ed2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1986,6 +1986,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_10=${enable_xactengine2_10:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
enable_xactengine3_2=${enable_xactengine3_2:-no}
diff --git a/dlls/xactengine2_10/Makefile.in b/dlls/xactengine2_10/Makefile.in
index b1c131ddfd9..223b188d371 100644
--- a/dlls/xactengine2_10/Makefile.in
+++ b/dlls/xactengine2_10/Makefile.in
@@ -1,6 +1,8 @@
MODULE = xactengine2_10.dll
IMPORTS = ole32 uuid
EXTRADEFS = -DXACT3_VER=0x0210
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
C_SRCS = \
xact2_dll.c
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 743f17c0691..08275a19f5c 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -18,6 +18,10 @@
#include "config.h"
#include <stdarg.h>
+#include <FACT.h>
+
+#define NONAMELESSUNION
+#define COBJMACROS
#include "initguid.h"
#include "xact.h"
@@ -28,6 +32,470 @@ WINE_DEFAULT_DEBUG_CHANNEL(xact3);
static HINSTANCE instance;
+typedef struct _XACTEngineImpl {
+ IXACTEngine IXACTEngine_iface;
+
+ FACTAudioEngine *fact_engine;
+
+ XACT_READFILE_CALLBACK pReadFile;
+ XACT_GETOVERLAPPEDRESULT_CALLBACK pGetOverlappedResult;
+ XACT_NOTIFICATION_CALLBACK notification_callback;
+} XACTEngineImpl;
+
+typedef struct wrap_readfile_struct {
+ XACTEngineImpl *engine;
+ HANDLE file;
+} wrap_readfile_struct;
+
+static int32_t FACTCALL wrap_readfile(
+ void* hFile,
+ void* lpBuffer,
+ uint32_t nNumberOfBytesRead,
+ uint32_t *lpNumberOfBytesRead,
+ FACTOverlapped *lpOverlapped)
+{
+ wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
+ return wrap->engine->pReadFile(wrap->file, lpBuffer, nNumberOfBytesRead,
+ lpNumberOfBytesRead, (LPOVERLAPPED)lpOverlapped);
+}
+
+static int32_t FACTCALL wrap_getoverlappedresult(
+ void* hFile,
+ FACTOverlapped *lpOverlapped,
+ uint32_t *lpNumberOfBytesTransferred,
+ int32_t bWait)
+{
+ wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
+ return wrap->engine->pGetOverlappedResult(wrap->file, (LPOVERLAPPED)lpOverlapped,
+ lpNumberOfBytesTransferred, bWait);
+}
+
+static inline XACTEngineImpl *impl_from_IXACTEngine(IXACTEngine *iface)
+{
+ return CONTAINING_RECORD(iface, XACTEngineImpl, IXACTEngine_iface);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_QueryInterface(IXACTEngine *iface,
+ REFIID riid, void **ppvObject)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
+
+ if(IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IXACTEngine)){
+ *ppvObject = &This->IXACTEngine_iface;
+ }
+ else
+ *ppvObject = NULL;
+
+ if (*ppvObject){
+ IUnknown_AddRef((IUnknown*)*ppvObject);
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppvObject);
+
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IXACTEngineImpl_AddRef(IXACTEngine *iface)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ ULONG ref = FACTAudioEngine_AddRef(This->fact_engine);
+ TRACE("(%p)->(): Refcount now %u\n", This, ref);
+ return ref;
+}
+
+static ULONG WINAPI IXACTEngineImpl_Release(IXACTEngine *iface)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ ULONG ref = FACTAudioEngine_Release(This->fact_engine);
+
+ TRACE("(%p)->(): Refcount now %u\n", This, ref);
+
+ if (!ref)
+ HeapFree(GetProcessHeap(), 0, This);
+ return ref;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_GetRendererCount(IXACTEngine *iface,
+ XACTINDEX *pnRendererCount)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%p)\n", This, pnRendererCount);
+
+ return FACTAudioEngine_GetRendererCount(This->fact_engine, pnRendererCount);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_GetRendererDetails(IXACTEngine *iface,
+ XACTINDEX nRendererIndex, XACT_RENDERER_DETAILS *pRendererDetails)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%d, %p)\n", This, nRendererIndex, pRendererDetails);
+
+ return FACTAudioEngine_GetRendererDetails(This->fact_engine,
+ nRendererIndex, (FACTRendererDetails*) pRendererDetails);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_GetFinalMixFormat(IXACTEngine *iface,
+ WAVEFORMATEXTENSIBLE *pFinalMixFormat)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%p)\n", This, pFinalMixFormat);
+
+ return FACTAudioEngine_GetFinalMixFormat(This->fact_engine,
+ (FAudioWaveFormatExtensible*) pFinalMixFormat);
+}
+
+static void FACTCALL fact_notification_cb(const FACTNotification *notification)
+{
+ XACTEngineImpl *engine = (XACTEngineImpl *)notification->pvContext;
+
+ /* Older versions of FAudio don't pass through the context */
+ if (!engine)
+ {
+ WARN("Notification context is NULL\n");
+ return;
+ }
+
+ if (notification->type == XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED)
+ {
+ FIXME("Callback XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED\n");
+ }
+ else
+ FIXME("Unsupported callback type %d\n", notification->type);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_Initialize(IXACTEngine *iface,
+ const XACT_RUNTIME_PARAMETERS *pParams)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FACTRuntimeParameters params;
+ UINT ret;
+
+ TRACE("(%p)->(%p)\n", This, pParams);
+
+ params.lookAheadTime = pParams->lookAheadTime;
+ params.pGlobalSettingsBuffer = pParams->pGlobalSettingsBuffer;
+ params.globalSettingsBufferSize = pParams->globalSettingsBufferSize;
+ params.globalSettingsFlags = pParams->globalSettingsFlags;
+ params.globalSettingsAllocAttributes = pParams->globalSettingsAllocAttributes;
+ params.pRendererID = pParams->pRendererID;
+ params.pXAudio2 = NULL;
+ params.pMasteringVoice = NULL;
+
+ /* Force Windows I/O, do NOT use the FACT default! */
+ This->pReadFile = (XACT_READFILE_CALLBACK)
+ pParams->fileIOCallbacks.readFileCallback;
+ This->pGetOverlappedResult = (XACT_GETOVERLAPPEDRESULT_CALLBACK)
+ pParams->fileIOCallbacks.getOverlappedResultCallback;
+ if (This->pReadFile == NULL)
+ This->pReadFile = (XACT_READFILE_CALLBACK) ReadFile;
+ if (This->pGetOverlappedResult == NULL)
+ This->pGetOverlappedResult = (XACT_GETOVERLAPPEDRESULT_CALLBACK)
+ GetOverlappedResult;
+ params.fileIOCallbacks.readFileCallback = wrap_readfile;
+ params.fileIOCallbacks.getOverlappedResultCallback = wrap_getoverlappedresult;
+ params.fnNotificationCallback = fact_notification_cb;
+
+ This->notification_callback = (XACT_NOTIFICATION_CALLBACK)pParams->fnNotificationCallback;
+
+ ret = FACTAudioEngine_Initialize(This->fact_engine, &params);
+ if (ret != 0)
+ WARN("FACTAudioEngine_Initialize returned %d\n", ret);
+
+ return !ret ? S_OK : E_FAIL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_ShutDown(IXACTEngine *iface)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)\n", This);
+
+ return FACTAudioEngine_ShutDown(This->fact_engine);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_DoWork(IXACTEngine *iface)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)\n", This);
+
+ return FACTAudioEngine_DoWork(This->fact_engine);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_CreateSoundBank(IXACTEngine *iface,
+ const void* pvBuffer, DWORD dwSize, DWORD dwFlags,
+ DWORD dwAllocAttributes, IXACTSoundBank **ppSoundBank)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ dwAllocAttributes, ppSoundBank);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_CreateInMemoryWaveBank(IXACTEngine *iface,
+ const void* pvBuffer, DWORD dwSize, DWORD dwFlags,
+ DWORD dwAllocAttributes, IXACTWaveBank **ppWaveBank)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ dwAllocAttributes, ppWaveBank);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_CreateStreamingWaveBank(IXACTEngine *iface,
+ const XACT_WAVEBANK_STREAMING_PARAMETERS *pParms,
+ IXACTWaveBank **ppWaveBank)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p)->(%p, %p): stub!\n", This, pParms, ppWaveBank);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_PrepareInMemoryWave(IXACTEngine *iface,
+ DWORD dwFlags, WAVEBANKENTRY entry, DWORD *pdwSeekTable,
+ BYTE *pbWaveData, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount,
+ IXACTWave **ppWave)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p): stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_PrepareStreamingWave(IXACTEngine *iface,
+ DWORD dwFlags, WAVEBANKENTRY entry,
+ XACT_STREAMING_PARAMETERS streamingParams, DWORD dwAlignment,
+ DWORD *pdwSeekTable, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount,
+ IXACTWave **ppWave)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p): stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_PrepareWave(IXACTEngine *iface,
+ DWORD dwFlags, PCSTR szWavePath, WORD wStreamingPacketSize,
+ DWORD dwAlignment, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount,
+ IXACTWave **ppWave)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p): stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_RegisterNotification(IXACTEngine *iface,
+ const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p)->(%p): stub!\n", This, pNotificationDesc);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTEngineImpl_UnRegisterNotification(IXACTEngine *iface,
+ const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+ FIXME("(%p)->(%p): stub!\n", This, pNotificationDesc);
+ return E_NOTIMPL;
+}
+
+static XACTCATEGORY WINAPI IXACTEngineImpl_GetCategory(IXACTEngine *iface,
+ PCSTR szFriendlyName)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%s)\n", This, szFriendlyName);
+
+ return FACTAudioEngine_GetCategory(This->fact_engine, szFriendlyName);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_Stop(IXACTEngine *iface,
+ XACTCATEGORY nCategory, DWORD dwFlags)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%u, 0x%x)\n", This, nCategory, dwFlags);
+
+ return FACTAudioEngine_Stop(This->fact_engine, nCategory, dwFlags);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_SetVolume(IXACTEngine *iface,
+ XACTCATEGORY nCategory, XACTVOLUME nVolume)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%u, %f)\n", This, nCategory, nVolume);
+
+ return FACTAudioEngine_SetVolume(This->fact_engine, nCategory, nVolume);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_Pause(IXACTEngine *iface,
+ XACTCATEGORY nCategory, BOOL fPause)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%u, %u)\n", This, nCategory, fPause);
+
+ return FACTAudioEngine_Pause(This->fact_engine, nCategory, fPause);
+}
+
+static XACTVARIABLEINDEX WINAPI IXACTEngineImpl_GetGlobalVariableIndex(
+ IXACTEngine *iface, PCSTR szFriendlyName)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%s)\n", This, szFriendlyName);
+
+ return FACTAudioEngine_GetGlobalVariableIndex(This->fact_engine,
+ szFriendlyName);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_SetGlobalVariable(IXACTEngine *iface,
+ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE nValue)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%u, %f)\n", This, nIndex, nValue);
+
+ return FACTAudioEngine_SetGlobalVariable(This->fact_engine, nIndex, nValue);
+}
+
+static HRESULT WINAPI IXACTEngineImpl_GetGlobalVariable(IXACTEngine *iface,
+ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE *nValue)
+{
+ XACTEngineImpl *This = impl_from_IXACTEngine(iface);
+
+ TRACE("(%p)->(%u, %p)\n", This, nIndex, nValue);
+
+ return FACTAudioEngine_GetGlobalVariable(This->fact_engine, nIndex, nValue);
+}
+
+static const IXACTEngineVtbl XACTEngine_Vtbl =
+{
+ IXACTEngineImpl_QueryInterface,
+ IXACTEngineImpl_AddRef,
+ IXACTEngineImpl_Release,
+ IXACTEngineImpl_GetRendererCount,
+ IXACTEngineImpl_GetRendererDetails,
+ IXACTEngineImpl_GetFinalMixFormat,
+ IXACTEngineImpl_Initialize,
+ IXACTEngineImpl_ShutDown,
+ IXACTEngineImpl_DoWork,
+ IXACTEngineImpl_CreateSoundBank,
+ IXACTEngineImpl_CreateInMemoryWaveBank,
+ IXACTEngineImpl_CreateStreamingWaveBank,
+ IXACTEngineImpl_PrepareWave,
+ IXACTEngineImpl_PrepareInMemoryWave,
+ IXACTEngineImpl_PrepareStreamingWave,
+ IXACTEngineImpl_RegisterNotification,
+ IXACTEngineImpl_UnRegisterNotification,
+ IXACTEngineImpl_GetCategory,
+ IXACTEngineImpl_Stop,
+ IXACTEngineImpl_SetVolume,
+ IXACTEngineImpl_Pause,
+ IXACTEngineImpl_GetGlobalVariableIndex,
+ IXACTEngineImpl_SetGlobalVariable,
+ IXACTEngineImpl_GetGlobalVariable
+};
+
+void* XACT_Internal_Malloc(size_t size)
+{
+ return CoTaskMemAlloc(size);
+}
+
+void XACT_Internal_Free(void* ptr)
+{
+ return CoTaskMemFree(ptr);
+}
+
+void* XACT_Internal_Realloc(void* ptr, size_t size)
+{
+ return CoTaskMemRealloc(ptr, size);
+}
+
+static HRESULT WINAPI XACTCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
+{
+ if(IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IClassFactory))
+ {
+ *ppobj = iface;
+ return S_OK;
+ }
+
+ *ppobj = NULL;
+ WARN("(%p)->(%s, %p): interface not found\n", iface, debugstr_guid(riid), ppobj);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI XACTCF_AddRef(IClassFactory *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI XACTCF_Release(IClassFactory *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI XACTCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter,
+ REFIID riid, void **ppobj)
+{
+ HRESULT hr;
+ XACTEngineImpl *object;
+
+ TRACE("(%p)->(%p,%s,%p)\n", iface, pOuter, debugstr_guid(riid), ppobj);
+
+ *ppobj = NULL;
+
+ if(pOuter)
+ return CLASS_E_NOAGGREGATION;
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if(!object)
+ return E_OUTOFMEMORY;
+
+ object->IXACTEngine_iface.lpVtbl = &XACTEngine_Vtbl;
+
+ FACTCreateEngineWithCustomAllocatorEXT(
+ 0,
+ &object->fact_engine,
+ XACT_Internal_Malloc,
+ XACT_Internal_Free,
+ XACT_Internal_Realloc
+ );
+
+ hr = IXACTEngine_QueryInterface(&object->IXACTEngine_iface, riid, ppobj);
+ if(FAILED(hr)){
+ HeapFree(GetProcessHeap(), 0, object);
+ return hr;
+ }
+
+ return hr;
+}
+
+static HRESULT WINAPI XACTCF_LockServer(IClassFactory *iface, BOOL dolock)
+{
+ TRACE("(%p)->(%d): stub!\n", iface, dolock);
+ return S_OK;
+}
+
+static const IClassFactoryVtbl XACTCF_Vtbl =
+{
+ XACTCF_QueryInterface,
+ XACTCF_AddRef,
+ XACTCF_Release,
+ XACTCF_CreateInstance,
+ XACTCF_LockServer
+};
+
+static IClassFactory XACTFactory = { &XACTCF_Vtbl };
+
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
{
TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved);
@@ -37,6 +505,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
case DLL_PROCESS_ATTACH:
instance = hinstDLL;
DisableThreadLibraryCalls( hinstDLL );
+
+#ifdef HAVE_FAUDIOLINKEDVERSION
+ TRACE("Using FAudio version %d\n", FAudioLinkedVersion() );
+#endif
+
break;
}
return TRUE;
@@ -49,6 +522,12 @@ HRESULT WINAPI DllCanUnloadNow(void)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
+ if (IsEqualGUID(rclsid, &CLSID_XACTEngine))
+ {
+ TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+ return IClassFactory_QueryInterface(&XACTFactory, riid, ppv);
+ }
+
FIXME("Unknown class %s\n", debugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE;
}
--
2.28.0

View File

@ -0,0 +1,178 @@
From 31d429746d85fbfa60cab01f4cb7ad2981e57d7e Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 13:36:05 +0200
Subject: [PATCH 05/23] xactengine2_10: Implement IXACTSoundBank interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 139 +++++++++++++++++++++++++++++++-
1 file changed, 136 insertions(+), 3 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 08275a19f5c..98193498e49 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -32,6 +32,112 @@ WINE_DEFAULT_DEBUG_CHANNEL(xact3);
static HINSTANCE instance;
+typedef struct _XACTSoundBankImpl {
+ IXACTSoundBank IXACTSoundBank_iface;
+
+ FACTSoundBank *fact_soundbank;
+} XACTSoundBankImpl;
+
+static inline XACTSoundBankImpl *impl_from_IXACTSoundBank(IXACTSoundBank *iface)
+{
+ return CONTAINING_RECORD(iface, XACTSoundBankImpl, IXACTSoundBank_iface);
+}
+
+static XACTINDEX WINAPI IXACTSoundBankImpl_GetCueIndex(IXACTSoundBank *iface,
+ PCSTR szFriendlyName)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+
+ TRACE("(%p)->(%s)\n", This, szFriendlyName);
+
+ return FACTSoundBank_GetCueIndex(This->fact_soundbank, szFriendlyName);
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_GetNumCues(IXACTSoundBank *iface,
+ XACTINDEX *pnNumCues)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+
+ TRACE("(%p)->(%p)\n", This, pnNumCues);
+
+ return FACTSoundBank_GetNumCues(This->fact_soundbank, pnNumCues);
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_GetCueProperties(IXACTSoundBank *iface,
+ XACTINDEX nCueIndex, XACT_CUE_PROPERTIES *pProperties)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+
+ TRACE("(%p)->(%u, %p)\n", This, nCueIndex, pProperties);
+
+ return FACTSoundBank_GetCueProperties(This->fact_soundbank, nCueIndex,
+ (FACTCueProperties*) pProperties);
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_Prepare(IXACTSoundBank *iface,
+ XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset,
+ IXACTCue** ppCue)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+ FIXME("(%p)->(%u, 0x%x, %u, %p): stub!\n", This, nCueIndex, dwFlags, timeOffset,
+ ppCue);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_Play(IXACTSoundBank *iface,
+ XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset,
+ IXACTCue** ppCue)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+ FIXME("(%p)->(%u, 0x%x, %u, %p): stub!\n", This, nCueIndex, dwFlags, timeOffset,
+ ppCue);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_Stop(IXACTSoundBank *iface,
+ XACTINDEX nCueIndex, DWORD dwFlags)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+
+ TRACE("(%p)->(%u)\n", This, dwFlags);
+
+ return FACTSoundBank_Stop(This->fact_soundbank, nCueIndex, dwFlags);
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_Destroy(IXACTSoundBank *iface)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+ HRESULT hr;
+
+ TRACE("(%p)\n", This);
+
+ hr = FACTSoundBank_Destroy(This->fact_soundbank);
+ HeapFree(GetProcessHeap(), 0, This);
+ return hr;
+}
+
+static HRESULT WINAPI IXACTSoundBankImpl_GetState(IXACTSoundBank *iface,
+ DWORD *pdwState)
+{
+ XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
+
+ TRACE("(%p)->(%p)\n", This, pdwState);
+
+ return FACTSoundBank_GetState(This->fact_soundbank, pdwState);
+}
+
+static const IXACTSoundBankVtbl XACTSoundBank_Vtbl =
+{
+ IXACTSoundBankImpl_GetCueIndex,
+ IXACTSoundBankImpl_GetNumCues,
+ IXACTSoundBankImpl_GetCueProperties,
+ IXACTSoundBankImpl_Prepare,
+ IXACTSoundBankImpl_Play,
+ IXACTSoundBankImpl_Stop,
+ IXACTSoundBankImpl_Destroy,
+ IXACTSoundBankImpl_GetState
+};
+
typedef struct _XACTEngineImpl {
IXACTEngine IXACTEngine_iface;
@@ -184,7 +290,7 @@ static HRESULT WINAPI IXACTEngineImpl_Initialize(IXACTEngine *iface,
params.globalSettingsBufferSize = pParams->globalSettingsBufferSize;
params.globalSettingsFlags = pParams->globalSettingsFlags;
params.globalSettingsAllocAttributes = pParams->globalSettingsAllocAttributes;
- params.pRendererID = pParams->pRendererID;
+ params.pRendererID = (INT16 *) pParams->pRendererID;
params.pXAudio2 = NULL;
params.pMasteringVoice = NULL;
@@ -234,9 +340,36 @@ static HRESULT WINAPI IXACTEngineImpl_CreateSoundBank(IXACTEngine *iface,
DWORD dwAllocAttributes, IXACTSoundBank **ppSoundBank)
{
XACTEngineImpl *This = impl_from_IXACTEngine(iface);
- FIXME("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ XACTSoundBankImpl *sb;
+ FACTSoundBank *fsb;
+ UINT ret;
+
+ TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p)\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppSoundBank);
- return E_NOTIMPL;
+
+ ret = FACTAudioEngine_CreateSoundBank(This->fact_engine, pvBuffer, dwSize,
+ dwFlags, dwAllocAttributes, &fsb);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateSoundBank: %d\n", ret);
+ return E_FAIL;
+ }
+
+ sb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*sb));
+ if (!sb)
+ {
+ FACTSoundBank_Destroy(fsb);
+ ERR("Failed to allocate XACTSoundBankImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ sb->IXACTSoundBank_iface.lpVtbl = &XACTSoundBank_Vtbl;
+ sb->fact_soundbank = fsb;
+ *ppSoundBank = &sb->IXACTSoundBank_iface;
+
+ TRACE("Created SoundBank: %p\n", sb);
+
+ return S_OK;
}
static HRESULT WINAPI IXACTEngineImpl_CreateInMemoryWaveBank(IXACTEngine *iface,
--
2.28.0

View File

@ -0,0 +1,233 @@
From 3920774c38e83f14cc550de078b7601017099181 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 16:46:31 +0200
Subject: [PATCH 06/23] xactengine2_10: Implement IXACTCue Interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 201 +++++++++++++++++++++++++++++++-
1 file changed, 199 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 98193498e49..c425fe091db 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -32,6 +32,176 @@ WINE_DEFAULT_DEBUG_CHANNEL(xact3);
static HINSTANCE instance;
+typedef struct _XACTCueImpl {
+ IXACTCue IXACTCue_iface;
+ FACTCue *fact_cue;
+} XACTCueImpl;
+
+static inline XACTCueImpl *impl_from_IXACTCue(IXACTCue *iface)
+{
+ return CONTAINING_RECORD(iface, XACTCueImpl, IXACTCue_iface);
+}
+
+static HRESULT WINAPI IXACTCueImpl_Play(IXACTCue *iface)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)\n", iface);
+
+ return FACTCue_Play(This->fact_cue);
+}
+
+static HRESULT WINAPI IXACTCueImpl_Stop(IXACTCue *iface, DWORD dwFlags)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%u)\n", iface, dwFlags);
+
+ return FACTCue_Stop(This->fact_cue, dwFlags);
+}
+
+static HRESULT WINAPI IXACTCueImpl_GetState(IXACTCue *iface, DWORD *pdwState)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%p)\n", iface, pdwState);
+
+ return FACTCue_GetState(This->fact_cue, pdwState);
+}
+
+static HRESULT WINAPI IXACTCueImpl_Destroy(IXACTCue *iface)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ UINT ret;
+
+ TRACE("(%p)\n", iface);
+
+ ret = FACTCue_Destroy(This->fact_cue);
+ if (ret != 0)
+ WARN("FACTCue_Destroy returned %d\n", ret);
+ HeapFree(GetProcessHeap(), 0, This);
+ return S_OK;
+}
+
+static HRESULT WINAPI IXACTCueImpl_GetChannelMap(IXACTCue *iface,
+ LPXACTCHANNELMAP pChannelMap, DWORD BufferSize, LPDWORD pRequiredSize)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ FIXME("(%p)->(%p %d %p): stub!\n", This, pChannelMap, BufferSize, pRequiredSize);
+ return S_OK;
+}
+
+static HRESULT WINAPI IXACTCueImpl_SetChannelMap(IXACTCue *iface,
+ LPXACTCHANNELMAP pChannelMap)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ FIXME("(%p)->(%p): stub!\n", This, pChannelMap);
+ return S_OK;
+}
+
+static HRESULT WINAPI IXACTCueImpl_GetChannelVolume(IXACTCue *iface,
+ LPXACTCHANNELVOLUME pVolume)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ FIXME("(%p)->(%p): stub!\n", This, pVolume);
+ return S_OK;
+}
+
+static HRESULT WINAPI IXACTCueImpl_SetChannelVolume(IXACTCue *iface,
+ LPXACTCHANNELVOLUME pVolume)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ FIXME("(%p)->(%p): stub!\n", This, pVolume);
+ return S_OK;
+}
+
+static HRESULT WINAPI IXACTCueImpl_SetMatrixCoefficients(IXACTCue *iface,
+ UINT32 uSrcChannelCount, UINT32 uDstChannelCount,
+ float *pMatrixCoefficients)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%u, %u, %p)\n", iface, uSrcChannelCount, uDstChannelCount,
+ pMatrixCoefficients);
+
+ return FACTCue_SetMatrixCoefficients(This->fact_cue, uSrcChannelCount,
+ uDstChannelCount, pMatrixCoefficients);
+}
+
+static XACTVARIABLEINDEX WINAPI IXACTCueImpl_GetVariableIndex(IXACTCue *iface,
+ PCSTR szFriendlyName)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%s)\n", iface, szFriendlyName);
+
+ return FACTCue_GetVariableIndex(This->fact_cue, szFriendlyName);
+}
+
+static HRESULT WINAPI IXACTCueImpl_SetVariable(IXACTCue *iface,
+ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE nValue)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%u, %f)\n", iface, nIndex, nValue);
+
+ return FACTCue_SetVariable(This->fact_cue, nIndex, nValue);
+}
+
+static HRESULT WINAPI IXACTCueImpl_GetVariable(IXACTCue *iface,
+ XACTVARIABLEINDEX nIndex, XACTVARIABLEVALUE *nValue)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%u, %p)\n", iface, nIndex, nValue);
+
+ return FACTCue_GetVariable(This->fact_cue, nIndex, nValue);
+}
+
+static HRESULT WINAPI IXACTCueImpl_Pause(IXACTCue *iface, BOOL fPause)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+
+ TRACE("(%p)->(%u)\n", iface, fPause);
+
+ return FACTCue_Pause(This->fact_cue, fPause);
+}
+
+static HRESULT WINAPI IXACTCueImpl_GetProperties(IXACTCue *iface,
+ XACT_CUE_INSTANCE_PROPERTIES **ppProperties)
+{
+ XACTCueImpl *This = impl_from_IXACTCue(iface);
+ FACTCueInstanceProperties *fProps;
+ HRESULT hr;
+
+ TRACE("(%p)->(%p)\n", iface, ppProperties);
+
+ hr = FACTCue_GetProperties(This->fact_cue, &fProps);
+ if(FAILED(hr))
+ return hr;
+
+ *ppProperties = (XACT_CUE_INSTANCE_PROPERTIES*) fProps;
+ return hr;
+}
+
+static const IXACTCueVtbl XACTCue_Vtbl =
+{
+ IXACTCueImpl_Play,
+ IXACTCueImpl_Stop,
+ IXACTCueImpl_GetState,
+ IXACTCueImpl_Destroy,
+ IXACTCueImpl_GetChannelMap,
+ IXACTCueImpl_SetChannelMap,
+ IXACTCueImpl_GetChannelVolume,
+ IXACTCueImpl_SetChannelVolume,
+ IXACTCueImpl_SetMatrixCoefficients,
+ IXACTCueImpl_GetVariableIndex,
+ IXACTCueImpl_SetVariable,
+ IXACTCueImpl_GetVariable,
+ IXACTCueImpl_Pause,
+ IXACTCueImpl_GetProperties
+};
+
typedef struct _XACTSoundBankImpl {
IXACTSoundBank IXACTSoundBank_iface;
@@ -79,9 +249,36 @@ static HRESULT WINAPI IXACTSoundBankImpl_Prepare(IXACTSoundBank *iface,
IXACTCue** ppCue)
{
XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
- FIXME("(%p)->(%u, 0x%x, %u, %p): stub!\n", This, nCueIndex, dwFlags, timeOffset,
+ XACTCueImpl *cue;
+ FACTCue *fcue;
+ UINT ret;
+
+ TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
- return E_NOTIMPL;
+
+ ret = FACTSoundBank_Prepare(This->fact_soundbank, nCueIndex, dwFlags,
+ timeOffset, &fcue);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateCue: %d\n", ret);
+ return E_FAIL;
+ }
+
+ cue = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cue));
+ if (!cue)
+ {
+ FACTCue_Destroy(fcue);
+ ERR("Failed to allocate XACTCueImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ cue->IXACTCue_iface.lpVtbl = &XACTCue_Vtbl;
+ cue->fact_cue = fcue;
+ *ppCue = (IXACTCue*)&cue->IXACTCue_iface;
+
+ TRACE("Created Cue: %p\n", cue);
+
+ return S_OK;
}
static HRESULT WINAPI IXACTSoundBankImpl_Play(IXACTSoundBank *iface,
--
2.28.0

View File

@ -0,0 +1,169 @@
From 5bdc9c6d0eb143392490fcbebc7f25e70e7a7a26 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:05:56 +0200
Subject: [PATCH 07/23] xactengine2_10: Implement IXACTWaveBank interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 137 +++++++++++++++++++++++++++++++-
1 file changed, 135 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index c425fe091db..426e37083d1 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -335,6 +335,112 @@ static const IXACTSoundBankVtbl XACTSoundBank_Vtbl =
IXACTSoundBankImpl_GetState
};
+typedef struct _XACTWaveBankImpl {
+ IXACTWaveBank IXACTWaveBank_iface;
+
+ FACTWaveBank *fact_wavebank;
+} XACTWaveBankImpl;
+
+static inline XACTWaveBankImpl *impl_from_IXACTWaveBank(IXACTWaveBank *iface)
+{
+ return CONTAINING_RECORD(iface, XACTWaveBankImpl, IXACTWaveBank_iface);
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_Destroy(IXACTWaveBank *iface)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+ HRESULT hr;
+
+ TRACE("(%p)\n", This);
+
+ hr = FACTWaveBank_Destroy(This->fact_wavebank);
+ HeapFree(GetProcessHeap(), 0, This);
+ return hr;
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_GetNumWaves(IXACTWaveBank *iface,
+ XACTINDEX *pnNumWaves)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+
+ TRACE("(%p)->(%p)\n", This, pnNumWaves);
+
+ return FACTWaveBank_GetNumWaves(This->fact_wavebank, pnNumWaves);
+}
+
+static XACTINDEX WINAPI IXACTWaveBankImpl_GetWaveIndex(IXACTWaveBank *iface,
+ PCSTR szFriendlyName)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+
+ TRACE("(%p)->(%s)\n", This, szFriendlyName);
+
+ return FACTWaveBank_GetWaveIndex(This->fact_wavebank, szFriendlyName);
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_GetWaveProperties(IXACTWaveBank *iface,
+ XACTINDEX nWaveIndex, XACT_WAVE_PROPERTIES *pWaveProperties)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+
+ TRACE("(%p)->(%u, %p)\n", This, nWaveIndex, pWaveProperties);
+
+ return FACTWaveBank_GetWaveProperties(This->fact_wavebank, nWaveIndex,
+ (FACTWaveProperties*) pWaveProperties);
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_Prepare(IXACTWaveBank *iface,
+ XACTINDEX nWaveIndex, DWORD dwFlags, DWORD dwPlayOffset,
+ XACTLOOPCOUNT nLoopCount, IXACTWave** ppWave)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+ FIXME("(%p)->(0x%x, %u, 0x%x, %u, %p): stub!\n", This, nWaveIndex, dwFlags,
+ dwPlayOffset, nLoopCount, ppWave);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_Play(IXACTWaveBank *iface,
+ XACTINDEX nWaveIndex, DWORD dwFlags, DWORD dwPlayOffset,
+ XACTLOOPCOUNT nLoopCount, IXACTWave** ppWave)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+ FIXME("(%p)->(0x%x, %u, 0x%x, %u, %p): stub!\n", This, nWaveIndex, dwFlags, dwPlayOffset,
+ nLoopCount, ppWave);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_Stop(IXACTWaveBank *iface,
+ XACTINDEX nWaveIndex, DWORD dwFlags)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+
+ TRACE("(%p)->(%u, %u)\n", This, nWaveIndex, dwFlags);
+
+ return FACTWaveBank_Stop(This->fact_wavebank, nWaveIndex, dwFlags);
+}
+
+static HRESULT WINAPI IXACTWaveBankImpl_GetState(IXACTWaveBank *iface,
+ DWORD *pdwState)
+{
+ XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
+
+ TRACE("(%p)->(%p)\n", This, pdwState);
+
+ return FACTWaveBank_GetState(This->fact_wavebank, pdwState);
+}
+
+static const IXACTWaveBankVtbl XACTWaveBank_Vtbl =
+{
+ IXACTWaveBankImpl_Destroy,
+ IXACTWaveBankImpl_GetNumWaves,
+ IXACTWaveBankImpl_GetWaveIndex,
+ IXACTWaveBankImpl_GetWaveProperties,
+ IXACTWaveBankImpl_Prepare,
+ IXACTWaveBankImpl_Play,
+ IXACTWaveBankImpl_Stop,
+ IXACTWaveBankImpl_GetState
+};
+
typedef struct _XACTEngineImpl {
IXACTEngine IXACTEngine_iface;
@@ -574,9 +680,36 @@ static HRESULT WINAPI IXACTEngineImpl_CreateInMemoryWaveBank(IXACTEngine *iface,
DWORD dwAllocAttributes, IXACTWaveBank **ppWaveBank)
{
XACTEngineImpl *This = impl_from_IXACTEngine(iface);
- FIXME("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ XACTWaveBankImpl *wb;
+ FACTWaveBank *fwb;
+ UINT ret;
+
+ TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p)!\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppWaveBank);
- return E_NOTIMPL;
+
+ ret = FACTAudioEngine_CreateInMemoryWaveBank(This->fact_engine, pvBuffer,
+ dwSize, dwFlags, dwAllocAttributes, &fwb);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateWaveBank: %d\n", ret);
+ return E_FAIL;
+ }
+
+ wb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wb));
+ if (!wb)
+ {
+ FACTWaveBank_Destroy(fwb);
+ ERR("Failed to allocate XACTWaveBankImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wb->IXACTWaveBank_iface.lpVtbl = &XACTWaveBank_Vtbl;
+ wb->fact_wavebank = fwb;
+ *ppWaveBank = &wb->IXACTWaveBank_iface;
+
+ TRACE("Created in-memory WaveBank: %p\n", wb);
+
+ return S_OK;
}
static HRESULT WINAPI IXACTEngineImpl_CreateStreamingWaveBank(IXACTEngine *iface,
--
2.28.0

View File

@ -0,0 +1,68 @@
From 9a5dea2f6d073fa9edb1075e1437451cbb28e099 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:10:06 +0200
Subject: [PATCH 08/23] xactengine2_10: Implement
IXACTEngine::CreateStreamingWaveBank.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 43 +++++++++++++++++++++++++++++++--
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 426e37083d1..ec7a97dd5f8 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -717,8 +717,47 @@ static HRESULT WINAPI IXACTEngineImpl_CreateStreamingWaveBank(IXACTEngine *iface
IXACTWaveBank **ppWaveBank)
{
XACTEngineImpl *This = impl_from_IXACTEngine(iface);
- FIXME("(%p)->(%p, %p): stub!\n", This, pParms, ppWaveBank);
- return E_NOTIMPL;
+ FACTStreamingParameters fakeParms;
+ wrap_readfile_struct *fake;
+ XACTWaveBankImpl *wb;
+ FACTWaveBank *fwb;
+ UINT ret;
+
+ TRACE("(%p)->(%p, %p)\n", This, pParms, ppWaveBank);
+
+ /* We have to wrap the file to fix up the callbacks! */
+ fake = (wrap_readfile_struct*) CoTaskMemAlloc(
+ sizeof(wrap_readfile_struct));
+ fake->engine = This;
+ fake->file = pParms->file;
+ fakeParms.file = fake;
+ fakeParms.flags = pParms->flags;
+ fakeParms.offset = pParms->offset;
+ fakeParms.packetSize = pParms->packetSize;
+
+ ret = FACTAudioEngine_CreateStreamingWaveBank(This->fact_engine, &fakeParms,
+ &fwb);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateWaveBank: %d\n", ret);
+ return E_FAIL;
+ }
+
+ wb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wb));
+ if (!wb)
+ {
+ FACTWaveBank_Destroy(fwb);
+ ERR("Failed to allocate XACT3WaveBankImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wb->IXACTWaveBank_iface.lpVtbl = &XACTWaveBank_Vtbl;
+ wb->fact_wavebank = fwb;
+ *ppWaveBank = &wb->IXACTWaveBank_iface;
+
+ TRACE("Created streaming WaveBank: %p\n", wb);
+
+ return S_OK;
}
static HRESULT WINAPI IXACTEngineImpl_PrepareInMemoryWave(IXACTEngine *iface,
--
2.28.0

View File

@ -0,0 +1,186 @@
From 920705457c0ab3e3e4bbe08193b5fef3dfaf92ab Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:20:37 +0200
Subject: [PATCH 09/23] xactengine2_10: Implement IXACTWave interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 147 +++++++++++++++++++++++++++++++-
1 file changed, 144 insertions(+), 3 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index ec7a97dd5f8..793cfc62afb 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -335,6 +335,120 @@ static const IXACTSoundBankVtbl XACTSoundBank_Vtbl =
IXACTSoundBankImpl_GetState
};
+typedef struct _XACTWaveImpl {
+ IXACTWave IXACTWave_iface;
+
+ FACTWave *fact_wave;
+} XACTWaveImpl;
+
+static inline XACTWaveImpl *impl_from_IXACTWave(IXACTWave *iface)
+{
+ return CONTAINING_RECORD(iface, XACTWaveImpl, IXACTWave_iface);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_Destroy(IXACTWave *iface)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+ HRESULT hr;
+
+ TRACE("(%p)\n", This);
+
+ hr = FACTWave_Destroy(This->fact_wave);
+ HeapFree(GetProcessHeap(), 0, This);
+ return hr;
+}
+
+static HRESULT WINAPI IXACTWaveImpl_Play(IXACTWave *iface)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)\n", This);
+
+ return FACTWave_Play(This->fact_wave);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_Stop(IXACTWave *iface, DWORD dwFlags)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(0x%x)\n", This, dwFlags);
+
+ return FACTWave_Stop(This->fact_wave, dwFlags);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_Pause(IXACTWave *iface, BOOL fPause)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%u)\n", This, fPause);
+
+ return FACTWave_Pause(This->fact_wave, fPause);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_GetState(IXACTWave *iface, DWORD *pdwState)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%p)\n", This, pdwState);
+
+ return FACTWave_GetState(This->fact_wave, pdwState);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_SetPitch(IXACTWave *iface, XACTPITCH pitch)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%d)\n", This, pitch);
+
+ return FACTWave_SetPitch(This->fact_wave, pitch);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_SetVolume(IXACTWave *iface, XACTVOLUME volume)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%f)\n", This, volume);
+
+ return FACTWave_SetVolume(This->fact_wave, volume);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_SetMatrixCoefficients(IXACTWave *iface,
+ UINT32 uSrcChannelCount, UINT32 uDstChannelCount,
+ float *pMatrixCoefficients)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%u, %u, %p)\n", This, uSrcChannelCount, uDstChannelCount,
+ pMatrixCoefficients);
+
+ return FACTWave_SetMatrixCoefficients(This->fact_wave, uSrcChannelCount,
+ uDstChannelCount, pMatrixCoefficients);
+}
+
+static HRESULT WINAPI IXACTWaveImpl_GetProperties(IXACTWave *iface,
+ XACT_WAVE_INSTANCE_PROPERTIES *pProperties)
+{
+ XACTWaveImpl *This = impl_from_IXACTWave(iface);
+
+ TRACE("(%p)->(%p)\n", This, pProperties);
+
+ return FACTWave_GetProperties(This->fact_wave,
+ (FACTWaveInstanceProperties*) pProperties);
+}
+
+static const IXACTWaveVtbl XACTWave_Vtbl =
+{
+ IXACTWaveImpl_Destroy,
+ IXACTWaveImpl_Play,
+ IXACTWaveImpl_Stop,
+ IXACTWaveImpl_Pause,
+ IXACTWaveImpl_GetState,
+ IXACTWaveImpl_SetPitch,
+ IXACTWaveImpl_SetVolume,
+ IXACTWaveImpl_SetMatrixCoefficients,
+ IXACTWaveImpl_GetProperties
+};
+
typedef struct _XACTWaveBankImpl {
IXACTWaveBank IXACTWaveBank_iface;
@@ -394,9 +508,36 @@ static HRESULT WINAPI IXACTWaveBankImpl_Prepare(IXACTWaveBank *iface,
XACTLOOPCOUNT nLoopCount, IXACTWave** ppWave)
{
XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
- FIXME("(%p)->(0x%x, %u, 0x%x, %u, %p): stub!\n", This, nWaveIndex, dwFlags,
+ XACTWaveImpl *wave;
+ FACTWave *fwave;
+ UINT ret;
+
+ TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)\n", This, nWaveIndex, dwFlags,
dwPlayOffset, nLoopCount, ppWave);
- return E_NOTIMPL;
+
+ ret = FACTWaveBank_Prepare(This->fact_wavebank, nWaveIndex, dwFlags,
+ dwPlayOffset, nLoopCount, &fwave);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateWave: %d\n", ret);
+ return E_FAIL;
+ }
+
+ wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
+ if (!wave)
+ {
+ FACTWave_Destroy(fwave);
+ ERR("Failed to allocate XACTWaveImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wave->IXACTWave_iface.lpVtbl = &XACTWave_Vtbl;
+ wave->fact_wave = fwave;
+ *ppWave = &wave->IXACTWave_iface;
+
+ TRACE("Created Wave: %p\n", wave);
+
+ return S_OK;
}
static HRESULT WINAPI IXACTWaveBankImpl_Play(IXACTWaveBank *iface,
@@ -747,7 +888,7 @@ static HRESULT WINAPI IXACTEngineImpl_CreateStreamingWaveBank(IXACTEngine *iface
if (!wb)
{
FACTWaveBank_Destroy(fwb);
- ERR("Failed to allocate XACT3WaveBankImpl!");
+ ERR("Failed to allocate XACTWaveBankImpl!");
return E_OUTOFMEMORY;
}
--
2.28.0

View File

@ -0,0 +1,65 @@
From 4b7491ba661e9e787926feebf461412bf31f3aa4 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:28:01 +0200
Subject: [PATCH 10/23] xactengine2_10: Implement IXACTSoundBank::Play
function.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 39 +++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 793cfc62afb..7bb8134fd81 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -286,9 +286,44 @@ static HRESULT WINAPI IXACTSoundBankImpl_Play(IXACTSoundBank *iface,
IXACTCue** ppCue)
{
XACTSoundBankImpl *This = impl_from_IXACTSoundBank(iface);
- FIXME("(%p)->(%u, 0x%x, %u, %p): stub!\n", This, nCueIndex, dwFlags, timeOffset,
+ XACTCueImpl *cue;
+ FACTCue *fcue;
+ UINT ret;
+
+ TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
- return E_NOTIMPL;
+
+ /* If the application doesn't want a handle, don't generate one at all.
+ * Let the engine handle that memory instead.
+ * -flibit
+ */
+ if (ppCue == NULL){
+ ret = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags,
+ timeOffset, NULL);
+ }else{
+ ret = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags,
+ timeOffset, &fcue);
+ if(ret != 0)
+ goto done;
+
+ cue = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cue));
+ if (!cue)
+ {
+ FACTCue_Destroy(fcue);
+ ERR("Failed to allocate XACTCueImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ cue->IXACTCue_iface.lpVtbl = &XACTCue_Vtbl;
+ cue->fact_cue = fcue;
+ *ppCue = (IXACTCue*)&cue->IXACTCue_iface;
+ }
+
+done:
+ if(ret != 0)
+ WARN("FACTSoundBank_Play returned %d\n", ret);
+
+ return !ret ? S_OK : E_FAIL;
}
static HRESULT WINAPI IXACTSoundBankImpl_Stop(IXACTSoundBank *iface,
--
2.28.0

View File

@ -0,0 +1,60 @@
From 5df655b72d55c2c4071fd7b84d2705f922bcc1a8 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:31:59 +0200
Subject: [PATCH 11/23] xactengine2_10: Implement IXACTWaveBank::Play function.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 35 +++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 7bb8134fd81..2e06341b5e9 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -580,9 +580,40 @@ static HRESULT WINAPI IXACTWaveBankImpl_Play(IXACTWaveBank *iface,
XACTLOOPCOUNT nLoopCount, IXACTWave** ppWave)
{
XACTWaveBankImpl *This = impl_from_IXACTWaveBank(iface);
- FIXME("(%p)->(0x%x, %u, 0x%x, %u, %p): stub!\n", This, nWaveIndex, dwFlags, dwPlayOffset,
+ XACTWaveImpl *wave;
+ FACTWave *fwave;
+ HRESULT hr;
+
+ TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)!\n", This, nWaveIndex, dwFlags, dwPlayOffset,
nLoopCount, ppWave);
- return E_NOTIMPL;
+
+ /* If the application doesn't want a handle, don't generate one at all.
+ * Let the engine handle that memory instead.
+ * -flibit
+ */
+ if (ppWave == NULL){
+ hr = FACTWaveBank_Play(This->fact_wavebank, nWaveIndex, dwFlags,
+ dwPlayOffset, nLoopCount, NULL);
+ }else{
+ hr = FACTWaveBank_Play(This->fact_wavebank, nWaveIndex, dwFlags,
+ dwPlayOffset, nLoopCount, &fwave);
+ if(FAILED(hr))
+ return hr;
+
+ wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
+ if (!wave)
+ {
+ FACTWave_Destroy(fwave);
+ ERR("Failed to allocate XACT3WaveImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wave->IXACTWave_iface.lpVtbl = &XACTWave_Vtbl;
+ wave->fact_wave = fwave;
+ *ppWave = &wave->IXACTWave_iface;
+ }
+
+ return hr;
}
static HRESULT WINAPI IXACTWaveBankImpl_Stop(IXACTWaveBank *iface,
--
2.28.0

View File

@ -0,0 +1,149 @@
From 7b7912c5dbd542e87ffc2bc78c0388ef8ad6a219 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 17:39:44 +0200
Subject: [PATCH 12/23] xactengine2_10: Implement
IXACTEngine::(Un)RegisterNotification function(s).
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
dlls/xactengine2_10/xact2_dll.c | 107 ++++++++++++++++++++++++++++++--
1 file changed, 102 insertions(+), 5 deletions(-)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index 2e06341b5e9..aada1cf53e9 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -604,7 +604,7 @@ static HRESULT WINAPI IXACTWaveBankImpl_Play(IXACTWaveBank *iface,
if (!wave)
{
FACTWave_Destroy(fwave);
- ERR("Failed to allocate XACT3WaveImpl!");
+ ERR("Failed to allocate XACTWaveImpl!");
return E_OUTOFMEMORY;
}
@@ -998,20 +998,117 @@ static HRESULT WINAPI IXACTEngineImpl_PrepareWave(IXACTEngine *iface,
return E_NOTIMPL;
}
+enum {
+ NOTIFY_SoundBank = 0x01,
+ NOTIFY_WaveBank = 0x02,
+ NOTIFY_Cue = 0x04,
+ NOTIFY_Wave = 0x08,
+ NOTIFY_cueIndex = 0x10,
+ NOTIFY_waveIndex = 0x20
+};
+
+static inline void unwrap_notificationdesc(FACTNotificationDescription *fd,
+ const XACT_NOTIFICATION_DESCRIPTION *xd)
+{
+ DWORD flags = 0;
+
+ TRACE("Type %d\n", xd->type);
+
+ memset(fd, 0, sizeof(*fd));
+
+ /* Supports SoundBank, Cue index, Cue instance */
+ if (xd->type == XACTNOTIFICATIONTYPE_CUEPREPARED || xd->type == XACTNOTIFICATIONTYPE_CUEPLAY ||
+ xd->type == XACTNOTIFICATIONTYPE_CUESTOP || xd->type == XACTNOTIFICATIONTYPE_CUEDESTROYED ||
+ xd->type == XACTNOTIFICATIONTYPE_MARKER || xd->type == XACTNOTIFICATIONTYPE_LOCALVARIABLECHANGED)
+ {
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue;
+ }
+ /* Supports WaveBank */
+ else if (xd->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED || xd->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED ||
+ xd->type == XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT)
+ {
+ flags = NOTIFY_WaveBank;
+ }
+ /* Supports NOTIFY_SoundBank */
+ else if (xd->type == XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED)
+ {
+ flags = NOTIFY_SoundBank;
+ }
+ /* Supports WaveBank, Wave index, Wave instance */
+ else if (xd->type == XACTNOTIFICATIONTYPE_WAVEPREPARED || xd->type == XACTNOTIFICATIONTYPE_WAVEDESTROYED)
+ {
+ flags = NOTIFY_WaveBank | NOTIFY_waveIndex | NOTIFY_Wave;
+ }
+ /* Supports SoundBank, SoundBank, Cue index, Cue instance, WaveBank, Wave instance */
+ else if (xd->type == XACTNOTIFICATIONTYPE_WAVEPLAY || xd->type == XACTNOTIFICATIONTYPE_WAVESTOP ||
+ xd->type == XACTNOTIFICATIONTYPE_WAVELOOPED)
+ {
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue | NOTIFY_WaveBank | NOTIFY_Wave;
+ }
+
+ /* We have to unwrap the FACT object first! */
+ fd->type = xd->type;
+ fd->flags = xd->flags;
+ fd->pvContext = xd->pvContext;
+ if (flags & NOTIFY_cueIndex)
+ fd->cueIndex = xd->cueIndex;
+ if (flags & NOTIFY_waveIndex)
+ fd->waveIndex = xd->waveIndex;
+
+ if (flags & NOTIFY_Cue && xd->pCue != NULL)
+ {
+ XACTCueImpl *cue = impl_from_IXACTCue(xd->pCue);
+ if (cue)
+ fd->pCue = cue->fact_cue;
+ }
+
+ if (flags & NOTIFY_SoundBank && xd->pSoundBank != NULL)
+ {
+ XACTSoundBankImpl *sound = impl_from_IXACTSoundBank(xd->pSoundBank);
+ if (sound)
+ fd->pSoundBank = sound->fact_soundbank;
+ }
+
+ if (flags & NOTIFY_WaveBank && xd->pWaveBank != NULL)
+ {
+ XACTWaveBankImpl *bank = impl_from_IXACTWaveBank(xd->pWaveBank);
+ if (bank)
+ fd->pWaveBank = bank->fact_wavebank;
+ }
+
+ if (flags & NOTIFY_Wave && xd->pWave != NULL)
+ {
+ XACTWaveImpl *wave = impl_from_IXACTWave(xd->pWave);
+ if (wave)
+ fd->pWave = wave->fact_wave;
+ }
+}
+
static HRESULT WINAPI IXACTEngineImpl_RegisterNotification(IXACTEngine *iface,
const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc)
{
XACTEngineImpl *This = impl_from_IXACTEngine(iface);
- FIXME("(%p)->(%p): stub!\n", This, pNotificationDesc);
- return E_NOTIMPL;
+ FACTNotificationDescription fdesc;
+
+ TRACE("(%p)->(%p)\n", This, pNotificationDesc);
+
+ unwrap_notificationdesc(&fdesc, pNotificationDesc);
+ fdesc.pvContext = This;
+ return FACTAudioEngine_RegisterNotification(This->fact_engine, &fdesc);
}
static HRESULT WINAPI IXACTEngineImpl_UnRegisterNotification(IXACTEngine *iface,
const XACT_NOTIFICATION_DESCRIPTION *pNotificationDesc)
{
XACTEngineImpl *This = impl_from_IXACTEngine(iface);
- FIXME("(%p)->(%p): stub!\n", This, pNotificationDesc);
- return E_NOTIMPL;
+ FACTNotificationDescription fdesc;
+
+ TRACE("(%p)->(%p)\n", This, pNotificationDesc);
+
+ unwrap_notificationdesc(&fdesc, pNotificationDesc);
+ fdesc.pvContext = This;
+ return FACTAudioEngine_UnRegisterNotification(This->fact_engine, &fdesc);
+
}
static XACTCATEGORY WINAPI IXACTEngineImpl_GetCategory(IXACTEngine *iface,
--
2.28.0

View File

@ -0,0 +1,80 @@
From 71d01ed40a2165b55f1df91971ed9a929fbad1c7 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 18:00:15 +0200
Subject: [PATCH 13/23] xactengine2_9: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 ++++
dlls/xactengine2_9/Makefile.in | 11 +++++++++++
dlls/xactengine2_9/xactengine2_9.spec | 4 ++++
4 files changed, 21 insertions(+)
create mode 100644 dlls/xactengine2_9/Makefile.in
create mode 100644 dlls/xactengine2_9/xactengine2_9.spec
diff --git a/configure.ac b/configure.ac
index bcbeb230ed2..348a1ea38c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_9=${enable_xactengine2_9:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
enable_xactengine3_2=${enable_xactengine3_2:-no}
@@ -3985,6 +3986,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_9)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_1)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_2)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 1a248327bb7..83926c92a0e 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,6 +22,10 @@
[
threading(both),
+#if XACT3_VER == 0x0209
+ uuid(343e68e6-8f82-4a8d-a2da-6e9a944b378c)
+#else /* XACT3_VER == 0x0209 or not defined */
uuid(65d822a4-4799-42c6-9b18-d26cf66dd320)
+#endif
]
coclass XACTEngine {}
diff --git a/dlls/xactengine2_9/Makefile.in b/dlls/xactengine2_9/Makefile.in
new file mode 100644
index 00000000000..c2351aa4f4c
--- /dev/null
+++ b/dlls/xactengine2_9/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_9.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0209
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_9/xactengine2_9.spec b/dlls/xactengine2_9/xactengine2_9.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_9/xactengine2_9.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From e0238ca892f10da17ef6ac6b02bcc3bddc29fd9d Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 18:10:31 +0200
Subject: [PATCH 14/23] xactengine2_8: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_8/Makefile.in | 11 +++++++++++
dlls/xactengine2_8/xactengine2_8.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_8/Makefile.in
create mode 100644 dlls/xactengine2_8/xactengine2_8.spec
diff --git a/configure.ac b/configure.ac
index 348a1ea38c0..5a99a6edf23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_8=${enable_xactengine2_8:-no}
enable_xactengine2_9=${enable_xactengine2_9:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
@@ -3986,6 +3987,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_8)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_9)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_1)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 83926c92a0e..6a228c82db6 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0209
+#if XACT3_VER == 0x0208
+ uuid(77c56bf4-18a1-42b0-88af-5072ce814949)
+#elif XACT3_VER == 0x0209
uuid(343e68e6-8f82-4a8d-a2da-6e9a944b378c)
#else /* XACT3_VER == 0x0209 or not defined */
uuid(65d822a4-4799-42c6-9b18-d26cf66dd320)
diff --git a/dlls/xactengine2_8/Makefile.in b/dlls/xactengine2_8/Makefile.in
new file mode 100644
index 00000000000..b88b39ce1ea
--- /dev/null
+++ b/dlls/xactengine2_8/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_8.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0208
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_8/xactengine2_8.spec b/dlls/xactengine2_8/xactengine2_8.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_8/xactengine2_8.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From 413a72c90f723cf6481ca2913ad3be1dea4c71ce Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 18:47:07 +0200
Subject: [PATCH 15/23] xactengine2_7: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_7/Makefile.in | 11 +++++++++++
dlls/xactengine2_7/xactengine2_7.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_7/Makefile.in
create mode 100644 dlls/xactengine2_7/xactengine2_7.spec
diff --git a/configure.ac b/configure.ac
index 5a99a6edf23..947fbb172cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_7=${enable_xactengine2_7:-no}
enable_xactengine2_8=${enable_xactengine2_8:-no}
enable_xactengine2_9=${enable_xactengine2_9:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
@@ -3987,6 +3988,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_8)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_9)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_0)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 6a228c82db6..8cb332d109a 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0208
+#if XACT3_VER == 0x0207
+ uuid(cd0d66ec-8057-43f5-acbd-66dfb36fd78c)
+#elif XACT3_VER == 0x0208
uuid(77c56bf4-18a1-42b0-88af-5072ce814949)
#elif XACT3_VER == 0x0209
uuid(343e68e6-8f82-4a8d-a2da-6e9a944b378c)
diff --git a/dlls/xactengine2_7/Makefile.in b/dlls/xactengine2_7/Makefile.in
new file mode 100644
index 00000000000..d2253a49590
--- /dev/null
+++ b/dlls/xactengine2_7/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_7.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0207
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_7/xactengine2_7.spec b/dlls/xactengine2_7/xactengine2_7.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_7/xactengine2_7.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From af5093be0c67e98e0ef7ca3ddd91d75c4bda4d15 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 18:52:57 +0200
Subject: [PATCH 16/23] xactengine2_6: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_6/Makefile.in | 11 +++++++++++
dlls/xactengine2_6/xactengine2_6.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_6/Makefile.in
create mode 100644 dlls/xactengine2_6/xactengine2_6.spec
diff --git a/configure.ac b/configure.ac
index 947fbb172cd..dd31238b745 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_6=${enable_xactengine2_6:-no}
enable_xactengine2_7=${enable_xactengine2_7:-no}
enable_xactengine2_8=${enable_xactengine2_8:-no}
enable_xactengine2_9=${enable_xactengine2_9:-no}
@@ -3988,6 +3989,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_6)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_8)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_9)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 8cb332d109a..a9208c0139c 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0207
+#if XACT3_VER == 0x0206
+ uuid(3a2495ce-31d0-435b-8ccf-e9f0843fd960)
+#elif XACT3_VER == 0x0207
uuid(cd0d66ec-8057-43f5-acbd-66dfb36fd78c)
#elif XACT3_VER == 0x0208
uuid(77c56bf4-18a1-42b0-88af-5072ce814949)
diff --git a/dlls/xactengine2_6/Makefile.in b/dlls/xactengine2_6/Makefile.in
new file mode 100644
index 00000000000..bfac72a3434
--- /dev/null
+++ b/dlls/xactengine2_6/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_6.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0206
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_6/xactengine2_6.spec b/dlls/xactengine2_6/xactengine2_6.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_6/xactengine2_6.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From 81e8492948bb95e295e461011f0fc7e7c0382481 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 18:56:11 +0200
Subject: [PATCH 17/23] xactengine2_5: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_5/Makefile.in | 11 +++++++++++
dlls/xactengine2_5/xactengine2_5.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_5/Makefile.in
create mode 100644 dlls/xactengine2_5/xactengine2_5.spec
diff --git a/configure.ac b/configure.ac
index dd31238b745..5e2abdb0163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_5=${enable_xactengine2_5:-no}
enable_xactengine2_6=${enable_xactengine2_6:-no}
enable_xactengine2_7=${enable_xactengine2_7:-no}
enable_xactengine2_8=${enable_xactengine2_8:-no}
@@ -3989,6 +3990,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_5)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_6)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_8)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index a9208c0139c..6801c854031 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0206
+#if XACT3_VER == 0x0205
+ uuid(54b68bc7-3a45-416b-a8c9-19bf19ec1df5)
+#elif XACT3_VER == 0x0206
uuid(3a2495ce-31d0-435b-8ccf-e9f0843fd960)
#elif XACT3_VER == 0x0207
uuid(cd0d66ec-8057-43f5-acbd-66dfb36fd78c)
diff --git a/dlls/xactengine2_5/Makefile.in b/dlls/xactengine2_5/Makefile.in
new file mode 100644
index 00000000000..0049d30039d
--- /dev/null
+++ b/dlls/xactengine2_5/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_5.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0205
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_5/xactengine2_5.spec b/dlls/xactengine2_5/xactengine2_5.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_5/xactengine2_5.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,241 @@
From 27775b21b4bc2b68e75cb9f3e631b10d2621baff Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 20:11:52 +0200
Subject: [PATCH 18/23] xactengine2_4: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_10/xact2_dll.c | 24 ++++++++++++++++++++++++
dlls/xactengine2_4/Makefile.in | 11 +++++++++++
dlls/xactengine2_4/xactengine2_4.spec | 4 ++++
5 files changed, 44 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_4/Makefile.in
create mode 100644 dlls/xactengine2_4/xactengine2_4.spec
diff --git a/configure.ac b/configure.ac
index 5e2abdb0163..789b1d96e72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_4=${enable_xactengine2_4:-no}
enable_xactengine2_5=${enable_xactengine2_5:-no}
enable_xactengine2_6=${enable_xactengine2_6:-no}
enable_xactengine2_7=${enable_xactengine2_7:-no}
@@ -3990,6 +3991,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_4)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_5)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_6)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_7)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 6801c854031..8728ea5c873 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0205
+#if XACT3_VER == 0x0204
+ uuid(bc3e0fc6-2e0d-4c45-bc61-d9c328319bd8)
+#elif XACT3_VER == 0x0205
uuid(54b68bc7-3a45-416b-a8c9-19bf19ec1df5)
#elif XACT3_VER == 0x0206
uuid(3a2495ce-31d0-435b-8ccf-e9f0843fd960)
diff --git a/dlls/xactengine2_10/xact2_dll.c b/dlls/xactengine2_10/xact2_dll.c
index aada1cf53e9..be83e0d5b96 100644
--- a/dlls/xactengine2_10/xact2_dll.c
+++ b/dlls/xactengine2_10/xact2_dll.c
@@ -167,6 +167,7 @@ static HRESULT WINAPI IXACTCueImpl_Pause(IXACTCue *iface, BOOL fPause)
return FACTCue_Pause(This->fact_cue, fPause);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTCueImpl_GetProperties(IXACTCue *iface,
XACT_CUE_INSTANCE_PROPERTIES **ppProperties)
{
@@ -183,6 +184,7 @@ static HRESULT WINAPI IXACTCueImpl_GetProperties(IXACTCue *iface,
*ppProperties = (XACT_CUE_INSTANCE_PROPERTIES*) fProps;
return hr;
}
+#endif
static const IXACTCueVtbl XACTCue_Vtbl =
{
@@ -198,8 +200,12 @@ static const IXACTCueVtbl XACTCue_Vtbl =
IXACTCueImpl_GetVariableIndex,
IXACTCueImpl_SetVariable,
IXACTCueImpl_GetVariable,
+#if XACT3_VER >= 0x0205
IXACTCueImpl_Pause,
IXACTCueImpl_GetProperties
+#else
+ IXACTCueImpl_Pause
+#endif
};
typedef struct _XACTSoundBankImpl {
@@ -223,6 +229,7 @@ static XACTINDEX WINAPI IXACTSoundBankImpl_GetCueIndex(IXACTSoundBank *iface,
return FACTSoundBank_GetCueIndex(This->fact_soundbank, szFriendlyName);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTSoundBankImpl_GetNumCues(IXACTSoundBank *iface,
XACTINDEX *pnNumCues)
{
@@ -243,6 +250,7 @@ static HRESULT WINAPI IXACTSoundBankImpl_GetCueProperties(IXACTSoundBank *iface,
return FACTSoundBank_GetCueProperties(This->fact_soundbank, nCueIndex,
(FACTCueProperties*) pProperties);
}
+#endif
static HRESULT WINAPI IXACTSoundBankImpl_Prepare(IXACTSoundBank *iface,
XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset,
@@ -361,8 +369,10 @@ static HRESULT WINAPI IXACTSoundBankImpl_GetState(IXACTSoundBank *iface,
static const IXACTSoundBankVtbl XACTSoundBank_Vtbl =
{
IXACTSoundBankImpl_GetCueIndex,
+#if XACT3_VER >= 0x0205
IXACTSoundBankImpl_GetNumCues,
IXACTSoundBankImpl_GetCueProperties,
+#endif
IXACTSoundBankImpl_Prepare,
IXACTSoundBankImpl_Play,
IXACTSoundBankImpl_Stop,
@@ -381,6 +391,7 @@ static inline XACTWaveImpl *impl_from_IXACTWave(IXACTWave *iface)
return CONTAINING_RECORD(iface, XACTWaveImpl, IXACTWave_iface);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTWaveImpl_Destroy(IXACTWave *iface)
{
XACTWaveImpl *This = impl_from_IXACTWave(iface);
@@ -483,6 +494,7 @@ static const IXACTWaveVtbl XACTWave_Vtbl =
IXACTWaveImpl_SetMatrixCoefficients,
IXACTWaveImpl_GetProperties
};
+#endif
typedef struct _XACTWaveBankImpl {
IXACTWaveBank IXACTWaveBank_iface;
@@ -507,6 +519,7 @@ static HRESULT WINAPI IXACTWaveBankImpl_Destroy(IXACTWaveBank *iface)
return hr;
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTWaveBankImpl_GetNumWaves(IXACTWaveBank *iface,
XACTINDEX *pnNumWaves)
{
@@ -625,6 +638,7 @@ static HRESULT WINAPI IXACTWaveBankImpl_Stop(IXACTWaveBank *iface,
return FACTWaveBank_Stop(This->fact_wavebank, nWaveIndex, dwFlags);
}
+#endif
static HRESULT WINAPI IXACTWaveBankImpl_GetState(IXACTWaveBank *iface,
DWORD *pdwState)
@@ -639,12 +653,14 @@ static HRESULT WINAPI IXACTWaveBankImpl_GetState(IXACTWaveBank *iface,
static const IXACTWaveBankVtbl XACTWaveBank_Vtbl =
{
IXACTWaveBankImpl_Destroy,
+#if XACT3_VER >= 0x0205
IXACTWaveBankImpl_GetNumWaves,
IXACTWaveBankImpl_GetWaveIndex,
IXACTWaveBankImpl_GetWaveProperties,
IXACTWaveBankImpl_Prepare,
IXACTWaveBankImpl_Play,
IXACTWaveBankImpl_Stop,
+#endif
IXACTWaveBankImpl_GetState
};
@@ -756,6 +772,7 @@ static HRESULT WINAPI IXACTEngineImpl_GetRendererDetails(IXACTEngine *iface,
nRendererIndex, (FACTRendererDetails*) pRendererDetails);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTEngineImpl_GetFinalMixFormat(IXACTEngine *iface,
WAVEFORMATEXTENSIBLE *pFinalMixFormat)
{
@@ -766,6 +783,7 @@ static HRESULT WINAPI IXACTEngineImpl_GetFinalMixFormat(IXACTEngine *iface,
return FACTAudioEngine_GetFinalMixFormat(This->fact_engine,
(FAudioWaveFormatExtensible*) pFinalMixFormat);
}
+#endif
static void FACTCALL fact_notification_cb(const FACTNotification *notification)
{
@@ -967,6 +985,7 @@ static HRESULT WINAPI IXACTEngineImpl_CreateStreamingWaveBank(IXACTEngine *iface
return S_OK;
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACTEngineImpl_PrepareInMemoryWave(IXACTEngine *iface,
DWORD dwFlags, WAVEBANKENTRY entry, DWORD *pdwSeekTable,
BYTE *pbWaveData, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount,
@@ -997,6 +1016,7 @@ static HRESULT WINAPI IXACTEngineImpl_PrepareWave(IXACTEngine *iface,
FIXME("(%p): stub!\n", This);
return E_NOTIMPL;
}
+#endif
enum {
NOTIFY_SoundBank = 0x01,
@@ -1189,16 +1209,20 @@ static const IXACTEngineVtbl XACTEngine_Vtbl =
IXACTEngineImpl_Release,
IXACTEngineImpl_GetRendererCount,
IXACTEngineImpl_GetRendererDetails,
+#if XACT3_VER >= 0x0205
IXACTEngineImpl_GetFinalMixFormat,
+#endif
IXACTEngineImpl_Initialize,
IXACTEngineImpl_ShutDown,
IXACTEngineImpl_DoWork,
IXACTEngineImpl_CreateSoundBank,
IXACTEngineImpl_CreateInMemoryWaveBank,
IXACTEngineImpl_CreateStreamingWaveBank,
+#if XACT3_VER >= 0x0205
IXACTEngineImpl_PrepareWave,
IXACTEngineImpl_PrepareInMemoryWave,
IXACTEngineImpl_PrepareStreamingWave,
+#endif
IXACTEngineImpl_RegisterNotification,
IXACTEngineImpl_UnRegisterNotification,
IXACTEngineImpl_GetCategory,
diff --git a/dlls/xactengine2_4/Makefile.in b/dlls/xactengine2_4/Makefile.in
new file mode 100644
index 00000000000..ff25486fea5
--- /dev/null
+++ b/dlls/xactengine2_4/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_4.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0204
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_4/xactengine2_4.spec b/dlls/xactengine2_4/xactengine2_4.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_4/xactengine2_4.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From 14b0d63034c1fa95d89dc823de6a966aa3a6737d Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 20:17:19 +0200
Subject: [PATCH 19/23] xactengine2_3: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_3/Makefile.in | 11 +++++++++++
dlls/xactengine2_3/xactengine2_3.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_3/Makefile.in
create mode 100644 dlls/xactengine2_3/xactengine2_3.spec
diff --git a/configure.ac b/configure.ac
index 789b1d96e72..561236e4b8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_3=${enable_xactengine2_3:-no}
enable_xactengine2_4=${enable_xactengine2_4:-no}
enable_xactengine2_5=${enable_xactengine2_5:-no}
enable_xactengine2_6=${enable_xactengine2_6:-no}
@@ -3991,6 +3992,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_3)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_4)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_5)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_6)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 8728ea5c873..3339b1ce1a7 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0204
+#if XACT3_VER == 0x0203
+ uuid(1138472b-d187-44e9-81f2-ae1b0e7785f1)
+#elif XACT3_VER == 0x0204
uuid(bc3e0fc6-2e0d-4c45-bc61-d9c328319bd8)
#elif XACT3_VER == 0x0205
uuid(54b68bc7-3a45-416b-a8c9-19bf19ec1df5)
diff --git a/dlls/xactengine2_3/Makefile.in b/dlls/xactengine2_3/Makefile.in
new file mode 100644
index 00000000000..23a27403ef6
--- /dev/null
+++ b/dlls/xactengine2_3/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_3.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0203
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_3/xactengine2_3.spec b/dlls/xactengine2_3/xactengine2_3.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_3/xactengine2_3.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From c88e79b3ff8cceb7a241ed16dafe93adf972a6d7 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 20:22:19 +0200
Subject: [PATCH 20/23] xactengine2_2: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
dlls/xactengine2_2/Makefile.in | 11 +++++++++++
dlls/xactengine2_2/xactengine2_2.spec | 4 ++++
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_2/Makefile.in
create mode 100644 dlls/xactengine2_2/xactengine2_2.spec
diff --git a/configure.ac b/configure.ac
index 561236e4b8d..6f22173a2a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1987,6 +1987,7 @@ then
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
+ enable_xactengine2_2=${enable_xactengine2_2:-no}
enable_xactengine2_3=${enable_xactengine2_3:-no}
enable_xactengine2_4=${enable_xactengine2_4:-no}
enable_xactengine2_5=${enable_xactengine2_5:-no}
@@ -3992,6 +3993,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_2)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_3)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_4)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_5)
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index 3339b1ce1a7..cd23b8de4f2 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0203
+#if XACT3_VER == 0x0202
+ uuid(c60fae90-4183-4a3f-b2f7-ac1dc49b0e5c)
+#elif XACT3_VER == 0x0203
uuid(1138472b-d187-44e9-81f2-ae1b0e7785f1)
#elif XACT3_VER == 0x0204
uuid(bc3e0fc6-2e0d-4c45-bc61-d9c328319bd8)
diff --git a/dlls/xactengine2_2/Makefile.in b/dlls/xactengine2_2/Makefile.in
new file mode 100644
index 00000000000..0fa959d7b76
--- /dev/null
+++ b/dlls/xactengine2_2/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_2.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0202
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_2/xactengine2_2.spec b/dlls/xactengine2_2/xactengine2_2.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_2/xactengine2_2.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
--
2.28.0

View File

@ -0,0 +1,80 @@
From 2e261eb2409161402f42eb97690b8b44e593259f Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 20:27:16 +0200
Subject: [PATCH 21/23] xactengine2_1: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_1/Makefile.in | 11 +++++++++++
dlls/xactengine2_1/xactengine2_1.spec | 4 ++++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_1/Makefile.in
create mode 100644 dlls/xactengine2_1/xactengine2_1.spec
diff --git a/configure.ac b/configure.ac
index 6f22173a2a8..4f974ff753b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1986,6 +1986,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_1=${enable_xactengine2_1:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
enable_xactengine2_2=${enable_xactengine2_2:-no}
enable_xactengine2_3=${enable_xactengine2_3:-no}
@@ -3992,6 +3993,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_4)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_1)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_2)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_3)
diff --git a/dlls/xactengine2_1/Makefile.in b/dlls/xactengine2_1/Makefile.in
new file mode 100644
index 00000000000..8e2c959324e
--- /dev/null
+++ b/dlls/xactengine2_1/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_1.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0201
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_1/xactengine2_1.spec b/dlls/xactengine2_1/xactengine2_1.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_1/xactengine2_1.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index cd23b8de4f2..ed88c21c8f2 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0202
+#if XACT3_VER == 0x0201
+ uuid(1f1b577e-5e5a-4e8a-ba73-c657ea8e8598)
+#elif XACT3_VER == 0x0202
uuid(c60fae90-4183-4a3f-b2f7-ac1dc49b0e5c)
#elif XACT3_VER == 0x0203
uuid(1138472b-d187-44e9-81f2-ae1b0e7785f1)
--
2.28.0

View File

@ -0,0 +1,80 @@
From e8468eb77c90716bc165c2456885bfa65bf40611 Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Fri, 18 Sep 2020 20:31:18 +0200
Subject: [PATCH 22/23] xactengine2_0: New Dll.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
configure.ac | 2 ++
dlls/xactengine2_0/Makefile.in | 11 +++++++++++
dlls/xactengine2_0/xactengine2_0.spec | 4 ++++
dlls/xactengine2_10/xact2_classes.idl | 4 +++-
4 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 dlls/xactengine2_0/Makefile.in
create mode 100644 dlls/xactengine2_0/xactengine2_0.spec
diff --git a/configure.ac b/configure.ac
index 4f974ff753b..cf29add40e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1986,6 +1986,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_0=${enable_xactengine2_0:-no}
enable_xactengine2_1=${enable_xactengine2_1:-no}
enable_xactengine2_10=${enable_xactengine2_10:-no}
enable_xactengine2_2=${enable_xactengine2_2:-no}
@@ -3993,6 +3994,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_4)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_1)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_10)
WINE_CONFIG_MAKEFILE(dlls/xactengine2_2)
diff --git a/dlls/xactengine2_0/Makefile.in b/dlls/xactengine2_0/Makefile.in
new file mode 100644
index 00000000000..796e8065c4b
--- /dev/null
+++ b/dlls/xactengine2_0/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_0.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0200
+PARENTSRC = ../xactengine2_10
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact2_dll.c
+
+IDL_SRCS = xact2_classes.idl
diff --git a/dlls/xactengine2_0/xactengine2_0.spec b/dlls/xactengine2_0/xactengine2_0.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_0/xactengine2_0.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/xactengine2_10/xact2_classes.idl b/dlls/xactengine2_10/xact2_classes.idl
index ed88c21c8f2..7d06830e9af 100644
--- a/dlls/xactengine2_10/xact2_classes.idl
+++ b/dlls/xactengine2_10/xact2_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0201
+#if XACT3_VER == 0x0200
+ uuid(0aa000aa-f404-1109-bd7a-0010dc4f8f81)
+#elif XACT3_VER == 0x0201
uuid(1f1b577e-5e5a-4e8a-ba73-c657ea8e8598)
#elif XACT3_VER == 0x0202
uuid(c60fae90-4183-4a3f-b2f7-ac1dc49b0e5c)
--
2.28.0

View File

@ -0,0 +1,4 @@
Fixes: [41048] xactengine2_0: Roller Coaster Rampage
Fixes: [49671] xactengine2_4: Supreme Commander demo
Fixes: [49668] xactengine2_7: Two Worlds Epic Edition
Fixes: [41468] xactengine2_9: Supreme Commander Forged Alliance