xaudio2_7: Restore FAudioCreateReverbWithCustomAllocatorEXT use for old XAPO versions.

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

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-10-25 13:52:44 +02:00 committed by Alexandre Julliard
parent 7c6c054427
commit 22c26a2dde
1 changed files with 11 additions and 0 deletions

View File

@ -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) ||