mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against e43288348de170fef5dfd122675ba367dd7ea0ec.
This commit is contained in:
parent
1d21e2b6f5
commit
f2648a9a40
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "c86955d3806879fc97b127730e9fb90e232710a7"
|
||||
echo "e43288348de170fef5dfd122675ba367dd7ea0ec"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -261,9 +261,7 @@ patch_enable_all ()
|
||||
enable_ws2_32_SIO_IDEAL_SEND_BACKLOG_QUERY="$1"
|
||||
enable_wscript_support_d_u_switches="$1"
|
||||
enable_xactengine_initial="$1"
|
||||
enable_xactengine3_7_Notification="$1"
|
||||
enable_xactengine3_7_PrepareWave="$1"
|
||||
enable_xactengine3_7_callbacks="$1"
|
||||
}
|
||||
|
||||
# Enable or disable a specific patchset
|
||||
@ -807,15 +805,9 @@ patch_enable ()
|
||||
xactengine-initial)
|
||||
enable_xactengine_initial="$2"
|
||||
;;
|
||||
xactengine3_7-Notification)
|
||||
enable_xactengine3_7_Notification="$2"
|
||||
;;
|
||||
xactengine3_7-PrepareWave)
|
||||
enable_xactengine3_7_PrepareWave="$2"
|
||||
;;
|
||||
xactengine3_7-callbacks)
|
||||
enable_xactengine3_7_callbacks="$2"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
@ -1163,13 +1155,6 @@ patch_apply()
|
||||
}
|
||||
|
||||
|
||||
if test "$enable_xactengine3_7_callbacks" -eq 1; then
|
||||
if test "$enable_xactengine3_7_Notification" -gt 1; then
|
||||
abort "Patchset xactengine3_7-Notification disabled, but xactengine3_7-callbacks depends on that."
|
||||
fi
|
||||
enable_xactengine3_7_Notification=1
|
||||
fi
|
||||
|
||||
if test "$enable_winex11_WM_WINDOWPOSCHANGING" -eq 1; then
|
||||
if test "$enable_winex11__NET_ACTIVE_WINDOW" -gt 1; then
|
||||
abort "Patchset winex11-_NET_ACTIVE_WINDOW disabled, but winex11-WM_WINDOWPOSCHANGING depends on that."
|
||||
@ -3872,18 +3857,6 @@ if test "$enable_xactengine_initial" -eq 1; then
|
||||
patch_apply xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch
|
||||
fi
|
||||
|
||||
# Patchset xactengine3_7-Notification
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#50546] xactengine3_7: Send Notification after the Wavebank is created.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/xactengine3_7/xact_dll.c
|
||||
# |
|
||||
if test "$enable_xactengine3_7_Notification" -eq 1; then
|
||||
patch_apply xactengine3_7-Notification/0002-xactengine3_7-Record-context-for-each-notications.patch
|
||||
fi
|
||||
|
||||
# Patchset xactengine3_7-PrepareWave
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -3897,25 +3870,6 @@ if test "$enable_xactengine3_7_PrepareWave" -eq 1; then
|
||||
patch_apply xactengine3_7-PrepareWave/0003-xactengine3_7-Implement-IXACT3Engine-PrepareInMemory.patch
|
||||
fi
|
||||
|
||||
# Patchset xactengine3_7-callbacks
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * xactengine3_7-Notification
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#49678] - xactengine: Implement callback notifications.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/xactengine3_7/xact_dll.c
|
||||
# |
|
||||
if test "$enable_xactengine3_7_callbacks" -eq 1; then
|
||||
patch_apply xactengine3_7-callbacks/0001-xactengine3_7-Add-helper-function-to-add-entries.patch
|
||||
patch_apply xactengine3_7-callbacks/0002-xactengine3_7-Map-SoundBank-interfaces.patch
|
||||
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
|
||||
fi
|
||||
|
||||
if test "$enable_autoconf" -eq 1; then
|
||||
if ! update_configure; then
|
||||
abort "'autoreconf -f' failed."
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6290d283c29832f6822090ef57c8bd4e04c43eaf Mon Sep 17 00:00:00 2001
|
||||
From 07fdb3ce4ca75bb568dfcb62708fde112b0b7b3c Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 17 Apr 2014 16:07:46 -0600
|
||||
Subject: [PATCH] server: Unify the storage of security attributes for files
|
||||
@ -12,17 +12,17 @@ Subject: [PATCH] server: Unify the storage of security attributes for files
|
||||
4 files changed, 31 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index f7be480656d..f6b4a37b005 100644
|
||||
index f2737e0a9bd..23a961cb88e 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -341,6 +341,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
|
||||
@@ -414,6 +414,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
|
||||
XACT3SoundBankImpl *This = impl_from_IXACT3SoundBank(iface);
|
||||
XACT3CueImpl *cue;
|
||||
FACTCue *fcue;
|
||||
+
|
||||
UINT ret;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
|
||||
diff --git a/server/change.c b/server/change.c
|
||||
index 5e9d94720a5..fc030159101 100644
|
||||
--- a/server/change.c
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 96755049b6c8cddd313b9e4451b85a64410774ee Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 20 Jul 2022 10:55:43 +1000
|
||||
Subject: [PATCH] xactengine3_7: Record context for each notications
|
||||
|
||||
This helps the first lockup but starting a game causes another freeze.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49678
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 15 ++++-----------
|
||||
1 file changed, 4 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 754f488681e..66f06456d28 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -83,8 +83,7 @@ typedef struct _XACT3EngineImpl {
|
||||
XACT_GETOVERLAPPEDRESULT_CALLBACK pGetOverlappedResult;
|
||||
XACT_NOTIFICATION_CALLBACK notification_callback;
|
||||
|
||||
- void *wb_prepared_context;
|
||||
- void *wb_destroyed_context;
|
||||
+ void *contexts[17];
|
||||
struct wine_rb_tree wb_wrapper_lookup;
|
||||
CRITICAL_SECTION wb_wrapper_lookup_cs;
|
||||
} XACT3EngineImpl;
|
||||
@@ -935,6 +934,7 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
|
||||
xnotification.type = xact_notification_type_from_fact(notification->type);
|
||||
xnotification.timeStamp = notification->timeStamp;
|
||||
+ xnotification.pvContext = engine->contexts[notification->type - 1];
|
||||
|
||||
if (notification->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED
|
||||
|| notification->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
|
||||
@@ -952,10 +952,6 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
xnotification.waveBank.pWaveBank = lookup->xact;
|
||||
}
|
||||
LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
- if (notification->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
|
||||
- xnotification.pvContext = engine->wb_prepared_context;
|
||||
- else
|
||||
- xnotification.pvContext = engine->wb_destroyed_context;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1501,12 +1497,8 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pNotificationDesc);
|
||||
|
||||
- if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
|
||||
- This->wb_prepared_context = pNotificationDesc->pvContext;
|
||||
- else if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
|
||||
- This->wb_destroyed_context = pNotificationDesc->pvContext;
|
||||
-
|
||||
unwrap_notificationdesc(&fdesc, pNotificationDesc);
|
||||
+ This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
|
||||
fdesc.pvContext = This;
|
||||
return FACTAudioEngine_RegisterNotification(This->fact_engine, &fdesc);
|
||||
}
|
||||
@@ -1520,6 +1512,7 @@ static HRESULT WINAPI IXACT3EngineImpl_UnRegisterNotification(IXACT3Engine *ifac
|
||||
TRACE("(%p)->(%p)\n", This, pNotificationDesc);
|
||||
|
||||
unwrap_notificationdesc(&fdesc, pNotificationDesc);
|
||||
+ This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
|
||||
fdesc.pvContext = This;
|
||||
return FACTAudioEngine_UnRegisterNotification(This->fact_engine, &fdesc);
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,2 +0,0 @@
|
||||
# The actual fix will involve FAudio and wine changes.
|
||||
Fixes: [50546] xactengine3_7: Send Notification after the Wavebank is created.
|
@ -1,137 +0,0 @@
|
||||
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] xactengine3_7: Add helper function to add entries
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 67 +++++++++++++++++------------------
|
||||
1 file changed, 33 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index f450320a355..eb4020afec7 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -113,6 +113,33 @@ static void wrapper_remove_entry(XACT3EngineImpl *engine, void *key)
|
||||
}
|
||||
}
|
||||
|
||||
+static HRESULT wrapper_add_entry(XACT3EngineImpl *engine, void *fwb, void *xact)
|
||||
+{
|
||||
+ struct wrapper_lookup *lookup;
|
||||
+ UINT ret;
|
||||
+
|
||||
+ lookup = HeapAlloc(GetProcessHeap(), 0, sizeof(*lookup));
|
||||
+ if (!lookup)
|
||||
+ {
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ lookup->fact = fwb;
|
||||
+ lookup->xact = xact;
|
||||
+
|
||||
+ EnterCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
+ ret = wine_rb_put(&engine->wb_wrapper_lookup, lookup->fact, &lookup->entry);
|
||||
+ LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
+
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ WARN("wrapper_lookup already present in the tree??\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, lookup);
|
||||
+ }
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
typedef struct _XACT3CueImpl {
|
||||
IXACT3Cue IXACT3Cue_iface;
|
||||
FACTCue *fact_cue;
|
||||
@@ -1092,9 +1119,9 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
|
||||
DWORD dwAllocAttributes, IXACT3WaveBank **ppWaveBank)
|
||||
{
|
||||
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
|
||||
- struct wrapper_lookup *lookup;
|
||||
XACT3WaveBankImpl *wb;
|
||||
FACTWaveBank *fwb;
|
||||
+ HRESULT hr;
|
||||
UINT ret;
|
||||
|
||||
TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p)\n", This, pvBuffer, dwSize, dwFlags,
|
||||
@@ -1116,28 +1143,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
- lookup = HeapAlloc(GetProcessHeap(), 0, sizeof(*lookup));
|
||||
- if (!lookup)
|
||||
+ hr = wrapper_add_entry(This, fwb, &wb->IXACT3WaveBank_iface);
|
||||
+ if (FAILED(hr))
|
||||
{
|
||||
FACTWaveBank_Destroy(fwb);
|
||||
HeapFree(GetProcessHeap(), 0, wb);
|
||||
ERR("Failed to allocate wrapper_lookup!\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
- lookup->fact = fwb;
|
||||
- lookup->xact = &wb->IXACT3WaveBank_iface;
|
||||
-
|
||||
- EnterCriticalSection(&This->wb_wrapper_lookup_cs);
|
||||
-
|
||||
- ret = wine_rb_put(&This->wb_wrapper_lookup, lookup->fact, &lookup->entry);
|
||||
-
|
||||
- LeaveCriticalSection(&This->wb_wrapper_lookup_cs);
|
||||
-
|
||||
- if (ret)
|
||||
- {
|
||||
- WARN("wrapper_lookup already present in the tree??\n");
|
||||
- HeapFree(GetProcessHeap(), 0, lookup);
|
||||
- }
|
||||
|
||||
wb->IXACT3WaveBank_iface.lpVtbl = &XACT3WaveBank_Vtbl;
|
||||
wb->fact_wavebank = fwb;
|
||||
@@ -1155,11 +1168,11 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
|
||||
{
|
||||
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
|
||||
FACTStreamingParameters fakeParms;
|
||||
- struct wrapper_lookup *lookup;
|
||||
wrap_readfile_struct *fake;
|
||||
XACT3WaveBankImpl *wb;
|
||||
FACTWaveBank *fwb;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p, %p)\n", This, pParms, ppWaveBank);
|
||||
|
||||
@@ -1189,28 +1202,14 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
- lookup = HeapAlloc(GetProcessHeap(), 0, sizeof(*lookup));
|
||||
- if (!lookup)
|
||||
+ hr = wrapper_add_entry(This, fwb, &wb->IXACT3WaveBank_iface);
|
||||
+ if (FAILED(hr))
|
||||
{
|
||||
FACTWaveBank_Destroy(fwb);
|
||||
HeapFree(GetProcessHeap(), 0, wb);
|
||||
ERR("Failed to allocate wrapper_lookup!\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
- lookup->fact = fwb;
|
||||
- lookup->xact = &wb->IXACT3WaveBank_iface;
|
||||
-
|
||||
- EnterCriticalSection(&This->wb_wrapper_lookup_cs);
|
||||
-
|
||||
- ret = wine_rb_put(&This->wb_wrapper_lookup, lookup->fact, &lookup->entry);
|
||||
-
|
||||
- LeaveCriticalSection(&This->wb_wrapper_lookup_cs);
|
||||
-
|
||||
- if (ret)
|
||||
- {
|
||||
- WARN("wrapper_lookup already present in the tree??\n");
|
||||
- HeapFree(GetProcessHeap(), 0, lookup);
|
||||
- }
|
||||
|
||||
wb->IXACT3WaveBank_iface.lpVtbl = &XACT3WaveBank_Vtbl;
|
||||
wb->fact_wavebank = fwb;
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 2ca9f0e03bed89e91c1ff42f2e23b67e8f1b2e0c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 22 Jul 2022 09:57:22 +1000
|
||||
Subject: [PATCH] xactengine3_7: Map SoundBank interfaces
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 421c509fcfa..106f912ffa0 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -1079,6 +1079,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
|
||||
XACT3SoundBankImpl *sb;
|
||||
FACTSoundBank *fsb;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
|
||||
dwAllocAttributes, ppSoundBank);
|
||||
@@ -1099,6 +1100,15 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This, fsb, &sb->IXACT3SoundBank_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTSoundBank_Destroy(fsb);
|
||||
+ HeapFree(GetProcessHeap(), 0, sb);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
sb->IXACT3SoundBank_iface.lpVtbl = &XACT3SoundBank_Vtbl;
|
||||
sb->fact_soundbank = fsb;
|
||||
*ppSoundBank = &sb->IXACT3SoundBank_iface;
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
From c0a826bcea42fe6988b110d811064fa2208a3c5c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 21 Jul 2022 08:04:13 +1000
|
||||
Subject: [PATCH] xactengine3_7: Map IXACT3Cue interfaces
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 106f912ffa0..b3e66dbf717 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -320,6 +320,7 @@ typedef struct _XACT3SoundBankImpl {
|
||||
IXACT3SoundBank IXACT3SoundBank_iface;
|
||||
|
||||
FACTSoundBank *fact_soundbank;
|
||||
+ XACT3EngineImpl *engine;
|
||||
} XACT3SoundBankImpl;
|
||||
|
||||
static inline XACT3SoundBankImpl *impl_from_IXACT3SoundBank(IXACT3SoundBank *iface)
|
||||
@@ -369,6 +370,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
|
||||
FACTCue *fcue;
|
||||
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
|
||||
ppCue);
|
||||
@@ -389,6 +391,15 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This->engine, fcue, &cue->IXACT3Cue_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTCue_Destroy(fcue);
|
||||
+ HeapFree(GetProcessHeap(), 0, cue);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
cue->IXACT3Cue_iface.lpVtbl = &XACT3Cue_Vtbl;
|
||||
cue->fact_cue = fcue;
|
||||
*ppCue = &cue->IXACT3Cue_iface;
|
||||
@@ -431,6 +442,15 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This->engine, fcue, &cue->IXACT3Cue_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTCue_Destroy(fcue);
|
||||
+ HeapFree(GetProcessHeap(), 0, cue);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
cue->IXACT3Cue_iface.lpVtbl = &XACT3Cue_Vtbl;
|
||||
cue->fact_cue = fcue;
|
||||
*ppCue = &cue->IXACT3Cue_iface;
|
||||
@@ -1111,6 +1131,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
|
||||
|
||||
sb->IXACT3SoundBank_iface.lpVtbl = &XACT3SoundBank_Vtbl;
|
||||
sb->fact_soundbank = fsb;
|
||||
+ sb->engine = This;
|
||||
*ppSoundBank = &sb->IXACT3SoundBank_iface;
|
||||
|
||||
TRACE("Created SoundBank: %p\n", sb);
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,129 +0,0 @@
|
||||
From f454464118716f88cc783e0ca4b49ee8af779083 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 22 Jul 2022 08:50:57 +1000
|
||||
Subject: [PATCH] xactengine3_7: Map IXACT3Wave interfaces
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 49 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 49 insertions(+)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 5cd7ed3342a..2e5dd7e9935 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -710,6 +710,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Prepare(IXACT3WaveBank *iface,
|
||||
XACT3WaveImpl *wave;
|
||||
FACTWave *fwave;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(0x%x, %lu, 0x%lx, %u, %p)\n", This, nWaveIndex, dwFlags,
|
||||
dwPlayOffset, nLoopCount, ppWave);
|
||||
@@ -730,6 +731,15 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Prepare(IXACT3WaveBank *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This->engine, fwave, &wave->IXACT3Wave_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTWave_Destroy(fwave);
|
||||
+ HeapFree(GetProcessHeap(), 0, wave);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
|
||||
wave->fact_wave = fwave;
|
||||
*ppWave = &wave->IXACT3Wave_iface;
|
||||
@@ -772,6 +782,15 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Play(IXACT3WaveBank *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This->engine, fwave, &wave->IXACT3Wave_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTWave_Destroy(fwave);
|
||||
+ HeapFree(GetProcessHeap(), 0, wave);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
|
||||
wave->fact_wave = fwave;
|
||||
*ppWave = &wave->IXACT3Wave_iface;
|
||||
@@ -1258,6 +1277,7 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareInMemoryWave(IXACT3Engine *iface,
|
||||
FACTWave *fwave = NULL;
|
||||
FACTWaveBankEntry fact_wavebank;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(0x%08lx, %p, %p, %p, %ld, %d, %p)\n", This, dwFlags, &entry, pdwSeekTable,
|
||||
pbWaveData, dwPlayOffset, nLoopCount, ppWave);
|
||||
@@ -1285,6 +1305,15 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareInMemoryWave(IXACT3Engine *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This, fwave, &wave->IXACT3Wave_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTWave_Destroy(fwave);
|
||||
+ HeapFree(GetProcessHeap(), 0, wave);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
|
||||
wave->fact_wave = fwave;
|
||||
*ppWave = &wave->IXACT3Wave_iface;
|
||||
@@ -1307,6 +1336,7 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareStreamingWave(IXACT3Engine *iface,
|
||||
wrap_readfile_struct *fake;
|
||||
FACTWaveBankEntry fact_wavebank;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(0x%08lx, %p, %p, %ld, %p, %ld, %d, %p)\n", This, dwFlags, &entry, &streamingParams,
|
||||
dwAlignment, pdwSeekTable, dwPlayOffset, nLoopCount, ppWave);
|
||||
@@ -1347,6 +1377,15 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareStreamingWave(IXACT3Engine *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This, fwave, &wave->IXACT3Wave_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTWave_Destroy(fwave);
|
||||
+ HeapFree(GetProcessHeap(), 0, wave);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
|
||||
wave->fact_wave = fwave;
|
||||
*ppWave = &wave->IXACT3Wave_iface;
|
||||
@@ -1365,6 +1404,7 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
|
||||
XACT3WaveImpl *wave;
|
||||
FACTWave *fwave = NULL;
|
||||
UINT ret;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(0x%08lx, %s, %d, %ld, %ld, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
|
||||
wStreamingPacketSize, dwAlignment, dwPlayOffset, nLoopCount, ppWave);
|
||||
@@ -1384,6 +1424,15 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ hr = wrapper_add_entry(This, fwave, &wave->IXACT3Wave_iface);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ FACTWave_Destroy(fwave);
|
||||
+ HeapFree(GetProcessHeap(), 0, wave);
|
||||
+ ERR("Failed to allocate wrapper_lookup!\n");
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
|
||||
wave->fact_wave = fwave;
|
||||
*ppWave = &wave->IXACT3Wave_iface;
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,116 +0,0 @@
|
||||
From d826bba5230b20f6a78eb3c1bf5a68e4a994eede Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 22 Jul 2022 09:17:06 +1000
|
||||
Subject: [PATCH] xactengine3_7: Implement callback for supported messages
|
||||
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 69 +++++++++++++++++++++++++++--------
|
||||
1 file changed, 53 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 3ae76f55495..6a1e95c7277 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -115,6 +115,23 @@ static HRESULT wrapper_add_entry(XACT3EngineImpl *engine, void *fwb, void *xact)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+/* Must be protected by engine->wb_wrapper_lookup_cs */
|
||||
+static void* wrapper_find_entry(XACT3EngineImpl *engine, void *faudio)
|
||||
+{
|
||||
+ struct wrapper_lookup *lookup;
|
||||
+ struct wine_rb_entry *entry;
|
||||
+
|
||||
+ entry = wine_rb_get(&engine->wb_wrapper_lookup, faudio);
|
||||
+ if (entry)
|
||||
+ {
|
||||
+ lookup = WINE_RB_ENTRY_VALUE(entry, struct wrapper_lookup, entry);
|
||||
+ return lookup->xact;
|
||||
+ }
|
||||
+
|
||||
+ WARN("cannot find interface in wrapper lookup\n");
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
typedef struct _XACT3CueImpl {
|
||||
IXACT3Cue IXACT3Cue_iface;
|
||||
FACTCue *fact_cue;
|
||||
@@ -987,10 +1004,8 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
{
|
||||
XACT3EngineImpl *engine = (XACT3EngineImpl *)notification->pvContext;
|
||||
XACT_NOTIFICATION xnotification;
|
||||
- struct wrapper_lookup *lookup;
|
||||
- struct wine_rb_entry *entry;
|
||||
|
||||
- TRACE("notification %p\n", notification->pvContext);
|
||||
+ TRACE("notification %d, context %p\n", notification->type, notification->pvContext);
|
||||
|
||||
/* Older versions of FAudio don't pass through the context */
|
||||
if (!engine)
|
||||
@@ -1003,28 +1018,50 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
xnotification.timeStamp = notification->timeStamp;
|
||||
xnotification.pvContext = engine->contexts[notification->type - 1];
|
||||
|
||||
+ EnterCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
if (notification->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED
|
||||
|| notification->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
|
||||
{
|
||||
- EnterCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
- entry = wine_rb_get(&engine->wb_wrapper_lookup, notification->waveBank.pWaveBank);
|
||||
- if (!entry)
|
||||
- {
|
||||
- WARN("cannot find wave bank in wrapper lookup\n");
|
||||
- xnotification.waveBank.pWaveBank = NULL;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- lookup = WINE_RB_ENTRY_VALUE(entry, struct wrapper_lookup, entry);
|
||||
- xnotification.waveBank.pWaveBank = lookup->xact;
|
||||
- }
|
||||
- LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
+ xnotification.waveBank.pWaveBank = wrapper_find_entry(engine, notification->waveBank.pWaveBank);
|
||||
+ }
|
||||
+ else if(notification->type == XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED)
|
||||
+ {
|
||||
+ xnotification.soundBank.pSoundBank = wrapper_find_entry(engine, notification->soundBank.pSoundBank);
|
||||
+ }
|
||||
+ else if (notification->type == XACTNOTIFICATIONTYPE_WAVESTOP
|
||||
+#if XACT3_VER >= 0x0205
|
||||
+ || notification->type == XACTNOTIFICATIONTYPE_WAVEDESTROYED
|
||||
+ || notification->type == XACTNOTIFICATIONTYPE_WAVELOOPED
|
||||
+ || notification->type == XACTNOTIFICATIONTYPE_WAVEPLAY
|
||||
+ || notification->type == XACTNOTIFICATIONTYPE_WAVEPREPARED)
|
||||
+#else
|
||||
+ )
|
||||
+#endif
|
||||
+ {
|
||||
+ xnotification.wave.cueIndex = notification->wave.cueIndex;
|
||||
+ xnotification.wave.pCue = wrapper_find_entry(engine, notification->wave.pCue);
|
||||
+ xnotification.wave.pSoundBank = wrapper_find_entry(engine, notification->wave.pSoundBank);
|
||||
+#if XACT3_VER >= 0x0205
|
||||
+ xnotification.wave.pWave = wrapper_find_entry(engine, notification->wave.pWave);
|
||||
+#endif
|
||||
+ xnotification.wave.pWaveBank = wrapper_find_entry(engine, notification->wave.pWaveBank);
|
||||
+ }
|
||||
+ else if (notification->type == XACTNOTIFICATIONTYPE_CUEPLAY ||
|
||||
+ notification->type == XACTNOTIFICATIONTYPE_CUEPREPARED ||
|
||||
+ notification->type == XACTNOTIFICATIONTYPE_CUESTOP ||
|
||||
+ notification->type == XACTNOTIFICATIONTYPE_CUEDESTROYED)
|
||||
+ {
|
||||
+ xnotification.cue.pCue = wrapper_find_entry(engine, notification->cue.pCue);
|
||||
+ xnotification.cue.cueIndex = notification->cue.cueIndex;
|
||||
+ xnotification.cue.pSoundBank = wrapper_find_entry(engine, notification->cue.pSoundBank);
|
||||
}
|
||||
else
|
||||
{
|
||||
+ LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
FIXME("Unsupported callback type %d\n", notification->type);
|
||||
return;
|
||||
}
|
||||
+ LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
|
||||
engine->notification_callback(&xnotification);
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: [49678] - xactengine: Implement callback notifications.
|
||||
Depends: xactengine3_7-Notification
|
@ -1 +1 @@
|
||||
d909f2759066afd128aa1a299d3367c7ab76da8f
|
||||
e43288348de170fef5dfd122675ba367dd7ea0ec
|
||||
|
Loading…
Reference in New Issue
Block a user