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: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b900567f04
commit
196cb7afef
|
@ -15531,7 +15531,8 @@ done
|
||||||
LIBS="$LIBS $FAUDIO_LIBS"
|
LIBS="$LIBS $FAUDIO_LIBS"
|
||||||
for ac_func in FAudio_CommitOperationSet \
|
for ac_func in FAudio_CommitOperationSet \
|
||||||
F3DAudioInitialize8 \
|
F3DAudioInitialize8 \
|
||||||
FAudioLinkedVersion
|
FAudioLinkedVersion \
|
||||||
|
FAudioCreateReverb9WithCustomAllocatorEXT
|
||||||
do :
|
do :
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
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_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])])
|
||||||
WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \
|
WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \
|
||||||
F3DAudioInitialize8 \
|
F3DAudioInitialize8 \
|
||||||
FAudioLinkedVersion], [$FAUDIO_LIBS])
|
FAudioLinkedVersion \
|
||||||
|
FAudioCreateReverb9WithCustomAllocatorEXT], [$FAUDIO_LIBS])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"],
|
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_Free,
|
||||||
XAudio_Internal_Realloc
|
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))
|
if(IsEqualGUID(clsid, &CLSID_AudioReverb27))
|
||||||
return FAudioCreateReverbWithCustomAllocatorEXT(
|
return FAudioCreateReverbWithCustomAllocatorEXT(
|
||||||
fapo,
|
fapo,
|
||||||
|
@ -322,6 +332,7 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo)
|
||||||
XAudio_Internal_Realloc
|
XAudio_Internal_Realloc
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if XAUDIO2_VER >= 8 || defined XAPOFX1_VER
|
#if XAUDIO2_VER >= 8 || defined XAPOFX1_VER
|
||||||
if(IsEqualGUID(clsid, &CLSID_FXReverb) ||
|
if(IsEqualGUID(clsid, &CLSID_FXReverb) ||
|
||||||
IsEqualGUID(clsid, &CLSID_FXEQ) ||
|
IsEqualGUID(clsid, &CLSID_FXEQ) ||
|
||||||
|
|
|
@ -152,6 +152,10 @@
|
||||||
/* Define to 1 if you have the `fallocate' function. */
|
/* Define to 1 if you have the `fallocate' function. */
|
||||||
#undef HAVE_FALLOCATE
|
#undef HAVE_FALLOCATE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `FAudioCreateReverb9WithCustomAllocatorEXT'
|
||||||
|
function. */
|
||||||
|
#undef HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT
|
||||||
|
|
||||||
/* Define to 1 if you have the `FAudioLinkedVersion' function. */
|
/* Define to 1 if you have the `FAudioLinkedVersion' function. */
|
||||||
#undef HAVE_FAUDIOLINKEDVERSION
|
#undef HAVE_FAUDIOLINKEDVERSION
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue