Rebase against 889fe64d9f2e1a0d9a3660bbb94e0a9b74155827.

This commit is contained in:
Alistair Leslie-Hughes 2022-07-26 09:14:17 +10:00
parent 9fd1bb66d3
commit fb2b3b3c69
4 changed files with 12 additions and 55 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7b77b4e3b4ea732ed592ac15f000875f5d1f1daa"
echo "889fe64d9f2e1a0d9a3660bbb94e0a9b74155827"
}
# Show version information
@ -3898,7 +3898,6 @@ if test "$enable_xactengine3_7_callbacks" -eq 1; then
patch_apply xactengine3_7-callbacks/0003-xactengine3_7-Map-IXACT3Cue-interfaces.patch
patch_apply xactengine3_7-callbacks/0004-xactengine3_7-Map-IXACT3Wave-interfaces.patch
patch_apply xactengine3_7-callbacks/0005-xactengine3_7-Implement-callback-for-supported-messa.patch
patch_apply xactengine3_7-callbacks/0006-xactengine3_7-Remove-Entry-after-FAudio-Destroyed-ca.patch
fi
if test "$enable_autoconf" -eq 1; then

View File

@ -1,7 +1,7 @@
From 5eaf6ecd797b085898e95c6710b6d47e805b7811 Mon Sep 17 00:00:00 2001
From 740d92f0478b460ed176741cb6d98862d4d57e32 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 20 Jul 2022 11:32:36 +1000
Subject: [PATCH 1/4] xactengine3_7: Add helper function to add entries
Subject: [PATCH] xactengine3_7: Add helper function to add entries
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
@ -9,12 +9,12 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
1 file changed, 33 insertions(+), 34 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 7664328dbc4..421c509fcfa 100644
index f450320a355..eb4020afec7 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -88,6 +88,33 @@ typedef struct _XACT3EngineImpl {
CRITICAL_SECTION wb_wrapper_lookup_cs;
} XACT3EngineImpl;
@@ -113,6 +113,33 @@ static void wrapper_remove_entry(XACT3EngineImpl *engine, void *key)
}
}
+static HRESULT wrapper_add_entry(XACT3EngineImpl *engine, void *fwb, void *xact)
+{
@ -46,7 +46,7 @@ index 7664328dbc4..421c509fcfa 100644
typedef struct _XACT3CueImpl {
IXACT3Cue IXACT3Cue_iface;
FACTCue *fact_cue;
@@ -1086,9 +1113,9 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
@@ -1092,9 +1119,9 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
DWORD dwAllocAttributes, IXACT3WaveBank **ppWaveBank)
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
@ -57,7 +57,7 @@ index 7664328dbc4..421c509fcfa 100644
UINT ret;
TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p)\n", This, pvBuffer, dwSize, dwFlags,
@@ -1110,28 +1137,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
@@ -1116,28 +1143,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
return E_OUTOFMEMORY;
}
@ -88,7 +88,7 @@ index 7664328dbc4..421c509fcfa 100644
wb->IXACT3WaveBank_iface.lpVtbl = &XACT3WaveBank_Vtbl;
wb->fact_wavebank = fwb;
@@ -1149,11 +1162,11 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
@@ -1155,11 +1168,11 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
FACTStreamingParameters fakeParms;
@ -101,7 +101,7 @@ index 7664328dbc4..421c509fcfa 100644
TRACE("(%p)->(%p, %p)\n", This, pParms, ppWaveBank);
@@ -1183,28 +1196,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
@@ -1189,28 +1202,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
return E_OUTOFMEMORY;
}

View File

@ -1,42 +0,0 @@
From c2849dce7ff45f6c003198b43153c7e2c597c988 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 22 Jul 2022 12:34:27 +1000
Subject: [PATCH] xactengine3_7: Remove Entry after FAudio Destroyed call
FACTWaveBank_Destroy will invoke the callback which we
attempt to lookup the wavebank.
The callback must have a pointer, help states it isn't valid but still
points to the wavebank that was destroyed.
---
dlls/xactengine3_7/xact_dll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 19c02036907..a72afcc18e1 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -661,10 +661,11 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Destroy(IXACT3WaveBank *iface)
TRACE("(%p)\n", This);
+ hr = FACTWaveBank_Destroy(This->fact_wavebank);
+
EnterCriticalSection(&This->engine->wb_wrapper_lookup_cs);
entry = wine_rb_get(&This->engine->wb_wrapper_lookup, This->fact_wavebank);
-
if (!entry)
{
LeaveCriticalSection(&This->engine->wb_wrapper_lookup_cs);
@@ -681,7 +682,6 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Destroy(IXACT3WaveBank *iface)
HeapFree(GetProcessHeap(), 0, lookup);
}
- hr = FACTWaveBank_Destroy(This->fact_wavebank);
HeapFree(GetProcessHeap(), 0, This);
return hr;
}
--
2.35.1

View File

@ -1 +1 @@
7b77b4e3b4ea732ed592ac15f000875f5d1f1daa
889fe64d9f2e1a0d9a3660bbb94e0a9b74155827