Rémi Bernon : xaudio2_7: Restore FAudioCreateReverbWithCustomAllocatorEXT use for old XAPO versions.

Alexandre Julliard julliard at winehq.org
Mon Oct 25 16:30:07 CDT 2021


Module: wine
Branch: master
Commit: 22c26a2dde318b5b370fc269cab871e5a8bc4231
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=22c26a2dde318b5b370fc269cab871e5a8bc4231

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Oct 25 13:52:44 2021 +0200

xaudio2_7: Restore FAudioCreateReverbWithCustomAllocatorEXT use for old XAPO versions.

This was initially guarded to check the presence of FAudioCreateReverb9*
variant and dropped in d8be85863fedf6982944d06ebd1ce5904cb3d4e1 but it
is required, and causes crackling sound after Life is Strange 2 intro.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xaudio2_7/xapo.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/xaudio2_7/xapo.c b/dlls/xaudio2_7/xapo.c
index 657d2f3f507..47210f1570e 100644
--- a/dlls/xaudio2_7/xapo.c
+++ b/dlls/xaudio2_7/xapo.c
@@ -311,6 +311,7 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo)
             XAudio_Internal_Free,
             XAudio_Internal_Realloc
         );
+#if XAUDIO2_VER >= 9
     if(IsEqualGUID(clsid, &CLSID_AudioReverb27))
         return FAudioCreateReverb9WithCustomAllocatorEXT(
             fapo,
@@ -319,6 +320,16 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo)
             XAudio_Internal_Free,
             XAudio_Internal_Realloc
         );
+#else
+    if(IsEqualGUID(clsid, &CLSID_AudioReverb27))
+        return FAudioCreateReverbWithCustomAllocatorEXT(
+            fapo,
+            0,
+            XAudio_Internal_Malloc,
+            XAudio_Internal_Free,
+            XAudio_Internal_Realloc
+        );
+#endif
 #endif
 #if XAUDIO2_VER >= 8 || defined XAPOFX1_VER
     if(IsEqualGUID(clsid, &CLSID_FXReverb) ||




More information about the wine-cvs mailing list