[PATCH 2/7] dsound: Add support for loading openal
Maarten Lankhorst
m.b.lankhorst at gmail.com
Thu Dec 3 03:07:02 CST 2009
---
configure | 236 ++++++++++++++++++++++++---------------
configure.ac | 8 +-
dlls/dsound/Makefile.in | 1 +
dlls/dsound/capture.c | 11 +-
dlls/dsound/dsound_main.c | 253 ++++++++++++++++++++++++++++++++++++++++-
dlls/dsound/dsound_private.h | 127 +++++++++++++++++++++-
dlls/openal32/Makefile.in | 2 +-
include/config.h.in | 58 ++++++-----
8 files changed, 558 insertions(+), 138 deletions(-)
diff --git a/configure b/configure
index 90e2379..da4b0f8 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,14 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for Wine 1.1.33.
+# Generated by GNU Autoconf 2.65 for Wine 1.1.33.
#
# Report bugs to <wine-devel at winehq.org>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -527,7 +529,8 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -617,6 +620,7 @@ LDPATH
BUILTINFLAG
EXTRACFLAGS
LIBKSTAT
+LIBOPENAL
LIBMPG123
PNGINCL
FONTCONFIGINCL
@@ -654,7 +658,7 @@ CROSSTARGETFLAGS
CROSSTEST
CROSSCC
CARBONLIB
-LIBOPENAL
+FRAMEWORK_OPENAL
COREAUDIO
DISKARBITRATIONLIB
LDEXECFLAGS
@@ -1506,7 +1510,7 @@ Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
@@ -1581,7 +1585,7 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Wine configure 1.1.33
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -1628,7 +1632,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1666,7 +1670,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -1712,7 +1716,7 @@ fi
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1749,7 +1753,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1884,7 +1888,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2101,7 +2105,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Wine $as_me 1.1.33, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2354,7 +2358,7 @@ fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -2363,9 +2367,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -3175,32 +3179,30 @@ $as_echo "$ac_try_echo"; } >&5
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -3262,10 +3264,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -3273,51 +3275,18 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -3350,13 +3319,72 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -3750,8 +3778,8 @@ $as_echo "$ac_try_echo"; } >&5
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -6501,7 +6529,12 @@ fi
fi
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
- LIBOPENAL="-framework OpenAL"
+ FRAMEWORK_OPENAL="-framework OpenAL"
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENAL 1
+_ACEOF
ac_cv_lib_openal_alGetSource3i=yes
fi
@@ -11278,14 +11311,14 @@ test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_wine
if test "$ac_cv_header_AL_al_h" = "yes"
then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alGetSource3i in -lopenal" >&5
-$as_echo_n "checking for alGetSource3i in -lopenal... " >&6; }
-if test "${ac_cv_lib_openal_alGetSource3i+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lopenal" >&5
+$as_echo_n "checking for -lopenal... " >&6; }
+if test "${ac_cv_lib_soname_openal+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
+ ac_check_soname_save_LIBS=$LIBS
LIBS="-lopenal $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -11304,27 +11337,42 @@ return alGetSource3i ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_openal_alGetSource3i=yes
-else
- ac_cv_lib_openal_alGetSource3i=no
+ case "$LIBEXT" in
+ dll) ;;
+ dylib) ac_cv_lib_soname_openal=`otool -L conftest$ac_exeext | grep "libopenal\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libopenal\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
+ *) ac_cv_lib_soname_openal=`$ac_cv_path_LDD conftest$ac_exeext | grep "libopenal\\.$LIBEXT" | sed -e "s/^.*\(libopenal\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
+ esac
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ LIBS=$ac_check_soname_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openal_alGetSource3i" >&5
-$as_echo "$ac_cv_lib_openal_alGetSource3i" >&6; }
-if test "x$ac_cv_lib_openal_alGetSource3i" = x""yes; then :
- LIBOPENAL="-lopenal"
+if test "x$ac_cv_lib_soname_openal" = "x"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
-fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_openal" >&5
+$as_echo "$ac_cv_lib_soname_openal" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define SONAME_LIBOPENAL "$ac_cv_lib_soname_openal"
+_ACEOF
+
+ LIBOPENAL="-lopenal"
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENAL 1
+_ACEOF
+
+fi
fi
if test "x$ac_cv_lib_openal_alGetSource3i" != xyes; then :
case "x$with_openal" in
- x) wine_notices="$wine_notices|libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported." ;;
+ x) wine_notices="$wine_notices|libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported, and DirectSound will not be available." ;;
xno) ;;
- *) as_fn_error "libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.
+ *) as_fn_error "libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported, and DirectSound will not be available.
This is an error since --with-openal was requested." "$LINENO" 5 ;;
esac
fi
@@ -18620,7 +18668,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by Wine $as_me 1.1.33, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -18660,6 +18708,7 @@ Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -18683,10 +18732,11 @@ Wine home page: <http://www.winehq.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Wine config.status 1.1.33
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -18722,6 +18772,8 @@ do
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -19471,7 +19523,7 @@ s/'"$ac_delim"'$//
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -19485,7 +19537,7 @@ s/.\{148\}//
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
diff --git a/configure.ac b/configure.ac
index 6e4d892..501ba01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,7 +633,8 @@ case $host_os in
fi
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
- AC_SUBST(LIBOPENAL,"-framework OpenAL")
+ AC_SUBST(FRAMEWORK_OPENAL,"-framework OpenAL")
+ AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])
ac_cv_lib_openal_alGetSource3i=yes
fi
if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes"
@@ -1432,10 +1433,11 @@ test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_winemp3_acm=${enable_wine
dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes"
then
- AC_CHECK_LIB(openal,alGetSource3i,[AC_SUBST(LIBOPENAL,"-lopenal")])
+ WINE_CHECK_SONAME(openal,alGetSource3i,[AC_SUBST(LIBOPENAL,"-lopenal")
+ AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
fi
WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal_alGetSource3i" != xyes],
- [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.])
+ [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported, and DirectSound will not be available.])
test "x$ac_cv_lib_openal_alGetSource3i" = xyes || enable_openal32=${enable_openal32:-no}
dnl **** Check for libkstat ****
diff --git a/dlls/dsound/Makefile.in b/dlls/dsound/Makefile.in
index 0b370dc..769927a 100644
--- a/dlls/dsound/Makefile.in
+++ b/dlls/dsound/Makefile.in
@@ -5,6 +5,7 @@ VPATH = @srcdir@
MODULE = dsound.dll
IMPORTLIB = dsound
IMPORTS = dxguid uuid winmm ole32 advapi32 kernel32 ntdll
+EXTRALIBS = @FRAMEWORK_OPENAL@
C_SRCS = \
buffer.c \
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index 26c86b8..f2a26bc 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -1059,13 +1059,10 @@ static HRESULT DirectSoundCaptureDevice_Initialize(
return DSERR_NODRIVER;
}
- /* enumerate WINMM audio devices and find the one we want */
- for (wid=0; wid<widn; wid++) {
- if (IsEqualGUID( &devGUID, &DSOUND_capture_guids[wid]) ) {
- found = TRUE;
- break;
- }
- }
+ wid = devGUID.Data4[7];
+ if (!memcmp(&devGUID, &DSOUND_capture_guid, sizeof(GUID)-1)
+ && wid < widn)
+ found = TRUE;
if (found == FALSE) {
WARN("No device found matching given ID!\n");
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index f52a6e9..f138265 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -32,7 +32,10 @@
* Remove DS_HEL_FRAGS and use mixer fragment length for it
*/
+#include "config.h"
+#include "wine/port.h"
#include <stdarg.h>
+#include "wine/library.h"
#define COBJMACROS
#define NONAMELESSSTRUCT
@@ -59,7 +62,237 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
DirectSoundDevice* DSOUND_renderer[MAXWAVEDRIVERS];
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
-GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
+GUID DSOUND_capture_guid = { 0xbd6dd71b, 0x3deb, 0x11d1, { 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 } };
+
+#ifdef HAVE_OPENAL
+
+static CRITICAL_SECTION_DEBUG openal_crst_debug =
+{
+ 0, 0, &openal_crst,
+ { &openal_crst_debug.ProcessLocksList,
+ &openal_crst_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": openal_crst_debug") }
+};
+CRITICAL_SECTION openal_crst = { &openal_crst_debug, -1, 0, 0, 0, 0 };
+
+static void *openal_handle = RTLD_DEFAULT;
+int openal_loaded = 0;
+LPALCCREATECONTEXT palcCreateContext = NULL;
+LPALCMAKECONTEXTCURRENT palcMakeContextCurrent = NULL;
+LPALCPROCESSCONTEXT palcProcessContext = NULL;
+LPALCSUSPENDCONTEXT palcSuspendContext = NULL;
+LPALCDESTROYCONTEXT palcDestroyContext = NULL;
+LPALCGETCURRENTCONTEXT palcGetCurrentContext = NULL;
+LPALCGETCONTEXTSDEVICE palcGetContextsDevice = NULL;
+LPALCOPENDEVICE palcOpenDevice = NULL;
+LPALCCLOSEDEVICE palcCloseDevice = NULL;
+LPALCGETERROR palcGetError = NULL;
+LPALCISEXTENSIONPRESENT palcIsExtensionPresent = NULL;
+LPALCGETPROCADDRESS palcGetProcAddress = NULL;
+LPALCGETENUMVALUE palcGetEnumValue = NULL;
+LPALCGETSTRING palcGetString = NULL;
+LPALCGETINTEGERV palcGetIntegerv = NULL;
+LPALCCAPTUREOPENDEVICE palcCaptureOpenDevice = NULL;
+LPALCCAPTURECLOSEDEVICE palcCaptureCloseDevice = NULL;
+LPALCCAPTURESTART palcCaptureStart = NULL;
+LPALCCAPTURESTOP palcCaptureStop = NULL;
+LPALCCAPTURESAMPLES palcCaptureSamples = NULL;
+LPALENABLE palEnable = NULL;
+LPALDISABLE palDisable = NULL;
+LPALISENABLED palIsEnabled = NULL;
+LPALGETSTRING palGetString = NULL;
+LPALGETBOOLEANV palGetBooleanv = NULL;
+LPALGETINTEGERV palGetIntegerv = NULL;
+LPALGETFLOATV palGetFloatv = NULL;
+LPALGETDOUBLEV palGetDoublev = NULL;
+LPALGETBOOLEAN palGetBoolean = NULL;
+LPALGETINTEGER palGetInteger = NULL;
+LPALGETFLOAT palGetFloat = NULL;
+LPALGETDOUBLE palGetDouble = NULL;
+LPALGETERROR palGetError = NULL;
+LPALISEXTENSIONPRESENT palIsExtensionPresent = NULL;
+LPALGETPROCADDRESS palGetProcAddress = NULL;
+LPALGETENUMVALUE palGetEnumValue = NULL;
+LPALLISTENERF palListenerf = NULL;
+LPALLISTENER3F palListener3f = NULL;
+LPALLISTENERFV palListenerfv = NULL;
+LPALLISTENERI palListeneri = NULL;
+LPALLISTENER3I palListener3i = NULL;
+LPALLISTENERIV palListeneriv = NULL;
+LPALGETLISTENERF palGetListenerf = NULL;
+LPALGETLISTENER3F palGetListener3f = NULL;
+LPALGETLISTENERFV palGetListenerfv = NULL;
+LPALGETLISTENERI palGetListeneri = NULL;
+LPALGETLISTENER3I palGetListener3i = NULL;
+LPALGETLISTENERIV palGetListeneriv = NULL;
+LPALGENSOURCES palGenSources = NULL;
+LPALDELETESOURCES palDeleteSources = NULL;
+LPALISSOURCE palIsSource = NULL;
+LPALSOURCEF palSourcef = NULL;
+LPALSOURCE3F palSource3f = NULL;
+LPALSOURCEFV palSourcefv = NULL;
+LPALSOURCEI palSourcei = NULL;
+LPALSOURCE3I palSource3i = NULL;
+LPALSOURCEIV palSourceiv = NULL;
+LPALGETSOURCEF palGetSourcef = NULL;
+LPALGETSOURCE3F palGetSource3f = NULL;
+LPALGETSOURCEFV palGetSourcefv = NULL;
+LPALGETSOURCEI palGetSourcei = NULL;
+LPALGETSOURCE3I palGetSource3i = NULL;
+LPALGETSOURCEIV palGetSourceiv = NULL;
+LPALSOURCEPLAYV palSourcePlayv = NULL;
+LPALSOURCESTOPV palSourceStopv = NULL;
+LPALSOURCEREWINDV palSourceRewindv = NULL;
+LPALSOURCEPAUSEV palSourcePausev = NULL;
+LPALSOURCEPLAY palSourcePlay = NULL;
+LPALSOURCESTOP palSourceStop = NULL;
+LPALSOURCEREWIND palSourceRewind = NULL;
+LPALSOURCEPAUSE palSourcePause = NULL;
+LPALSOURCEQUEUEBUFFERS palSourceQueueBuffers = NULL;
+LPALSOURCEUNQUEUEBUFFERS palSourceUnqueueBuffers = NULL;
+LPALGENBUFFERS palGenBuffers = NULL;
+LPALDELETEBUFFERS palDeleteBuffers = NULL;
+LPALISBUFFER palIsBuffer = NULL;
+LPALBUFFERF palBufferf = NULL;
+LPALBUFFER3F palBuffer3f = NULL;
+LPALBUFFERFV palBufferfv = NULL;
+LPALBUFFERI palBufferi = NULL;
+LPALBUFFER3I palBuffer3i = NULL;
+LPALBUFFERIV palBufferiv = NULL;
+LPALGETBUFFERF palGetBufferf = NULL;
+LPALGETBUFFER3F palGetBuffer3f = NULL;
+LPALGETBUFFERFV palGetBufferfv = NULL;
+LPALGETBUFFERI palGetBufferi = NULL;
+LPALGETBUFFER3I palGetBuffer3i = NULL;
+LPALGETBUFFERIV palGetBufferiv = NULL;
+LPALBUFFERDATA palBufferData = NULL;
+LPALDOPPLERFACTOR palDopplerFactor = NULL;
+LPALDOPPLERVELOCITY palDopplerVelocity = NULL;
+LPALDISTANCEMODEL palDistanceModel = NULL;
+LPALSPEEDOFSOUND palSpeedOfSound = NULL;
+
+static void load_libopenal(void)
+{
+ DWORD failed = 0;
+
+#ifdef SONAME_LIBOPENAL
+ char error[128];
+ openal_handle = wine_dlopen(SONAME_LIBOPENAL, RTLD_NOW, error, sizeof(error));
+ if (!openal_handle)
+ ERR("Couldn't load " SONAME_LIBOPENAL ": %s\n", error);
+#endif
+#define LOAD_FUNCPTR(f) \
+ if((p##f = wine_dlsym(openal_handle, #f, NULL, 0)) == NULL) { \
+ ERR("Couldn't lookup %s in libopenal\n", #f); \
+ failed = 1; \
+ }
+
+ LOAD_FUNCPTR(alcCreateContext);
+ LOAD_FUNCPTR(alcMakeContextCurrent);
+ LOAD_FUNCPTR(alcProcessContext);
+ LOAD_FUNCPTR(alcSuspendContext);
+ LOAD_FUNCPTR(alcDestroyContext);
+ LOAD_FUNCPTR(alcGetCurrentContext);
+ LOAD_FUNCPTR(alcGetContextsDevice);
+ LOAD_FUNCPTR(alcOpenDevice);
+ LOAD_FUNCPTR(alcCloseDevice);
+ LOAD_FUNCPTR(alcGetError);
+ LOAD_FUNCPTR(alcIsExtensionPresent);
+ LOAD_FUNCPTR(alcGetProcAddress);
+ LOAD_FUNCPTR(alcGetEnumValue);
+ LOAD_FUNCPTR(alcGetString);
+ LOAD_FUNCPTR(alcGetIntegerv);
+ LOAD_FUNCPTR(alcCaptureOpenDevice);
+ LOAD_FUNCPTR(alcCaptureCloseDevice);
+ LOAD_FUNCPTR(alcCaptureStart);
+ LOAD_FUNCPTR(alcCaptureStop);
+ LOAD_FUNCPTR(alcCaptureSamples);
+ LOAD_FUNCPTR(alEnable);
+ LOAD_FUNCPTR(alDisable);
+ LOAD_FUNCPTR(alIsEnabled);
+ LOAD_FUNCPTR(alGetString);
+ LOAD_FUNCPTR(alGetBooleanv);
+ LOAD_FUNCPTR(alGetIntegerv);
+ LOAD_FUNCPTR(alGetFloatv);
+ LOAD_FUNCPTR(alGetDoublev);
+ LOAD_FUNCPTR(alGetBoolean);
+ LOAD_FUNCPTR(alGetInteger);
+ LOAD_FUNCPTR(alGetFloat);
+ LOAD_FUNCPTR(alGetDouble);
+ LOAD_FUNCPTR(alGetError);
+ LOAD_FUNCPTR(alIsExtensionPresent);
+ LOAD_FUNCPTR(alGetProcAddress);
+ LOAD_FUNCPTR(alGetEnumValue);
+ LOAD_FUNCPTR(alListenerf);
+ LOAD_FUNCPTR(alListener3f);
+ LOAD_FUNCPTR(alListenerfv);
+ LOAD_FUNCPTR(alListeneri);
+ LOAD_FUNCPTR(alListener3i);
+ LOAD_FUNCPTR(alListeneriv);
+ LOAD_FUNCPTR(alGetListenerf);
+ LOAD_FUNCPTR(alGetListener3f);
+ LOAD_FUNCPTR(alGetListenerfv);
+ LOAD_FUNCPTR(alGetListeneri);
+ LOAD_FUNCPTR(alGetListener3i);
+ LOAD_FUNCPTR(alGetListeneriv);
+ LOAD_FUNCPTR(alGenSources);
+ LOAD_FUNCPTR(alDeleteSources);
+ LOAD_FUNCPTR(alIsSource);
+ LOAD_FUNCPTR(alSourcef);
+ LOAD_FUNCPTR(alSource3f);
+ LOAD_FUNCPTR(alSourcefv);
+ LOAD_FUNCPTR(alSourcei);
+ LOAD_FUNCPTR(alSource3i);
+ LOAD_FUNCPTR(alSourceiv);
+ LOAD_FUNCPTR(alGetSourcef);
+ LOAD_FUNCPTR(alGetSource3f);
+ LOAD_FUNCPTR(alGetSourcefv);
+ LOAD_FUNCPTR(alGetSourcei);
+ LOAD_FUNCPTR(alGetSource3i);
+ LOAD_FUNCPTR(alGetSourceiv);
+ LOAD_FUNCPTR(alSourcePlayv);
+ LOAD_FUNCPTR(alSourceStopv);
+ LOAD_FUNCPTR(alSourceRewindv);
+ LOAD_FUNCPTR(alSourcePausev);
+ LOAD_FUNCPTR(alSourcePlay);
+ LOAD_FUNCPTR(alSourceStop);
+ LOAD_FUNCPTR(alSourceRewind);
+ LOAD_FUNCPTR(alSourcePause);
+ LOAD_FUNCPTR(alSourceQueueBuffers);
+ LOAD_FUNCPTR(alSourceUnqueueBuffers);
+ LOAD_FUNCPTR(alGenBuffers);
+ LOAD_FUNCPTR(alDeleteBuffers);
+ LOAD_FUNCPTR(alIsBuffer);
+ LOAD_FUNCPTR(alBufferf);
+ LOAD_FUNCPTR(alBuffer3f);
+ LOAD_FUNCPTR(alBufferfv);
+ LOAD_FUNCPTR(alBufferi);
+ LOAD_FUNCPTR(alBuffer3i);
+ LOAD_FUNCPTR(alBufferiv);
+ LOAD_FUNCPTR(alGetBufferf);
+ LOAD_FUNCPTR(alGetBuffer3f);
+ LOAD_FUNCPTR(alGetBufferfv);
+ LOAD_FUNCPTR(alGetBufferi);
+ LOAD_FUNCPTR(alGetBuffer3i);
+ LOAD_FUNCPTR(alGetBufferiv);
+ LOAD_FUNCPTR(alBufferData);
+ LOAD_FUNCPTR(alDopplerFactor);
+ LOAD_FUNCPTR(alDopplerVelocity);
+ LOAD_FUNCPTR(alDistanceModel);
+ LOAD_FUNCPTR(alSpeedOfSound);
+#undef LOAD_FUNCPTR
+ if (failed)
+ {
+ WARN("Unloading openal\n");
+ if (openal_handle != RTLD_DEFAULT)
+ wine_dlclose(openal_handle, NULL, 0);
+ openal_handle = NULL;
+ }
+ else
+ openal_loaded = 1;
+}
+
+#endif /*HAVE_OPENAL*/
HRESULT mmErr(UINT err)
{
@@ -261,8 +494,8 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
- *pGuidDest = DSOUND_capture_guids[ds_default_capture];
- TRACE("returns %s\n", get_device_id(pGuidDest));
+ *pGuidDest = DSOUND_capture_guid;
+ TRACE("returns %s\n", debugstr_guid(pGuidDest));
return DS_OK;
}
@@ -452,8 +685,8 @@ DirectSoundCaptureEnumerateW(
devs = waveInGetNumDevs();
if (devs > 0) {
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
- for (wid = 0; wid < devs; ++wid) {
- if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
+ wid = guid.Data4[7];
+ if (wid < devs) { {
err = mmErr(waveInMessage(UlongToHandle(wid),DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
@@ -667,11 +900,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
TRACE("DLL_PROCESS_ATTACH\n");
+#ifdef HAVE_OPENAL
+ load_libopenal();
+#endif /*HAVE_OPENAL*/
for (i = 0; i < MAXWAVEDRIVERS; i++) {
DSOUND_renderer[i] = NULL;
- DSOUND_capture[i] = NULL;
INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
- INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
DisableThreadLibraryCalls(hInstDLL);
/* Increase refcount on dsound by 1 */
@@ -679,6 +913,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
break;
case DLL_PROCESS_DETACH:
TRACE("DLL_PROCESS_DETACH\n");
+#ifdef SONAME_LIBOPENAL
+ if (openal_handle)
+ wine_dlclose(openal_handle, NULL, 0);
+#endif /*SONAME_LIBOPENAL*/
break;
default:
TRACE("UNKNOWN REASON\n");
@@ -686,3 +924,4 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
return TRUE;
}
+
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index c4e7565..bf22099 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -22,8 +22,131 @@
/* Linux does not support better timing than 10ms */
#define DS_TIME_RES 2 /* Resolution of multimedia timer */
#define DS_TIME_DEL 10 /* Delay of multimedia timer callback, and duration of HEL fragment */
-
+/* Default refresh count, can be overridden */
+#define FAKE_REFRESH_COUNT (1000/DS_TIME_DEL/2)
+
#include "wine/list.h"
+
+#ifdef HAVE_OPENAL
+
+/* mac needs these defines to get the LPFUNCTION typedefs */
+#define AL_NO_PROTOTYPES
+#define ALC_NO_PROTOTYPES
+
+#ifdef HAVE_AL_AL_H
+#include <AL/al.h>
+#include <AL/alc.h>
+#elif defined(HAVE_OPENAL_AL_H)
+#include <OpenAL/al.h>
+#include <OpenAL/alc.h>
+#else
+#error No OpenAL headers found?
+#endif
+
+/* All openal functions */
+extern int openal_loaded;
+extern LPALCCREATECONTEXT palcCreateContext;
+extern LPALCMAKECONTEXTCURRENT palcMakeContextCurrent;
+extern LPALCPROCESSCONTEXT palcProcessContext;
+extern LPALCSUSPENDCONTEXT palcSuspendContext;
+extern LPALCDESTROYCONTEXT palcDestroyContext;
+extern LPALCGETCURRENTCONTEXT palcGetCurrentContext;
+extern LPALCGETCONTEXTSDEVICE palcGetContextsDevice;
+extern LPALCOPENDEVICE palcOpenDevice;
+extern LPALCCLOSEDEVICE palcCloseDevice;
+extern LPALCGETERROR palcGetError;
+extern LPALCISEXTENSIONPRESENT palcIsExtensionPresent;
+extern LPALCGETPROCADDRESS palcGetProcAddress;
+extern LPALCGETENUMVALUE palcGetEnumValue;
+extern LPALCGETSTRING palcGetString;
+extern LPALCGETINTEGERV palcGetIntegerv;
+extern LPALCCAPTUREOPENDEVICE palcCaptureOpenDevice;
+extern LPALCCAPTURECLOSEDEVICE palcCaptureCloseDevice;
+extern LPALCCAPTURESTART palcCaptureStart;
+extern LPALCCAPTURESTOP palcCaptureStop;
+extern LPALCCAPTURESAMPLES palcCaptureSamples;
+extern LPALENABLE palEnable;
+extern LPALDISABLE palDisable;
+extern LPALISENABLED palIsEnabled;
+extern LPALGETSTRING palGetString;
+extern LPALGETBOOLEANV palGetBooleanv;
+extern LPALGETINTEGERV palGetIntegerv;
+extern LPALGETFLOATV palGetFloatv;
+extern LPALGETDOUBLEV palGetDoublev;
+extern LPALGETBOOLEAN palGetBoolean;
+extern LPALGETINTEGER palGetInteger;
+extern LPALGETFLOAT palGetFloat;
+extern LPALGETDOUBLE palGetDouble;
+extern LPALGETERROR palGetError;
+extern LPALISEXTENSIONPRESENT palIsExtensionPresent;
+extern LPALGETPROCADDRESS palGetProcAddress;
+extern LPALGETENUMVALUE palGetEnumValue;
+extern LPALLISTENERF palListenerf;
+extern LPALLISTENER3F palListener3f;
+extern LPALLISTENERFV palListenerfv;
+extern LPALLISTENERI palListeneri;
+extern LPALLISTENER3I palListener3i;
+extern LPALLISTENERIV palListeneriv;
+extern LPALGETLISTENERF palGetListenerf;
+extern LPALGETLISTENER3F palGetListener3f;
+extern LPALGETLISTENERFV palGetListenerfv;
+extern LPALGETLISTENERI palGetListeneri;
+extern LPALGETLISTENER3I palGetListener3i;
+extern LPALGETLISTENERIV palGetListeneriv;
+extern LPALGENSOURCES palGenSources;
+extern LPALDELETESOURCES palDeleteSources;
+extern LPALISSOURCE palIsSource;
+extern LPALSOURCEF palSourcef;
+extern LPALSOURCE3F palSource3f;
+extern LPALSOURCEFV palSourcefv;
+extern LPALSOURCEI palSourcei;
+extern LPALSOURCE3I palSource3i;
+extern LPALSOURCEIV palSourceiv;
+extern LPALGETSOURCEF palGetSourcef;
+extern LPALGETSOURCE3F palGetSource3f;
+extern LPALGETSOURCEFV palGetSourcefv;
+extern LPALGETSOURCEI palGetSourcei;
+extern LPALGETSOURCE3I palGetSource3i;
+extern LPALGETSOURCEIV palGetSourceiv;
+extern LPALSOURCEPLAYV palSourcePlayv;
+extern LPALSOURCESTOPV palSourceStopv;
+extern LPALSOURCEREWINDV palSourceRewindv;
+extern LPALSOURCEPAUSEV palSourcePausev;
+extern LPALSOURCEPLAY palSourcePlay;
+extern LPALSOURCESTOP palSourceStop;
+extern LPALSOURCEREWIND palSourceRewind;
+extern LPALSOURCEPAUSE palSourcePause;
+extern LPALSOURCEQUEUEBUFFERS palSourceQueueBuffers;
+extern LPALSOURCEUNQUEUEBUFFERS palSourceUnqueueBuffers;
+extern LPALGENBUFFERS palGenBuffers;
+extern LPALDELETEBUFFERS palDeleteBuffers;
+extern LPALISBUFFER palIsBuffer;
+extern LPALBUFFERF palBufferf;
+extern LPALBUFFER3F palBuffer3f;
+extern LPALBUFFERFV palBufferfv;
+extern LPALBUFFERI palBufferi;
+extern LPALBUFFER3I palBuffer3i;
+extern LPALBUFFERIV palBufferiv;
+extern LPALGETBUFFERF palGetBufferf;
+extern LPALGETBUFFER3F palGetBuffer3f;
+extern LPALGETBUFFERFV palGetBufferfv;
+extern LPALGETBUFFERI palGetBufferi;
+extern LPALGETBUFFER3I palGetBuffer3i;
+extern LPALGETBUFFERIV palGetBufferiv;
+extern LPALBUFFERDATA palBufferData;
+extern LPALDOPPLERFACTOR palDopplerFactor;
+extern LPALDOPPLERVELOCITY palDopplerVelocity;
+extern LPALDISTANCEMODEL palDistanceModel;
+extern LPALSPEEDOFSOUND palSpeedOfSound;
+
+#include <math.h>
+#include "wingdi.h"
+#include "mmreg.h"
+
+/* OpenAL only allows for 1 single access to the device at the same time */
+extern CRITICAL_SECTION openal_crst;
+
+#endif
/* direct sound hardware acceleration levels */
#define DS_HW_ACCEL_FULL 0 /* default on Windows 98 */
@@ -381,7 +504,7 @@ extern DirectSoundDevice* DSOUND_renderer[MAXWAVEDRIVERS];
extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
extern DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS];
-extern GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
+extern GUID DSOUND_capture_guid;
HRESULT mmErr(UINT err);
void setup_dsound_options(void);
diff --git a/dlls/openal32/Makefile.in b/dlls/openal32/Makefile.in
index b237706..9c2ac8f 100644
--- a/dlls/openal32/Makefile.in
+++ b/dlls/openal32/Makefile.in
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = openal32.dll
IMPORTS = kernel32 ntdll
-EXTRALIBS = @LIBOPENAL@
+EXTRALIBS = @LIBOPENAL@ @FRAMEWORK_OPENAL@
C_SRCS = \
openal.c
diff --git a/include/config.h.in b/include/config.h.in
index 7a77d1f..968e876 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -549,7 +549,7 @@
/* Define to 1 if you have the <net/route.h> header file. */
#undef HAVE_NET_ROUTE_H
-/* Define to 1 if `ns_msg' is a member of `_msg_ptr'. */
+/* Define to 1 if `_msg_ptr' is a member of `ns_msg'. */
#undef HAVE_NS_MSG__MSG_PTR
/* Define to 1 if the system has the type `off_t'. */
@@ -558,6 +558,9 @@
/* Define if mkdir takes only one argument */
#undef HAVE_ONE_ARG_MKDIR
+/* Define to 1 if OpenAL is available */
+#undef HAVE_OPENAL
+
/* Define to 1 if you have the <OpenAL/al.h> header file. */
#undef HAVE_OPENAL_AL_H
@@ -660,7 +663,7 @@
/* Define to 1 if you have the `sched_yield' function. */
#undef HAVE_SCHED_YIELD
-/* Define to 1 if `scsireq_t' is a member of `cmd'. */
+/* Define to 1 if `cmd' is a member of `scsireq_t'. */
#undef HAVE_SCSIREQ_T_CMD
/* Define to 1 if you have the <scsi/scsi.h> header file. */
@@ -687,7 +690,7 @@
/* Define to 1 if you have the `settimeofday' function. */
#undef HAVE_SETTIMEOFDAY
-/* Define to 1 if `sg_io_hdr_t' is a member of `interface_id'. */
+/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
/* Define if sigaddset is supported */
@@ -696,7 +699,7 @@
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
-/* Define to 1 if `siginfo_t' is a member of `si_fd'. */
+/* Define to 1 if `si_fd' is a member of `siginfo_t'. */
#undef HAVE_SIGINFO_T_SI_FD
/* Define to 1 if you have the `sigprocmask' function. */
@@ -768,67 +771,67 @@
/* Define to 1 if you have the `strtoull' function. */
#undef HAVE_STRTOULL
-/* Define to 1 if `struct ff_effect' is a member of `direction'. */
+/* Define to 1 if `direction' is a member of `struct ff_effect'. */
#undef HAVE_STRUCT_FF_EFFECT_DIRECTION
-/* Define to 1 if `struct icmpstat' is a member of `icps_outhist'. */
+/* Define to 1 if `icps_outhist' is a member of `struct icmpstat'. */
#undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST
-/* Define to 1 if `struct msghdr' is a member of `msg_accrights'. */
+/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */
#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
-/* Define to 1 if `struct mtget' is a member of `mt_blkno'. */
+/* Define to 1 if `mt_blkno' is a member of `struct mtget'. */
#undef HAVE_STRUCT_MTGET_MT_BLKNO
-/* Define to 1 if `struct mtget' is a member of `mt_blksiz'. */
+/* Define to 1 if `mt_blksiz' is a member of `struct mtget'. */
#undef HAVE_STRUCT_MTGET_MT_BLKSIZ
-/* Define to 1 if `struct mtget' is a member of `mt_gstat'. */
+/* Define to 1 if `mt_gstat' is a member of `struct mtget'. */
#undef HAVE_STRUCT_MTGET_MT_GSTAT
-/* Define to 1 if `struct option' is a member of `name'. */
+/* Define to 1 if `name' is a member of `struct option'. */
#undef HAVE_STRUCT_OPTION_NAME
-/* Define to 1 if `struct sockaddr_in6' is a member of `sin6_scope_id'. */
+/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
-/* Define to 1 if `struct sockaddr' is a member of `sa_len'. */
+/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
-/* Define to 1 if `struct sockaddr_un' is a member of `sun_len'. */
+/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
-/* Define to 1 if `struct statfs' is a member of `f_bavail'. */
+/* Define to 1 if `f_bavail' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_BAVAIL
-/* Define to 1 if `struct statfs' is a member of `f_bfree'. */
+/* Define to 1 if `f_bfree' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_BFREE
-/* Define to 1 if `struct statfs' is a member of `f_favail'. */
+/* Define to 1 if `f_favail' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FAVAIL
-/* Define to 1 if `struct statfs' is a member of `f_ffree'. */
+/* Define to 1 if `f_ffree' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FFREE
-/* Define to 1 if `struct statfs' is a member of `f_frsize'. */
+/* Define to 1 if `f_frsize' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FRSIZE
-/* Define to 1 if `struct statfs' is a member of `f_namelen'. */
+/* Define to 1 if `f_namelen' is a member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_NAMELEN
-/* Define to 1 if `struct statvfs' is a member of `f_blocks'. */
+/* Define to 1 if `f_blocks' is a member of `struct statvfs'. */
#undef HAVE_STRUCT_STATVFS_F_BLOCKS
-/* Define to 1 if `struct stat' is a member of `st_atim'. */
+/* Define to 1 if `st_atim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM
-/* Define to 1 if `struct stat' is a member of `st_blocks'. */
+/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
-/* Define to 1 if `struct stat' is a member of `st_ctim'. */
+/* Define to 1 if `st_ctim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_CTIM
-/* Define to 1 if `struct stat' is a member of `st_mtim'. */
+/* Define to 1 if `st_mtim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
/* Define to 1 if the system has the type `struct xinpgen'. */
@@ -1071,7 +1074,7 @@
/* Define to 1 if you have the <X11/Xutil.h> header file. */
#undef HAVE_X11_XUTIL_H
-/* Define to 1 if `XICCallback' is a member of `callback'. */
+/* Define to 1 if `callback' is a member of `XICCallback'. */
#undef HAVE_XICCALLBACK_CALLBACK
/* Define if you have the XKB extension */
@@ -1185,6 +1188,9 @@
/* Define to the soname of the libodbc library. */
#undef SONAME_LIBODBC
+/* Define to the soname of the libopenal library. */
+#undef SONAME_LIBOPENAL
+
/* Define to the soname of the libpng library. */
#undef SONAME_LIBPNG
--
1.6.5.3
More information about the wine-patches
mailing list