From 22c26a2dde318b5b370fc269cab871e5a8bc4231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 25 Oct 2021 13:52:44 +0200 Subject: [PATCH] xaudio2_7: Restore FAudioCreateReverbWithCustomAllocatorEXT use for old XAPO versions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexandre Julliard --- 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) ||