Updated xactengine-initial patchset

Fixes: https://bugs.winehq.org/show_bug.cgi?id=48824
This commit is contained in:
Alistair Leslie-Hughes 2020-03-30 16:09:15 +11:00
parent 805f2e9252
commit 7fe7d87f09

View File

@ -1,17 +1,17 @@
From 259e956699ed667257c575a68c97d9eca2320d3d Mon Sep 17 00:00:00 2001
From 25c1fa51fd49839fe0858493537c1c3c7cdfea30 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 9 Jan 2020 09:06:01 +1100
Subject: [PATCH] xaudio2_7: unwrap structure based of it's type.
---
dlls/xaudio2_7/xact_dll.c | 68 +++++++++++++++++++++++++++++++++++----
1 file changed, 61 insertions(+), 7 deletions(-)
dlls/xaudio2_7/xact_dll.c | 54 ++++++++++++++++++++++++++++++++++-----
1 file changed, 47 insertions(+), 7 deletions(-)
diff --git a/dlls/xaudio2_7/xact_dll.c b/dlls/xaudio2_7/xact_dll.c
index 6ed67c3a67..92434a7084 100644
index b089f71d4ac..252c44767db 100644
--- a/dlls/xaudio2_7/xact_dll.c
+++ b/dlls/xaudio2_7/xact_dll.c
@@ -1144,42 +1144,96 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareStreamingWave(IXACT3Engine *iface,
@@ -1144,42 +1144,82 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareStreamingWave(IXACT3Engine *iface,
return S_OK;
}
@ -31,49 +31,35 @@ index 6ed67c3a67..92434a7084 100644
- FIXME("Type %d\n", xd->type);
+ TRACE("Type %d\n", xd->type);
+ switch (xd->type)
+ /* 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)
+ {
+ /* Supports None */
+ case (int)XACTNOTIFICATIONTYPE_GLOBALVARIABLECHANGED:
+ case (int)XACTNOTIFICATIONTYPE_GUICONNECTED:
+ case (int)XACTNOTIFICATIONTYPE_GUIDISCONNECTED:
+ break;
+
+ /* Supports SoundBank, Cue index, Cue instance */
+ case (int)XACTNOTIFICATIONTYPE_CUEPREPARED:
+ case (int)XACTNOTIFICATIONTYPE_CUEPLAY:
+ case (int)XACTNOTIFICATIONTYPE_CUESTOP:
+ case (int)XACTNOTIFICATIONTYPE_CUEDESTROYED:
+ case (int)XACTNOTIFICATIONTYPE_MARKER:
+ case (int)XACTNOTIFICATIONTYPE_LOCALVARIABLECHANGED:
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue;
+ break;
+
+ /* Supports WaveBank */
+ case (int)XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED:
+ case (int)XACTNOTIFICATIONTYPE_WAVEBANKPREPARED:
+ case (int)XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT:
+ flags = NOTIFY_WaveBank;
+ break;
+
+ /* Supports NOTIFY_SoundBank */
+ case (int)XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED:
+ flags = NOTIFY_SoundBank;
+ break;
+
+ /* Supports WaveBank, Wave index, Wave instance */
+ case (int)XACTNOTIFICATIONTYPE_WAVEPREPARED:
+ case (int)XACTNOTIFICATIONTYPE_WAVEDESTROYED:
+ flags = NOTIFY_WaveBank | NOTIFY_waveIndex | NOTIFY_Wave;
+ break;
+
+ /* Supports SoundBank, SoundBank, Cue index, Cue instance, WaveBank, Wave instance */
+ case (int)XACTNOTIFICATIONTYPE_WAVEPLAY:
+ case (int)XACTNOTIFICATIONTYPE_WAVESTOP:
+ case (int)XACTNOTIFICATIONTYPE_WAVELOOPED:
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue | NOTIFY_WaveBank | NOTIFY_Wave;
+ break;
+ };
+ 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;
+ }
fd->type = xd->type;
fd->flags = xd->flags;