Updated xactengine3_7-Notification patchset

This commit is contained in:
Alistair Leslie-Hughes 2021-01-28 13:24:47 +11:00
parent 9692b2e5eb
commit bd135b1477
2 changed files with 59 additions and 0 deletions

View File

@ -5257,6 +5257,7 @@ fi
# |
if test "$enable_xactengine3_7_Notification" -eq 1; then
patch_apply xactengine3_7-Notification/0001-xactengine3.7-Delay-Notication-for-WAVEBANKPREPARED.patch
patch_apply xactengine3_7-Notification/0002-xactengine3_7-Record-context-for-each-notications.patch
fi
# Patchset xactengine3_7-PrepareWave

View File

@ -0,0 +1,58 @@
From 0b8b06c2e94d23e9f6f8614073450c5598830c7d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 28 Jan 2021 12:29:42 +1100
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
---
dlls/xactengine3_7/xact_dll.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index c3c6b785094..1eda7661acc 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -637,6 +637,8 @@ typedef struct _XACT3EngineImpl {
XACT_READFILE_CALLBACK pReadFile;
XACT_GETOVERLAPPEDRESULT_CALLBACK pGetOverlappedResult;
XACT_NOTIFICATION_CALLBACK notification_callback;
+
+ void *contexts[17];
} XACT3EngineImpl;
typedef struct wrap_readfile_struct {
@@ -990,6 +992,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
tdata->engine = This;
tdata->note.type = XACTNOTIFICATIONTYPE_WAVEBANKPREPARED;
+ tdata->note.pvContext = This->contexts[tdata->note.type - 1];
tdata->note.u.wave.pWaveBank = &wb->IXACT3WaveBank_iface;
thread = CreateThread(NULL, 0, thread_notications, tdata, 0, NULL);
@@ -1239,9 +1242,11 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
FACTNotificationDescription fdesc;
- TRACE("(%p)->(%p)\n", This, pNotificationDesc);
+ TRACE("(%p)->(%p, pvContext %p)\n", This, pNotificationDesc, pNotificationDesc->pvContext);
unwrap_notificationdesc(&fdesc, pNotificationDesc);
+
+ This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
fdesc.pvContext = This;
return FACTAudioEngine_RegisterNotification(This->fact_engine, &fdesc);
}
@@ -1255,6 +1260,8 @@ 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.29.2