Commit 196cb7af authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

xaudio2_9: Use new FAudioCreateReverb9 interface.

XAudio 2.9 and Windows 10 introduced a new SideDelay field in the middle of the XAUDIO2FX_REVERB_PARAMETERS structure, which causes other fields to be offseted and incorrectly read from the parameter buffer. FAudio 20.08 introduces this new interface to create reverb effects that use the new parameter structure layout. This fixes audio glitches in Dragon Quest Builders 2. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b900567f
......@@ -15531,7 +15531,8 @@ done
LIBS="$LIBS $FAUDIO_LIBS"
for ac_func in FAudio_CommitOperationSet \
F3DAudioInitialize8 \
FAudioLinkedVersion
FAudioLinkedVersion \
FAudioCreateReverb9WithCustomAllocatorEXT
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
......
......@@ -1784,7 +1784,8 @@ then
[WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])])
WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \
F3DAudioInitialize8 \
FAudioLinkedVersion], [$FAUDIO_LIBS])
FAudioLinkedVersion \
FAudioCreateReverb9WithCustomAllocatorEXT], [$FAUDIO_LIBS])
])
fi
WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"],
......
......@@ -313,6 +313,16 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo)
XAudio_Internal_Free,
XAudio_Internal_Realloc
);
#if XAUDIO2_VER >= 9 && HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT
if(IsEqualGUID(clsid, &CLSID_AudioReverb27))
return FAudioCreateReverb9WithCustomAllocatorEXT(
fapo,
0,
XAudio_Internal_Malloc,
XAudio_Internal_Free,
XAudio_Internal_Realloc
);
#else
if(IsEqualGUID(clsid, &CLSID_AudioReverb27))
return FAudioCreateReverbWithCustomAllocatorEXT(
fapo,
......@@ -322,6 +332,7 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo)
XAudio_Internal_Realloc
);
#endif
#endif
#if XAUDIO2_VER >= 8 || defined XAPOFX1_VER
if(IsEqualGUID(clsid, &CLSID_FXReverb) ||
IsEqualGUID(clsid, &CLSID_FXEQ) ||
......
......@@ -152,6 +152,10 @@
/* Define to 1 if you have the `fallocate' function. */
#undef HAVE_FALLOCATE
/* Define to 1 if you have the `FAudioCreateReverb9WithCustomAllocatorEXT'
function. */
#undef HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT
/* Define to 1 if you have the `FAudioLinkedVersion' function. */
#undef HAVE_FAUDIOLINKEDVERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment