From d8be85863fedf6982944d06ebd1ce5904cb3d4e1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 21 Oct 2021 11:48:26 +0200 Subject: [PATCH] xaudio: Use the bundled FAudio and build with msvcrt. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on a patch by RĂ©mi Bernon. Signed-off-by: Alexandre Julliard --- configure | 173 ------------------------------ configure.ac | 55 ---------- dlls/x3daudio1_0/Makefile.in | 6 +- dlls/x3daudio1_1/Makefile.in | 6 +- dlls/x3daudio1_2/Makefile.in | 6 +- dlls/x3daudio1_3/Makefile.in | 6 +- dlls/x3daudio1_4/Makefile.in | 6 +- dlls/x3daudio1_5/Makefile.in | 6 +- dlls/x3daudio1_6/Makefile.in | 6 +- dlls/x3daudio1_7/Makefile.in | 6 +- dlls/xactengine2_0/Makefile.in | 7 +- dlls/xactengine2_4/Makefile.in | 7 +- dlls/xactengine2_7/Makefile.in | 7 +- dlls/xactengine2_9/Makefile.in | 7 +- dlls/xactengine3_0/Makefile.in | 7 +- dlls/xactengine3_1/Makefile.in | 7 +- dlls/xactengine3_2/Makefile.in | 7 +- dlls/xactengine3_3/Makefile.in | 7 +- dlls/xactengine3_4/Makefile.in | 7 +- dlls/xactengine3_5/Makefile.in | 7 +- dlls/xactengine3_6/Makefile.in | 7 +- dlls/xactengine3_7/Makefile.in | 7 +- dlls/xactengine3_7/xact_dll.c | 14 ++- dlls/xapofx1_1/Makefile.in | 7 +- dlls/xapofx1_2/Makefile.in | 7 +- dlls/xapofx1_3/Makefile.in | 7 +- dlls/xapofx1_4/Makefile.in | 7 +- dlls/xapofx1_5/Makefile.in | 7 +- dlls/xaudio2_0/Makefile.in | 7 +- dlls/xaudio2_1/Makefile.in | 7 +- dlls/xaudio2_2/Makefile.in | 7 +- dlls/xaudio2_3/Makefile.in | 7 +- dlls/xaudio2_4/Makefile.in | 7 +- dlls/xaudio2_5/Makefile.in | 7 +- dlls/xaudio2_6/Makefile.in | 7 +- dlls/xaudio2_7/Makefile.in | 7 +- dlls/xaudio2_7/compat.c | 42 -------- dlls/xaudio2_7/x3daudio.c | 7 -- dlls/xaudio2_7/xapo.c | 13 --- dlls/xaudio2_7/xapofx.c | 2 - dlls/xaudio2_7/xaudio_allocator.c | 2 - dlls/xaudio2_7/xaudio_dll.c | 79 +------------- dlls/xaudio2_7/xaudio_private.h | 6 -- dlls/xaudio2_8/Makefile.in | 7 +- dlls/xaudio2_9/Makefile.in | 7 +- include/config.h.in | 19 ---- 46 files changed, 80 insertions(+), 569 deletions(-) diff --git a/configure b/configure index a76934d48ab..42c1e4f254d 100755 --- a/configure +++ b/configure @@ -649,8 +649,6 @@ CUPS_LIBS CUPS_CFLAGS CAPI20_LIBS CAPI20_CFLAGS -FAUDIO_LIBS -FAUDIO_CFLAGS SDL2_LIBS SDL2_CFLAGS UNWIND_LIBS @@ -858,7 +856,6 @@ with_capi with_coreaudio with_cups with_dbus -with_faudio with_float_abi with_fontconfig with_freetype @@ -1980,8 +1977,6 @@ UNWIND_CFLAGS UNWIND_LIBS SDL2_CFLAGS SDL2_LIBS -FAUDIO_CFLAGS -FAUDIO_LIBS CAPI20_CFLAGS CAPI20_LIBS CUPS_CFLAGS @@ -2649,7 +2644,6 @@ Optional Packages: --without-coreaudio do not use the CoreAudio sound support --without-cups do not use CUPS --without-dbus do not use DBus (dynamic device support) - --without-faudio do not use FAudio (XAudio2 support) --with-float-abi=abi specify the ABI (soft|softfp|hard) for ARM platforms --without-fontconfig do not use fontconfig --without-freetype do not use the FreeType library @@ -2803,9 +2797,6 @@ Some influential environment variables: UNWIND_LIBS Linker flags for libunwind, overriding pkg-config SDL2_CFLAGS C compiler flags for sdl2, overriding pkg-config SDL2_LIBS Linker flags for sdl2, overriding pkg-config - FAUDIO_CFLAGS - C compiler flags for FAudio, overriding pkg-config - FAUDIO_LIBS Linker flags for FAudio, overriding pkg-config CAPI20_CFLAGS C compiler flags for capi20, overriding pkg-config CAPI20_LIBS Linker flags for capi20, overriding pkg-config @@ -4038,12 +4029,6 @@ if test "${with_dbus+set}" = set; then : fi -# Check whether --with-faudio was given. -if test "${with_faudio+set}" = set; then : - withval=$with_faudio; -fi - - # Check whether --with-float-abi was given. if test "${with_float_abi+set}" = set; then : withval=$with_float_abi; @@ -14679,123 +14664,6 @@ esac fi -if test "x$with_faudio" != "xno" -then - if ${FAUDIO_CFLAGS:+false} :; then : - if ${PKG_CONFIG+:} false; then : - FAUDIO_CFLAGS=`$PKG_CONFIG --cflags FAudio 2>/dev/null` -fi -fi - -if ${FAUDIO_LIBS:+false} :; then : - if ${PKG_CONFIG+:} false; then : - FAUDIO_LIBS=`$PKG_CONFIG --libs FAudio 2>/dev/null` -fi -fi - -FAUDIO_LIBS=${FAUDIO_LIBS:-"-lFAudio"} -$as_echo "$as_me:${as_lineno-$LINENO}: FAudio cflags: $FAUDIO_CFLAGS" >&5 -$as_echo "$as_me:${as_lineno-$LINENO}: FAudio libs: $FAUDIO_LIBS" >&5 -ac_save_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $FAUDIO_CFLAGS" -for ac_header in FAudio.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "FAudio.h" "ac_cv_header_FAudio_h" "$ac_includes_default" -if test "x$ac_cv_header_FAudio_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FAUDIO_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lFAudio" >&5 -$as_echo_n "checking for -lFAudio... " >&6; } -if ${ac_cv_lib_soname_FAudio+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_soname_save_LIBS=$LIBS -LIBS="-lFAudio $FAUDIO_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char FAudioCreate (); -int -main () -{ -return FAudioCreate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - case "$LIBEXT" in - dll) ac_cv_lib_soname_FAudio=`$ac_cv_path_LDD conftest.exe | grep "FAudio" | sed -e "s/dll.*/dll/"';2,$d'` ;; - dylib) ac_cv_lib_soname_FAudio=`$OTOOL -L conftest$ac_exeext | grep "libFAudio*\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libFAudio*\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;; - *) ac_cv_lib_soname_FAudio=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libFAudio*\\.$LIBEXT" | sed -e "s/^.*\\[\\(libFAudio*\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'` - if ${ac_cv_lib_soname_FAudio:+false} :; then : - ac_cv_lib_soname_FAudio=`$LDD conftest$ac_exeext | grep "libFAudio*\\.$LIBEXT" | sed -e "s/^.*\(libFAudio*\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` -fi ;; - esac -else - ac_cv_lib_soname_FAudio= -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_soname_save_LIBS -fi -if ${ac_cv_lib_soname_FAudio:+false} :; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_FAudio" >&5 -$as_echo "$ac_cv_lib_soname_FAudio" >&6; } - -cat >>confdefs.h <<_ACEOF -#define SONAME_LIBFAUDIO "$ac_cv_lib_soname_FAudio" -_ACEOF - - -fi -fi - -done - - ac_wine_check_funcs_save_LIBS="$LIBS" -LIBS="$LIBS $FAUDIO_LIBS" -for ac_func in FAudio_CommitOperationSet \ - F3DAudioInitialize8 \ - 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -LIBS="$ac_wine_check_funcs_save_LIBS" - -CPPFLAGS=$ac_save_CPPFLAGS - -fi -if test "x$ac_cv_lib_soname_FAudio" = "x"; then : - case "x$with_faudio" in - x) as_fn_append wine_notices "|libFAudio ${notice_platform}development files not found, XAudio2 won't be supported." ;; - xno) ;; - *) as_fn_error $? "libFAudio ${notice_platform}development files not found, XAudio2 won't be supported. -This is an error since --with-faudio was requested." "$LINENO" 5 ;; -esac - -fi - if test "x$with_capi" != "xno" then if ${CAPI20_CFLAGS:+false} :; then : @@ -15499,45 +15367,6 @@ esac enable_openal32=${enable_openal32:-no} fi -if test "x$ac_cv_lib_soname_FAudio" = "x" -then - enable_x3daudio1_0=${enable_x3daudio1_0:-no} - enable_x3daudio1_1=${enable_x3daudio1_1:-no} - enable_x3daudio1_2=${enable_x3daudio1_2:-no} - enable_x3daudio1_3=${enable_x3daudio1_3:-no} - enable_x3daudio1_4=${enable_x3daudio1_4:-no} - enable_x3daudio1_5=${enable_x3daudio1_5:-no} - enable_x3daudio1_6=${enable_x3daudio1_6:-no} - enable_x3daudio1_7=${enable_x3daudio1_7:-no} - enable_xactengine2_0=${enable_xactengine2_0:-no} - enable_xactengine2_4=${enable_xactengine2_4:-no} - enable_xactengine2_7=${enable_xactengine2_7:-no} - enable_xactengine2_9=${enable_xactengine2_9:-no} - enable_xactengine3_0=${enable_xactengine3_0:-no} - enable_xactengine3_1=${enable_xactengine3_1:-no} - enable_xactengine3_2=${enable_xactengine3_2:-no} - enable_xactengine3_3=${enable_xactengine3_3:-no} - enable_xactengine3_4=${enable_xactengine3_4:-no} - enable_xactengine3_5=${enable_xactengine3_5:-no} - enable_xactengine3_6=${enable_xactengine3_6:-no} - enable_xactengine3_7=${enable_xactengine3_7:-no} - enable_xapofx1_1=${enable_xapofx1_1:-no} - enable_xapofx1_2=${enable_xapofx1_2:-no} - enable_xapofx1_3=${enable_xapofx1_3:-no} - enable_xapofx1_4=${enable_xapofx1_4:-no} - enable_xapofx1_5=${enable_xapofx1_5:-no} - enable_xaudio2_0=${enable_xaudio2_0:-no} - enable_xaudio2_1=${enable_xaudio2_1:-no} - enable_xaudio2_2=${enable_xaudio2_2:-no} - enable_xaudio2_3=${enable_xaudio2_3:-no} - enable_xaudio2_4=${enable_xaudio2_4:-no} - enable_xaudio2_5=${enable_xaudio2_5:-no} - enable_xaudio2_6=${enable_xaudio2_6:-no} - enable_xaudio2_7=${enable_xaudio2_7:-no} - enable_xaudio2_8=${enable_xaudio2_8:-no} - enable_xaudio2_9=${enable_xaudio2_9:-no} -fi - if test "$ac_cv_header_libprocstat_h" = "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for procstat_open_sysctl in -lprocstat" >&5 @@ -18838,8 +18667,6 @@ UNWIND_CFLAGS = $UNWIND_CFLAGS UNWIND_LIBS = $UNWIND_LIBS SDL2_CFLAGS = $SDL2_CFLAGS SDL2_LIBS = $SDL2_LIBS -FAUDIO_CFLAGS = $FAUDIO_CFLAGS -FAUDIO_LIBS = $FAUDIO_LIBS CAPI20_CFLAGS = $CAPI20_CFLAGS CAPI20_LIBS = $CAPI20_LIBS CUPS_CFLAGS = $CUPS_CFLAGS diff --git a/configure.ac b/configure.ac index f1f52fe69dc..5b2f8341cfb 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,6 @@ AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the Core [if test "x$withval" = "xno"; then ac_cv_header_CoreAudio_CoreAudio_h=no; fi]) AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS])) AC_ARG_WITH(dbus, AS_HELP_STRING([--without-dbus],[do not use DBus (dynamic device support)])) -AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAudio2 support)])) AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms])) AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig])) AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library])) @@ -1610,21 +1609,6 @@ fi WINE_NOTICE_WITH(sdl,[test "x$ac_cv_lib_soname_SDL2" = "x"], [libSDL2 ${notice_platform}development files not found, SDL2 won't be supported.]) -dnl **** Check for FAudio **** -if test "x$with_faudio" != "xno" -then - WINE_PACKAGE_FLAGS(FAUDIO,[FAudio],[-lFAudio],,, - [AC_CHECK_HEADERS([FAudio.h], - [WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])]) - WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \ - F3DAudioInitialize8 \ - FAudioLinkedVersion \ - FAudioCreateReverb9WithCustomAllocatorEXT], [$FAUDIO_LIBS]) - ]) -fi -WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"], - [libFAudio ${notice_platform}development files not found, XAudio2 won't be supported.]) - dnl **** Check for capi4linux **** if test "x$with_capi" != "xno" then @@ -1733,45 +1717,6 @@ WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes], [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.], [enable_openal32]) -if test "x$ac_cv_lib_soname_FAudio" = "x" -then - enable_x3daudio1_0=${enable_x3daudio1_0:-no} - enable_x3daudio1_1=${enable_x3daudio1_1:-no} - enable_x3daudio1_2=${enable_x3daudio1_2:-no} - enable_x3daudio1_3=${enable_x3daudio1_3:-no} - enable_x3daudio1_4=${enable_x3daudio1_4:-no} - enable_x3daudio1_5=${enable_x3daudio1_5:-no} - enable_x3daudio1_6=${enable_x3daudio1_6:-no} - enable_x3daudio1_7=${enable_x3daudio1_7:-no} - enable_xactengine2_0=${enable_xactengine2_0:-no} - enable_xactengine2_4=${enable_xactengine2_4:-no} - enable_xactengine2_7=${enable_xactengine2_7:-no} - enable_xactengine2_9=${enable_xactengine2_9:-no} - enable_xactengine3_0=${enable_xactengine3_0:-no} - enable_xactengine3_1=${enable_xactengine3_1:-no} - enable_xactengine3_2=${enable_xactengine3_2:-no} - enable_xactengine3_3=${enable_xactengine3_3:-no} - enable_xactengine3_4=${enable_xactengine3_4:-no} - enable_xactengine3_5=${enable_xactengine3_5:-no} - enable_xactengine3_6=${enable_xactengine3_6:-no} - enable_xactengine3_7=${enable_xactengine3_7:-no} - enable_xapofx1_1=${enable_xapofx1_1:-no} - enable_xapofx1_2=${enable_xapofx1_2:-no} - enable_xapofx1_3=${enable_xapofx1_3:-no} - enable_xapofx1_4=${enable_xapofx1_4:-no} - enable_xapofx1_5=${enable_xapofx1_5:-no} - enable_xaudio2_0=${enable_xaudio2_0:-no} - enable_xaudio2_1=${enable_xaudio2_1:-no} - enable_xaudio2_2=${enable_xaudio2_2:-no} - enable_xaudio2_3=${enable_xaudio2_3:-no} - enable_xaudio2_4=${enable_xaudio2_4:-no} - enable_xaudio2_5=${enable_xaudio2_5:-no} - enable_xaudio2_6=${enable_xaudio2_6:-no} - enable_xaudio2_7=${enable_xaudio2_7:-no} - enable_xaudio2_8=${enable_xaudio2_8:-no} - enable_xaudio2_9=${enable_xaudio2_9:-no} -fi - dnl **** Check for libprocstat **** if test "$ac_cv_header_libprocstat_h" = "yes" then diff --git a/dlls/x3daudio1_0/Makefile.in b/dlls/x3daudio1_0/Makefile.in index 7293aa43c24..7e6bba4a018 100644 --- a/dlls/x3daudio1_0/Makefile.in +++ b/dlls/x3daudio1_0/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=0 -DXAUDIO2_VER=0 MODULE = x3daudio1_0.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_1/Makefile.in b/dlls/x3daudio1_1/Makefile.in index 05ab3b81ef7..c1a1e0aa647 100644 --- a/dlls/x3daudio1_1/Makefile.in +++ b/dlls/x3daudio1_1/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=1 -DXAUDIO2_VER=1 MODULE = x3daudio1_1.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_2/Makefile.in b/dlls/x3daudio1_2/Makefile.in index c414d7c4a99..603e33e2d31 100644 --- a/dlls/x3daudio1_2/Makefile.in +++ b/dlls/x3daudio1_2/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=2 -DXAUDIO2_VER=2 MODULE = x3daudio1_2.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_3/Makefile.in b/dlls/x3daudio1_3/Makefile.in index 7d0d6ef6698..5bfa657cd9d 100644 --- a/dlls/x3daudio1_3/Makefile.in +++ b/dlls/x3daudio1_3/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=3 -DXAUDIO2_VER=3 MODULE = x3daudio1_3.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_4/Makefile.in b/dlls/x3daudio1_4/Makefile.in index 4a3b38cd4fa..f75f39d8610 100644 --- a/dlls/x3daudio1_4/Makefile.in +++ b/dlls/x3daudio1_4/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=4 -DXAUDIO2_VER=4 MODULE = x3daudio1_4.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_5/Makefile.in b/dlls/x3daudio1_5/Makefile.in index 50aefbeb21a..fcb6e2866b2 100644 --- a/dlls/x3daudio1_5/Makefile.in +++ b/dlls/x3daudio1_5/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=5 -DXAUDIO2_VER=5 MODULE = x3daudio1_5.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_6/Makefile.in b/dlls/x3daudio1_6/Makefile.in index 1b1e6b1bed6..896bab407b2 100644 --- a/dlls/x3daudio1_6/Makefile.in +++ b/dlls/x3daudio1_6/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=6 -DXAUDIO2_VER=6 MODULE = x3daudio1_6.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in index 499530371bf..c6a8ed5102a 100644 --- a/dlls/x3daudio1_7/Makefile.in +++ b/dlls/x3daudio1_7/Makefile.in @@ -1,10 +1,8 @@ EXTRADEFS = -DX3DAUDIO1_VER=7 -DXAUDIO2_VER=7 MODULE = x3daudio1_7.dll PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ x3daudio.c diff --git a/dlls/xactengine2_0/Makefile.in b/dlls/xactengine2_0/Makefile.in index 11e10218b1e..5c4b635b060 100644 --- a/dlls/xactengine2_0/Makefile.in +++ b/dlls/xactengine2_0/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine2_0.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0200 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine2_4/Makefile.in b/dlls/xactengine2_4/Makefile.in index a1b75fbbd51..2b5fd547b61 100644 --- a/dlls/xactengine2_4/Makefile.in +++ b/dlls/xactengine2_4/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine2_4.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0204 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine2_7/Makefile.in b/dlls/xactengine2_7/Makefile.in index 1b349fd4d77..6861555b23b 100644 --- a/dlls/xactengine2_7/Makefile.in +++ b/dlls/xactengine2_7/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine2_7.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0207 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine2_9/Makefile.in b/dlls/xactengine2_9/Makefile.in index 961a38091f8..e5f8c83e962 100644 --- a/dlls/xactengine2_9/Makefile.in +++ b/dlls/xactengine2_9/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine2_9.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0209 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_0/Makefile.in b/dlls/xactengine3_0/Makefile.in index 966ecb11236..10259e44ee0 100644 --- a/dlls/xactengine3_0/Makefile.in +++ b/dlls/xactengine3_0/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_0.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0300 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_1/Makefile.in b/dlls/xactengine3_1/Makefile.in index 4d6b05ba76f..3105c3443bd 100644 --- a/dlls/xactengine3_1/Makefile.in +++ b/dlls/xactengine3_1/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_1.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0301 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_2/Makefile.in b/dlls/xactengine3_2/Makefile.in index a08a4e383d2..92481ba1e26 100644 --- a/dlls/xactengine3_2/Makefile.in +++ b/dlls/xactengine3_2/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_2.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0302 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_3/Makefile.in b/dlls/xactengine3_3/Makefile.in index f34f0777500..1963f033557 100644 --- a/dlls/xactengine3_3/Makefile.in +++ b/dlls/xactengine3_3/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_3.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0303 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_4/Makefile.in b/dlls/xactengine3_4/Makefile.in index ce48a588148..5d639c4e7ad 100644 --- a/dlls/xactengine3_4/Makefile.in +++ b/dlls/xactengine3_4/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_4.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0304 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_5/Makefile.in b/dlls/xactengine3_5/Makefile.in index 559303ffa34..47731dd7017 100644 --- a/dlls/xactengine3_5/Makefile.in +++ b/dlls/xactengine3_5/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_5.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0305 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_6/Makefile.in b/dlls/xactengine3_6/Makefile.in index 13845987d5d..b0e235ecd08 100644 --- a/dlls/xactengine3_6/Makefile.in +++ b/dlls/xactengine3_6/Makefile.in @@ -1,11 +1,8 @@ MODULE = xactengine3_6.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0306 PARENTSRC = ../xactengine3_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_7/Makefile.in b/dlls/xactengine3_7/Makefile.in index 46c8791097b..128a41cf59a 100644 --- a/dlls/xactengine3_7/Makefile.in +++ b/dlls/xactengine3_7/Makefile.in @@ -1,10 +1,7 @@ MODULE = xactengine3_7.dll -IMPORTS = ole32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) EXTRADEFS = -DXACT3_VER=0x0307 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xact_dll.c diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index 231ef753f22..18608037ffb 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -16,21 +16,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include #define NONAMELESSUNION #define COBJMACROS +#include "objbase.h" -#include "initguid.h" #if XACT3_VER < 0x0300 +#include "xact2wb.h" +#include "initguid.h" #include "xact.h" #else +#include "xact3wb.h" +#include "xaudio2.h" +#include "initguid.h" #include "xact3.h" #endif -#include "rpcproxy.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(xact3); @@ -1464,11 +1466,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinstDLL ); - -#ifdef HAVE_FAUDIOLINKEDVERSION TRACE("Using FAudio version %d\n", FAudioLinkedVersion() ); -#endif - break; } return TRUE; diff --git a/dlls/xapofx1_1/Makefile.in b/dlls/xapofx1_1/Makefile.in index 26b956a22fe..1eb2e2210c0 100644 --- a/dlls/xapofx1_1/Makefile.in +++ b/dlls/xapofx1_1/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAPOFX1_VER=1 -DXAUDIO2_VER=2 MODULE = xapofx1_1.dll -IMPORTS = ole32 +IMPORTS = $(FAUDIO_PE_LIBS) ole32 +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xapo.c \ diff --git a/dlls/xapofx1_2/Makefile.in b/dlls/xapofx1_2/Makefile.in index 704dff657f8..38db115b39a 100644 --- a/dlls/xapofx1_2/Makefile.in +++ b/dlls/xapofx1_2/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAPOFX1_VER=2 -DXAUDIO2_VER=3 MODULE = xapofx1_2.dll -IMPORTS = ole32 +IMPORTS = $(FAUDIO_PE_LIBS) ole32 +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xapo.c \ diff --git a/dlls/xapofx1_3/Makefile.in b/dlls/xapofx1_3/Makefile.in index 2bf695adf1b..409fc9ad55b 100644 --- a/dlls/xapofx1_3/Makefile.in +++ b/dlls/xapofx1_3/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAPOFX1_VER=3 -DXAUDIO2_VER=4 MODULE = xapofx1_3.dll -IMPORTS = ole32 +IMPORTS = $(FAUDIO_PE_LIBS) ole32 +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xapo.c \ diff --git a/dlls/xapofx1_4/Makefile.in b/dlls/xapofx1_4/Makefile.in index 3ccf999af56..63eccff64b0 100644 --- a/dlls/xapofx1_4/Makefile.in +++ b/dlls/xapofx1_4/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAPOFX1_VER=4 -DXAUDIO2_VER=6 MODULE = xapofx1_4.dll -IMPORTS = ole32 +IMPORTS = $(FAUDIO_PE_LIBS) ole32 +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xapo.c \ diff --git a/dlls/xapofx1_5/Makefile.in b/dlls/xapofx1_5/Makefile.in index 56fa94c59a6..fc692d781db 100644 --- a/dlls/xapofx1_5/Makefile.in +++ b/dlls/xapofx1_5/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAPOFX1_VER=5 -DXAUDIO2_VER=7 MODULE = xapofx1_5.dll -IMPORTS = ole32 +IMPORTS = $(FAUDIO_PE_LIBS) ole32 +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ xapo.c \ diff --git a/dlls/xaudio2_0/Makefile.in b/dlls/xaudio2_0/Makefile.in index a72ce351fc4..860e03e716f 100644 --- a/dlls/xaudio2_0/Makefile.in +++ b/dlls/xaudio2_0/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=0 MODULE = xaudio2_0.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_1/Makefile.in b/dlls/xaudio2_1/Makefile.in index 273140c6385..fa942761308 100644 --- a/dlls/xaudio2_1/Makefile.in +++ b/dlls/xaudio2_1/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=1 MODULE = xaudio2_1.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_2/Makefile.in b/dlls/xaudio2_2/Makefile.in index 5a43e66886c..26eee0a6f31 100644 --- a/dlls/xaudio2_2/Makefile.in +++ b/dlls/xaudio2_2/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=2 MODULE = xaudio2_2.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_3/Makefile.in b/dlls/xaudio2_3/Makefile.in index ab8587b66fc..f6c555a9a3b 100644 --- a/dlls/xaudio2_3/Makefile.in +++ b/dlls/xaudio2_3/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=3 MODULE = xaudio2_3.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_4/Makefile.in b/dlls/xaudio2_4/Makefile.in index f74cbb37a0a..33bd0c155db 100644 --- a/dlls/xaudio2_4/Makefile.in +++ b/dlls/xaudio2_4/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=4 MODULE = xaudio2_4.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_5/Makefile.in b/dlls/xaudio2_5/Makefile.in index c3424c7ae2c..c4035aeb13f 100644 --- a/dlls/xaudio2_5/Makefile.in +++ b/dlls/xaudio2_5/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=5 MODULE = xaudio2_5.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_6/Makefile.in b/dlls/xaudio2_6/Makefile.in index 0e902590794..dbe2ae7829f 100644 --- a/dlls/xaudio2_6/Makefile.in +++ b/dlls/xaudio2_6/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=6 MODULE = xaudio2_6.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_7/Makefile.in b/dlls/xaudio2_7/Makefile.in index fd7f5bedc5f..ef3987b693e 100644 --- a/dlls/xaudio2_7/Makefile.in +++ b/dlls/xaudio2_7/Makefile.in @@ -1,10 +1,7 @@ EXTRADEFS = -DXAUDIO2_VER=7 MODULE = xaudio2_7.dll -IMPORTS = advapi32 ole32 user32 uuid -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_7/compat.c b/dlls/xaudio2_7/compat.c index c4538ae3677..5bda1fa97f9 100644 --- a/dlls/xaudio2_7/compat.c +++ b/dlls/xaudio2_7/compat.c @@ -89,8 +89,6 @@ * Add SideDelay member to XAUDIO2FX_REVERB_PARAMETERS */ -#include "config.h" - #define NONAMELESSUNION #define NONAMELESSSTRUCT #define COBJMACROS @@ -2162,16 +2160,6 @@ static HRESULT WINAPI XA20_CreateMasteringVoice(IXAudio20 *iface, This->mst.effect_chain = wrap_effect_chain(pEffectChain); - pthread_mutex_lock(&This->mst.engine_lock); - - This->mst.engine_thread = CreateThread(NULL, 0, &engine_thread, &This->mst, 0, NULL); - - pthread_cond_wait(&This->mst.engine_done, &This->mst.engine_lock); - - pthread_mutex_unlock(&This->mst.engine_lock); - - FAudio_SetEngineProcedureEXT(This->faudio, &engine_cb, &This->mst); - FAudio_CreateMasteringVoice(This->faudio, &This->mst.faudio_voice, inputChannels, inputSampleRate, flags, deviceIndex, This->mst.effect_chain); @@ -2397,16 +2385,6 @@ static HRESULT WINAPI XA22_CreateMasteringVoice(IXAudio22 *iface, This->mst.effect_chain = wrap_effect_chain(pEffectChain); - pthread_mutex_lock(&This->mst.engine_lock); - - This->mst.engine_thread = CreateThread(NULL, 0, &engine_thread, &This->mst, 0, NULL); - - pthread_cond_wait(&This->mst.engine_done, &This->mst.engine_lock); - - pthread_mutex_unlock(&This->mst.engine_lock); - - FAudio_SetEngineProcedureEXT(This->faudio, &engine_cb, &This->mst); - FAudio_CreateMasteringVoice(This->faudio, &This->mst.faudio_voice, inputChannels, inputSampleRate, flags, deviceIndex, This->mst.effect_chain); @@ -2631,16 +2609,6 @@ static HRESULT WINAPI XA23_CreateMasteringVoice(IXAudio23 *iface, This->mst.effect_chain = wrap_effect_chain(pEffectChain); - pthread_mutex_lock(&This->mst.engine_lock); - - This->mst.engine_thread = CreateThread(NULL, 0, &engine_thread, &This->mst, 0, NULL); - - pthread_cond_wait(&This->mst.engine_done, &This->mst.engine_lock); - - pthread_mutex_unlock(&This->mst.engine_lock); - - FAudio_SetEngineProcedureEXT(This->faudio, &engine_cb, &This->mst); - FAudio_CreateMasteringVoice(This->faudio, &This->mst.faudio_voice, inputChannels, inputSampleRate, flags, deviceIndex, This->mst.effect_chain); @@ -2819,16 +2787,6 @@ static HRESULT WINAPI XA27_CreateMasteringVoice(IXAudio27 *iface, This->mst.effect_chain = wrap_effect_chain(pEffectChain); - pthread_mutex_lock(&This->mst.engine_lock); - - This->mst.engine_thread = CreateThread(NULL, 0, &engine_thread, &This->mst, 0, NULL); - - pthread_cond_wait(&This->mst.engine_done, &This->mst.engine_lock); - - pthread_mutex_unlock(&This->mst.engine_lock); - - FAudio_SetEngineProcedureEXT(This->faudio, &engine_cb, &This->mst); - FAudio_CreateMasteringVoice(This->faudio, &This->mst.faudio_voice, inputChannels, inputSampleRate, flags, deviceIndex, This->mst.effect_chain); diff --git a/dlls/xaudio2_7/x3daudio.c b/dlls/xaudio2_7/x3daudio.c index e0a0280c3cd..0c400739050 100644 --- a/dlls/xaudio2_7/x3daudio.c +++ b/dlls/xaudio2_7/x3daudio.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include "windef.h" @@ -38,12 +36,7 @@ HRESULT CDECL X3DAudioInitialize(UINT32 chanmask, float speedofsound, X3DAUDIO_HANDLE handle) { TRACE("0x%x, %f, %p\n", chanmask, speedofsound, handle); -#ifdef HAVE_F3DAUDIOINITIALIZE8 return F3DAudioInitialize8(chanmask, speedofsound, handle); -#else - F3DAudioInitialize(chanmask, speedofsound, handle); - return S_OK; -#endif } #endif /* XAUDIO2_VER >= 8 */ diff --git a/dlls/xaudio2_7/xapo.c b/dlls/xaudio2_7/xapo.c index e47442959d3..657d2f3f507 100644 --- a/dlls/xaudio2_7/xapo.c +++ b/dlls/xaudio2_7/xapo.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define NONAMELESSUNION @@ -313,7 +311,6 @@ 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, @@ -322,16 +319,6 @@ 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) || diff --git a/dlls/xaudio2_7/xapofx.c b/dlls/xaudio2_7/xapofx.c index 4dcdaa2ca5f..d1ded4fab92 100644 --- a/dlls/xaudio2_7/xapofx.c +++ b/dlls/xaudio2_7/xapofx.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define NONAMELESSUNION diff --git a/dlls/xaudio2_7/xaudio_allocator.c b/dlls/xaudio2_7/xaudio_allocator.c index 41be48a80f3..7a86e25f06b 100644 --- a/dlls/xaudio2_7/xaudio_allocator.c +++ b/dlls/xaudio2_7/xaudio_allocator.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define NONAMELESSUNION diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index c9f5dd2f48e..12383896b42 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -18,13 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define NONAMELESSUNION #define COBJMACROS +#include "windows.h" +#include "objbase.h" +#include "mmdeviceapi.h" + #include "initguid.h" #include "xaudio_private.h" #include "xaudio2fx.h" @@ -32,9 +34,6 @@ #include "xapofx.h" #endif -#include "ole2.h" -#include "rpcproxy.h" - #include "wine/asm.h" #include "wine/debug.h" #include "wine/heap.h" @@ -87,9 +86,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinstDLL ); -#ifdef HAVE_FAUDIOLINKEDVERSION TRACE("Using FAudio version %d\n", FAudioLinkedVersion() ); -#endif break; } return TRUE; @@ -1283,13 +1280,6 @@ static void WINAPI XA2M_DestroyVoice(IXAudio2MasteringVoice *iface) EnterCriticalSection(&This->lock); destroy_voice(This); - pthread_mutex_lock(&This->engine_lock); - This->engine_params.proc = NULL; - pthread_cond_broadcast(&This->engine_ready); - pthread_mutex_unlock(&This->engine_lock); - - WaitForSingleObject(This->engine_thread, INFINITE); - This->engine_thread = NULL; LeaveCriticalSection(&This->lock); } @@ -1660,49 +1650,6 @@ static HRESULT WINAPI IXAudio2Impl_CreateSubmixVoice(IXAudio2 *iface, return S_OK; } -/* called thread created by SDL, must not access Wine TEB */ -void engine_cb(FAudioEngineCallEXT proc, FAudio *faudio, float *stream, void *user) -{ - XA2VoiceImpl *This = user; - - pthread_mutex_lock(&This->engine_lock); - - This->engine_params.proc = proc; - This->engine_params.stream = stream; - This->engine_params.faudio = faudio; - - pthread_cond_broadcast(&This->engine_ready); - - while(This->engine_params.proc) - pthread_cond_wait(&This->engine_done, &This->engine_lock); - - pthread_mutex_unlock(&This->engine_lock); -} - -/* wine thread, OK to access TEB, invoke client code, etc */ -DWORD WINAPI engine_thread(void *user) -{ - XA2VoiceImpl *This = user; - - pthread_mutex_lock(&This->engine_lock); - - pthread_cond_broadcast(&This->engine_done); - - do{ - pthread_cond_wait(&This->engine_ready, &This->engine_lock); - - if(This->engine_params.proc){ - This->engine_params.proc(This->engine_params.faudio, This->engine_params.stream); - This->engine_params.proc = NULL; - pthread_cond_broadcast(&This->engine_done); - } - }while(This->in_use); - - pthread_mutex_unlock(&This->engine_lock); - - return 0; -} - static HRESULT WINAPI IXAudio2Impl_CreateMasteringVoice(IXAudio2 *iface, IXAudio2MasteringVoice **ppMasteringVoice, UINT32 inputChannels, UINT32 inputSampleRate, UINT32 flags, const WCHAR *deviceId, @@ -1736,16 +1683,6 @@ static HRESULT WINAPI IXAudio2Impl_CreateMasteringVoice(IXAudio2 *iface, This->mst.effect_chain = wrap_effect_chain(pEffectChain); - pthread_mutex_lock(&This->mst.engine_lock); - - This->mst.engine_thread = CreateThread(NULL, 0, &engine_thread, &This->mst, 0, NULL); - - pthread_cond_wait(&This->mst.engine_done, &This->mst.engine_lock); - - pthread_mutex_unlock(&This->mst.engine_lock); - - FAudio_SetEngineProcedureEXT(This->faudio, &engine_cb, &This->mst); - FAudio_CreateMasteringVoice8(This->faudio, &This->mst.faudio_voice, inputChannels, inputSampleRate, flags, NULL /* TODO: (uint16_t*)deviceId */, This->mst.effect_chain, (FAudioStreamCategory)streamCategory); @@ -1782,11 +1719,7 @@ static HRESULT WINAPI IXAudio2Impl_CommitChanges(IXAudio2 *iface, TRACE("(%p)->(0x%x)\n", This, operationSet); -#ifdef HAVE_FAUDIO_COMMITOPERATIONSET return FAudio_CommitOperationSet(This->faudio, operationSet); -#else - return FAudio_CommitChanges(This->faudio); -#endif } static void WINAPI IXAudio2Impl_GetPerformanceData(IXAudio2 *iface, @@ -1923,10 +1856,6 @@ static HRESULT WINAPI XAudio2CF_CreateInstance(IClassFactory *iface, IUnknown *p InitializeCriticalSection(&object->mst.lock); object->mst.lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": XA2MasteringVoice.lock"); - pthread_mutex_init(&object->mst.engine_lock, NULL); - pthread_cond_init(&object->mst.engine_done, NULL); - pthread_cond_init(&object->mst.engine_ready, NULL); - FAudioCOMConstructWithCustomAllocatorEXT( &object->faudio, XAUDIO2_VER, diff --git a/dlls/xaudio2_7/xaudio_private.h b/dlls/xaudio2_7/xaudio_private.h index 46d842bf4c1..c24bddff80b 100644 --- a/dlls/xaudio2_7/xaudio_private.h +++ b/dlls/xaudio2_7/xaudio_private.h @@ -26,8 +26,6 @@ #include #include -#include - #if XAUDIO2_VER == 0 #define COMPAT_E_INVALID_CALL E_INVALIDARG #define COMPAT_E_DEVICE_INVALIDATED XAUDIO20_E_DEVICE_INVALIDATED @@ -97,10 +95,6 @@ typedef struct _XA2VoiceImpl { float *stream; } engine_params; - HANDLE engine_thread; - pthread_cond_t engine_done, engine_ready; - pthread_mutex_t engine_lock; - struct list entry; } XA2VoiceImpl; diff --git a/dlls/xaudio2_8/Makefile.in b/dlls/xaudio2_8/Makefile.in index cc8d2e67da3..3e00abd892d 100644 --- a/dlls/xaudio2_8/Makefile.in +++ b/dlls/xaudio2_8/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=8 MODULE = xaudio2_8.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/dlls/xaudio2_9/Makefile.in b/dlls/xaudio2_9/Makefile.in index 75a428f6c25..eb299816b55 100644 --- a/dlls/xaudio2_9/Makefile.in +++ b/dlls/xaudio2_9/Makefile.in @@ -1,11 +1,8 @@ EXTRADEFS = -DXAUDIO2_VER=9 MODULE = xaudio2_9.dll -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = $(FAUDIO_PE_LIBS) advapi32 ole32 user32 uuid +EXTRAINCL = $(FAUDIO_PE_CFLAGS) PARENTSRC = ../xaudio2_7 -EXTRALIBS = $(FAUDIO_LIBS) -EXTRAINCL = $(FAUDIO_CFLAGS) - -EXTRADLLFLAGS = -mcygwin C_SRCS = \ compat.c \ diff --git a/include/config.h.in b/include/config.h.in index 9493574d2d7..bd9e37235cd 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -68,22 +68,6 @@ /* Define to 1 if you have the `epoll_create' function. */ #undef HAVE_EPOLL_CREATE -/* Define to 1 if you have the `F3DAudioInitialize8' function. */ -#undef HAVE_F3DAUDIOINITIALIZE8 - -/* Define to 1 if you have the `FAudioCreateReverb9WithCustomAllocatorEXT' - function. */ -#undef HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT - -/* Define to 1 if you have the `FAudioLinkedVersion' function. */ -#undef HAVE_FAUDIOLINKEDVERSION - -/* Define to 1 if you have the `FAudio_CommitOperationSet' function. */ -#undef HAVE_FAUDIO_COMMITOPERATIONSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_FAUDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H @@ -914,9 +898,6 @@ /* Define to the soname of the libEGL library. */ #undef SONAME_LIBEGL -/* Define to the soname of the libFAudio library. */ -#undef SONAME_LIBFAUDIO - /* Define to the soname of the libfontconfig library. */ #undef SONAME_LIBFONTCONFIG