mirror of https://github.com/PCSX2/pcsx2.git
PortAudio: Upgrade PortAudio to latest master
This commit is contained in:
parent
f45f8c9479
commit
95e7045db7
|
@ -84,7 +84,6 @@ WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = doc/src \
|
INPUT = doc/src \
|
||||||
include \
|
include \
|
||||||
bindings/java \
|
|
||||||
examples
|
examples
|
||||||
FILE_PATTERNS = *.h \
|
FILE_PATTERNS = *.h \
|
||||||
*.c \
|
*.c \
|
||||||
|
|
|
@ -84,7 +84,6 @@ WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = doc/src \
|
INPUT = doc/src \
|
||||||
include \
|
include \
|
||||||
bindings/java \
|
|
||||||
examples \
|
examples \
|
||||||
src \
|
src \
|
||||||
test \
|
test \
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
PortAudio uses "autoconf" tools to generate Makefiles for Linux and Mac platforms.
|
PortAudio uses "autoconf" tools to generate Makefiles for Linux and Mac platforms.
|
||||||
The source for these are configure.in and Makefile.in
|
The source for these are configure.in and Makefile.in
|
||||||
If you modify either of these files then please run this command before
|
If you modify either of these files then please run this command before
|
||||||
testing and checking in your changes.
|
testing and checking in your changes. I run this command on Linux.
|
||||||
|
|
||||||
autoreconf -if
|
autoreconf -if
|
||||||
|
|
||||||
|
If you do not have autoreconf then do:
|
||||||
|
sudo apt-get install autoconf
|
||||||
|
|
||||||
|
If you get error like "possibly undefined macro: AC_LIBTOOL_WIN32_DLL"
|
||||||
|
then you try installing some more packages and then try again.
|
||||||
|
|
||||||
|
sudo apt-get install build-essential
|
||||||
|
sudo apt-get install pkg-config
|
||||||
|
sudo apt-get install libtool
|
||||||
|
autoreconf -if
|
||||||
|
|
||||||
Then test a build by doing:
|
Then test a build by doing:
|
||||||
|
|
||||||
./configure
|
./configure
|
||||||
make clean
|
make clean
|
||||||
make
|
make
|
||||||
sudo make install
|
|
||||||
|
|
||||||
then check in the related files that are modified.
|
then check in the related files that are modified.
|
||||||
These might include files like:
|
These might include files like:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
|
||||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -11,11 +11,12 @@
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||||
# Inc.
|
# Foundation, Inc.
|
||||||
# Written by Gordon Matzigkeit, 1996
|
# Written by Gordon Matzigkeit, 1996
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation gives
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
@ -24,8 +25,8 @@
|
||||||
|
|
||||||
m4_define([_LT_COPYING], [dnl
|
m4_define([_LT_COPYING], [dnl
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||||
# Inc.
|
# Foundation, Inc.
|
||||||
# Written by Gordon Matzigkeit, 1996
|
# Written by Gordon Matzigkeit, 1996
|
||||||
#
|
#
|
||||||
# This file is part of GNU Libtool.
|
# This file is part of GNU Libtool.
|
||||||
|
@ -159,6 +160,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||||
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
|
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
|
||||||
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
|
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
|
||||||
|
|
||||||
|
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
|
||||||
|
dnl
|
||||||
_LT_DECL([], [host_alias], [0], [The host system])dnl
|
_LT_DECL([], [host_alias], [0], [The host system])dnl
|
||||||
_LT_DECL([], [host], [0])dnl
|
_LT_DECL([], [host], [0])dnl
|
||||||
_LT_DECL([], [host_os], [0])dnl
|
_LT_DECL([], [host_os], [0])dnl
|
||||||
|
@ -644,9 +647,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
|
||||||
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
||||||
configured by $[0], generated by m4_PACKAGE_STRING.
|
configured by $[0], generated by m4_PACKAGE_STRING.
|
||||||
|
|
||||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
Copyright (C) 2011 Free Software Foundation, Inc.
|
||||||
This config.lt script is free software; the Free Software Foundation
|
This config.lt script is free software; the Free Software Foundation
|
||||||
gives unlimited permision to copy, distribute and modify it."
|
gives unlimited permission to copy, distribute and modify it."
|
||||||
|
|
||||||
while test $[#] != 0
|
while test $[#] != 0
|
||||||
do
|
do
|
||||||
|
@ -808,6 +811,7 @@ AC_DEFUN([LT_LANG],
|
||||||
m4_case([$1],
|
m4_case([$1],
|
||||||
[C], [_LT_LANG(C)],
|
[C], [_LT_LANG(C)],
|
||||||
[C++], [_LT_LANG(CXX)],
|
[C++], [_LT_LANG(CXX)],
|
||||||
|
[Go], [_LT_LANG(GO)],
|
||||||
[Java], [_LT_LANG(GCJ)],
|
[Java], [_LT_LANG(GCJ)],
|
||||||
[Fortran 77], [_LT_LANG(F77)],
|
[Fortran 77], [_LT_LANG(F77)],
|
||||||
[Fortran], [_LT_LANG(FC)],
|
[Fortran], [_LT_LANG(FC)],
|
||||||
|
@ -829,6 +833,29 @@ m4_defun([_LT_LANG],
|
||||||
])# _LT_LANG
|
])# _LT_LANG
|
||||||
|
|
||||||
|
|
||||||
|
m4_ifndef([AC_PROG_GO], [
|
||||||
|
# NOTE: This macro has been submitted for inclusion into #
|
||||||
|
# GNU Autoconf as AC_PROG_GO. When it is available in #
|
||||||
|
# a released version of Autoconf we should remove this #
|
||||||
|
# macro and use it instead. #
|
||||||
|
m4_defun([AC_PROG_GO],
|
||||||
|
[AC_LANG_PUSH(Go)dnl
|
||||||
|
AC_ARG_VAR([GOC], [Go compiler command])dnl
|
||||||
|
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
|
||||||
|
_AC_ARG_VAR_LDFLAGS()dnl
|
||||||
|
AC_CHECK_TOOL(GOC, gccgo)
|
||||||
|
if test -z "$GOC"; then
|
||||||
|
if test -n "$ac_tool_prefix"; then
|
||||||
|
AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$GOC"; then
|
||||||
|
AC_CHECK_PROG(GOC, gccgo, gccgo, false)
|
||||||
|
fi
|
||||||
|
])#m4_defun
|
||||||
|
])#m4_ifndef
|
||||||
|
|
||||||
|
|
||||||
# _LT_LANG_DEFAULT_CONFIG
|
# _LT_LANG_DEFAULT_CONFIG
|
||||||
# -----------------------
|
# -----------------------
|
||||||
m4_defun([_LT_LANG_DEFAULT_CONFIG],
|
m4_defun([_LT_LANG_DEFAULT_CONFIG],
|
||||||
|
@ -859,6 +886,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
||||||
m4_ifdef([LT_PROG_GCJ],
|
m4_ifdef([LT_PROG_GCJ],
|
||||||
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
|
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
|
||||||
|
|
||||||
|
AC_PROVIDE_IFELSE([AC_PROG_GO],
|
||||||
|
[LT_LANG(GO)],
|
||||||
|
[m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
|
||||||
|
|
||||||
AC_PROVIDE_IFELSE([LT_PROG_RC],
|
AC_PROVIDE_IFELSE([LT_PROG_RC],
|
||||||
[LT_LANG(RC)],
|
[LT_LANG(RC)],
|
||||||
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
|
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
|
||||||
|
@ -961,7 +992,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||||
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
||||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||||
_lt_result=$?
|
_lt_result=$?
|
||||||
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
|
# If there is a non-empty error log, and "single_module"
|
||||||
|
# appears in it, assume the flag caused a linker warning
|
||||||
|
if test -s conftest.err && $GREP single_module conftest.err; then
|
||||||
|
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||||
|
# Otherwise, if the output was created with a 0 exit code from
|
||||||
|
# the compiler, it worked.
|
||||||
|
elif test -f libconftest.dylib && test $_lt_result -eq 0; then
|
||||||
lt_cv_apple_cc_single_mod=yes
|
lt_cv_apple_cc_single_mod=yes
|
||||||
else
|
else
|
||||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||||
|
@ -969,6 +1006,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||||
rm -rf libconftest.dylib*
|
rm -rf libconftest.dylib*
|
||||||
rm -f conftest.*
|
rm -f conftest.*
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
||||||
[lt_cv_ld_exported_symbols_list],
|
[lt_cv_ld_exported_symbols_list],
|
||||||
[lt_cv_ld_exported_symbols_list=no
|
[lt_cv_ld_exported_symbols_list=no
|
||||||
|
@ -980,6 +1018,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||||
[lt_cv_ld_exported_symbols_list=no])
|
[lt_cv_ld_exported_symbols_list=no])
|
||||||
LDFLAGS="$save_LDFLAGS"
|
LDFLAGS="$save_LDFLAGS"
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
|
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
|
||||||
[lt_cv_ld_force_load=no
|
[lt_cv_ld_force_load=no
|
||||||
cat > conftest.c << _LT_EOF
|
cat > conftest.c << _LT_EOF
|
||||||
|
@ -997,7 +1036,9 @@ _LT_EOF
|
||||||
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
|
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||||
_lt_result=$?
|
_lt_result=$?
|
||||||
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
|
if test -s conftest.err && $GREP force_load conftest.err; then
|
||||||
|
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||||
|
elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
|
||||||
lt_cv_ld_force_load=yes
|
lt_cv_ld_force_load=yes
|
||||||
else
|
else
|
||||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||||
|
@ -1042,8 +1083,8 @@ _LT_EOF
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# _LT_DARWIN_LINKER_FEATURES
|
# _LT_DARWIN_LINKER_FEATURES([TAG])
|
||||||
# --------------------------
|
# ---------------------------------
|
||||||
# Checks for linker and compiler features on darwin
|
# Checks for linker and compiler features on darwin
|
||||||
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||||
[
|
[
|
||||||
|
@ -1054,6 +1095,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||||
if test "$lt_cv_ld_force_load" = "yes"; then
|
if test "$lt_cv_ld_force_load" = "yes"; then
|
||||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
||||||
|
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
|
||||||
|
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
|
||||||
else
|
else
|
||||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
||||||
fi
|
fi
|
||||||
|
@ -1275,7 +1318,7 @@ ia64-*-hpux*)
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
;;
|
;;
|
||||||
|
|
||||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo 'int i;' > conftest.$ac_ext
|
echo 'int i;' > conftest.$ac_ext
|
||||||
|
@ -1287,9 +1330,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
LD="${LD-ld} -m elf_i386_fbsd"
|
LD="${LD-ld} -m elf_i386_fbsd"
|
||||||
;;
|
;;
|
||||||
x86_64-*linux*)
|
x86_64-*linux*)
|
||||||
LD="${LD-ld} -m elf_i386"
|
case `/usr/bin/file conftest.o` in
|
||||||
|
*x86-64*)
|
||||||
|
LD="${LD-ld} -m elf32_x86_64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LD="${LD-ld} -m elf_i386"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
ppc64-*linux*|powerpc64-*linux*)
|
powerpc64le-*)
|
||||||
|
LD="${LD-ld} -m elf32lppclinux"
|
||||||
|
;;
|
||||||
|
powerpc64-*)
|
||||||
LD="${LD-ld} -m elf32ppclinux"
|
LD="${LD-ld} -m elf32ppclinux"
|
||||||
;;
|
;;
|
||||||
s390x-*linux*)
|
s390x-*linux*)
|
||||||
|
@ -1308,7 +1361,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
x86_64-*linux*)
|
x86_64-*linux*)
|
||||||
LD="${LD-ld} -m elf_x86_64"
|
LD="${LD-ld} -m elf_x86_64"
|
||||||
;;
|
;;
|
||||||
ppc*-*linux*|powerpc*-*linux*)
|
powerpcle-*)
|
||||||
|
LD="${LD-ld} -m elf64lppc"
|
||||||
|
;;
|
||||||
|
powerpc-*)
|
||||||
LD="${LD-ld} -m elf64ppc"
|
LD="${LD-ld} -m elf64ppc"
|
||||||
;;
|
;;
|
||||||
s390*-*linux*|s390*-*tpf*)
|
s390*-*linux*|s390*-*tpf*)
|
||||||
|
@ -1337,14 +1393,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
sparc*-*solaris*)
|
*-*solaris*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo 'int i;' > conftest.$ac_ext
|
echo 'int i;' > conftest.$ac_ext
|
||||||
if AC_TRY_EVAL(ac_compile); then
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
case `/usr/bin/file conftest.o` in
|
case `/usr/bin/file conftest.o` in
|
||||||
*64-bit*)
|
*64-bit*)
|
||||||
case $lt_cv_prog_gnu_ld in
|
case $lt_cv_prog_gnu_ld in
|
||||||
yes*) LD="${LD-ld} -m elf64_sparc" ;;
|
yes*)
|
||||||
|
case $host in
|
||||||
|
i?86-*-solaris*)
|
||||||
|
LD="${LD-ld} -m elf_x86_64"
|
||||||
|
;;
|
||||||
|
sparc*-*-solaris*)
|
||||||
|
LD="${LD-ld} -m elf64_sparc"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
|
||||||
|
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
|
||||||
|
LD="${LD-ld}_sol2"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
||||||
LD="${LD-ld} -64"
|
LD="${LD-ld} -64"
|
||||||
|
@ -1421,13 +1490,13 @@ old_postuninstall_cmds=
|
||||||
if test -n "$RANLIB"; then
|
if test -n "$RANLIB"; then
|
||||||
case $host_os in
|
case $host_os in
|
||||||
openbsd*)
|
openbsd*)
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
|
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
|
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
@ -1607,6 +1676,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||||
lt_cv_sys_max_cmd_len=196608
|
lt_cv_sys_max_cmd_len=196608
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
os2*)
|
||||||
|
# The test takes a long time on OS/2.
|
||||||
|
lt_cv_sys_max_cmd_len=8192
|
||||||
|
;;
|
||||||
|
|
||||||
osf*)
|
osf*)
|
||||||
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
||||||
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
||||||
|
@ -1633,7 +1707,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
||||||
if test -n "$lt_cv_sys_max_cmd_len"; then
|
if test -n "$lt_cv_sys_max_cmd_len" && \
|
||||||
|
test undefined != "$lt_cv_sys_max_cmd_len"; then
|
||||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
||||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||||
else
|
else
|
||||||
|
@ -1646,7 +1721,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||||
# If test is not a shell built-in, we'll probably end up computing a
|
# If test is not a shell built-in, we'll probably end up computing a
|
||||||
# maximum length that is only half of the actual maximum length, but
|
# maximum length that is only half of the actual maximum length, but
|
||||||
# we can't tell.
|
# we can't tell.
|
||||||
while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
|
while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
|
||||||
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
||||||
test $i != 17 # 1/2 MB should be enough
|
test $i != 17 # 1/2 MB should be enough
|
||||||
do
|
do
|
||||||
|
@ -2192,7 +2267,7 @@ need_version=unknown
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
aix3*)
|
aix3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
||||||
shlibpath_var=LIBPATH
|
shlibpath_var=LIBPATH
|
||||||
|
|
||||||
|
@ -2201,7 +2276,7 @@ aix3*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
aix[[4-9]]*)
|
aix[[4-9]]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
@ -2266,7 +2341,7 @@ beos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
bsdi[[45]]*)
|
bsdi[[45]]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
@ -2405,7 +2480,7 @@ m4_if([$1], [],[
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dgux*)
|
dgux*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
||||||
|
@ -2413,10 +2488,6 @@ dgux*)
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd1*)
|
|
||||||
dynamic_linker=no
|
|
||||||
;;
|
|
||||||
|
|
||||||
freebsd* | dragonfly*)
|
freebsd* | dragonfly*)
|
||||||
# DragonFly does not have aout. When/if they implement a new
|
# DragonFly does not have aout. When/if they implement a new
|
||||||
# versioning mechanism, adjust this.
|
# versioning mechanism, adjust this.
|
||||||
|
@ -2424,7 +2495,7 @@ freebsd* | dragonfly*)
|
||||||
objformat=`/usr/bin/objformat`
|
objformat=`/usr/bin/objformat`
|
||||||
else
|
else
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd[[123]]*) objformat=aout ;;
|
freebsd[[23]].*) objformat=aout ;;
|
||||||
*) objformat=elf ;;
|
*) objformat=elf ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -2442,7 +2513,7 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd2*)
|
freebsd2.*)
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
;;
|
;;
|
||||||
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
|
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
|
||||||
|
@ -2461,19 +2532,8 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
version_type=linux
|
|
||||||
need_lib_prefix=no
|
|
||||||
need_version=no
|
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
|
||||||
shlibpath_overrides_runpath=no
|
|
||||||
hardcode_into_libs=yes
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
dynamic_linker="$host_os runtime_loader"
|
dynamic_linker="$host_os runtime_loader"
|
||||||
|
@ -2534,7 +2594,7 @@ hpux9* | hpux10* | hpux11*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
interix[[3-9]]*)
|
interix[[3-9]]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
@ -2550,7 +2610,7 @@ irix5* | irix6* | nonstopux*)
|
||||||
nonstopux*) version_type=nonstopux ;;
|
nonstopux*) version_type=nonstopux ;;
|
||||||
*)
|
*)
|
||||||
if test "$lt_cv_prog_gnu_ld" = yes; then
|
if test "$lt_cv_prog_gnu_ld" = yes; then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
else
|
else
|
||||||
version_type=irix
|
version_type=irix
|
||||||
fi ;;
|
fi ;;
|
||||||
|
@ -2587,9 +2647,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||||
dynamic_linker=no
|
dynamic_linker=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be glibc/ELF.
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -2664,7 +2724,7 @@ netbsd*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
newsos6)
|
newsos6)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
|
@ -2733,7 +2793,7 @@ rdos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
solaris*)
|
solaris*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -2758,7 +2818,7 @@ sunos4*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sysv4 | sysv4.3*)
|
sysv4 | sysv4.3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -2782,7 +2842,7 @@ sysv4 | sysv4.3*)
|
||||||
|
|
||||||
sysv4*MP*)
|
sysv4*MP*)
|
||||||
if test -d /usr/nec ;then
|
if test -d /usr/nec ;then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
||||||
soname_spec='$libname${shared_ext}.$major'
|
soname_spec='$libname${shared_ext}.$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -2813,7 +2873,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||||
|
|
||||||
tpf*)
|
tpf*)
|
||||||
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -2823,7 +2883,7 @@ tpf*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
uts4*)
|
uts4*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -3204,10 +3264,6 @@ freebsd* | dragonfly*)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
lt_cv_deplibs_check_method=pass_all
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
@ -3245,8 +3301,8 @@ irix5* | irix6* | nonstopux*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be glibc/ELF.
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -3665,6 +3721,7 @@ for ac_symprfx in "" "_"; do
|
||||||
# which start with @ or ?.
|
# which start with @ or ?.
|
||||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||||
" {last_section=section; section=\$ 3};"\
|
" {last_section=section; section=\$ 3};"\
|
||||||
|
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||||
" \$ 0!~/External *\|/{next};"\
|
" \$ 0!~/External *\|/{next};"\
|
||||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||||
|
@ -3997,7 +4054,7 @@ m4_if([$1], [CXX], [
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
KCC*)
|
KCC*)
|
||||||
# KAI C++ Compiler
|
# KAI C++ Compiler
|
||||||
|
@ -4249,7 +4306,9 @@ m4_if([$1], [CXX], [
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
nvcc*) # Cuda Compiler Driver 2.2
|
nvcc*) # Cuda Compiler Driver 2.2
|
||||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
|
||||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
|
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
@ -4294,7 +4353,7 @@ m4_if([$1], [CXX], [
|
||||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
# old Intel for x86_64 which still supported -KPIC.
|
# old Intel for x86_64 which still supported -KPIC.
|
||||||
ecc*)
|
ecc*)
|
||||||
|
@ -4341,18 +4400,33 @@ m4_if([$1], [CXX], [
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case `$CC -V 2>&1 | sed 5q` in
|
case `$CC -V 2>&1 | sed 5q` in
|
||||||
*Sun\ F* | *Sun*Fortran*)
|
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
|
||||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
|
||||||
;;
|
;;
|
||||||
|
*Sun\ F* | *Sun*Fortran*)
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
|
||||||
|
;;
|
||||||
*Sun\ C*)
|
*Sun\ C*)
|
||||||
# Sun C 5.9
|
# Sun C 5.9
|
||||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||||
;;
|
;;
|
||||||
|
*Intel*\ [[CF]]*Compiler*)
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||||
|
;;
|
||||||
|
*Portland\ Group*)
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||||
|
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -4512,7 +4586,9 @@ m4_if([$1], [CXX], [
|
||||||
;;
|
;;
|
||||||
cygwin* | mingw* | cegcc*)
|
cygwin* | mingw* | cegcc*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
cl*) ;;
|
cl*)
|
||||||
|
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
|
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
|
||||||
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
|
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
|
||||||
|
@ -4540,7 +4616,6 @@ m4_if([$1], [CXX], [
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
|
||||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||||
|
@ -4794,8 +4869,7 @@ _LT_EOF
|
||||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||||
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
||||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
|
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
|
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||||
if test "x$supports_anon_versioning" = xyes; then
|
if test "x$supports_anon_versioning" = xyes; then
|
||||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||||
|
@ -5091,6 +5165,7 @@ _LT_EOF
|
||||||
# The linker will not automatically build a static lib if we build a DLL.
|
# The linker will not automatically build a static lib if we build a DLL.
|
||||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||||
|
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
|
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
|
||||||
# Don't use ranlib
|
# Don't use ranlib
|
||||||
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
|
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
|
||||||
|
@ -5137,10 +5212,6 @@ _LT_EOF
|
||||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
|
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd1*)
|
|
||||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
|
||||||
;;
|
|
||||||
|
|
||||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||||
# does not break anything, and helps significantly (at the cost of a little
|
# does not break anything, and helps significantly (at the cost of a little
|
||||||
|
@ -5153,7 +5224,7 @@ _LT_EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||||
freebsd2*)
|
freebsd2.*)
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||||
|
@ -5192,7 +5263,6 @@ _LT_EOF
|
||||||
fi
|
fi
|
||||||
if test "$with_gnu_ld" = no; then
|
if test "$with_gnu_ld" = no; then
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
|
||||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
|
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
|
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
|
||||||
|
@ -5634,9 +5704,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
|
||||||
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
|
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
|
||||||
[Flag to hardcode $libdir into a binary during linking.
|
[Flag to hardcode $libdir into a binary during linking.
|
||||||
This must work even if $libdir does not exist])
|
This must work even if $libdir does not exist])
|
||||||
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
|
|
||||||
[[If ld is used when linking, flag to hardcode $libdir into a binary
|
|
||||||
during linking. This must work even if $libdir does not exist]])
|
|
||||||
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
|
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
|
||||||
[Whether we need a single "-rpath" flag with a separated argument])
|
[Whether we need a single "-rpath" flag with a separated argument])
|
||||||
_LT_TAGDECL([], [hardcode_direct], [0],
|
_LT_TAGDECL([], [hardcode_direct], [0],
|
||||||
|
@ -5790,7 +5857,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
|
||||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||||
|
@ -6160,7 +6226,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd[[12]]*)
|
freebsd2.*)
|
||||||
# C++ shared libraries reported to be fairly broken before
|
# C++ shared libraries reported to be fairly broken before
|
||||||
# switch to ELF
|
# switch to ELF
|
||||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||||
|
@ -6176,9 +6242,6 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||||
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
||||||
|
@ -6340,7 +6403,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||||
_LT_TAGVAR(inherit_rpath, $1)=yes
|
_LT_TAGVAR(inherit_rpath, $1)=yes
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
KCC*)
|
KCC*)
|
||||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||||
|
@ -6921,12 +6984,18 @@ public class foo {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
_LT_EOF
|
_LT_EOF
|
||||||
|
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
|
||||||
|
package foo
|
||||||
|
func foo() {
|
||||||
|
}
|
||||||
|
_LT_EOF
|
||||||
])
|
])
|
||||||
|
|
||||||
_lt_libdeps_save_CFLAGS=$CFLAGS
|
_lt_libdeps_save_CFLAGS=$CFLAGS
|
||||||
case "$CC $CFLAGS " in #(
|
case "$CC $CFLAGS " in #(
|
||||||
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||||
|
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Parse the compiler output and extract the necessary
|
dnl Parse the compiler output and extract the necessary
|
||||||
|
@ -7123,7 +7192,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
|
||||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||||
_LT_TAGVAR(hardcode_automatic, $1)=no
|
_LT_TAGVAR(hardcode_automatic, $1)=no
|
||||||
|
@ -7256,7 +7324,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
|
||||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||||
_LT_TAGVAR(hardcode_automatic, $1)=no
|
_LT_TAGVAR(hardcode_automatic, $1)=no
|
||||||
|
@ -7439,6 +7506,73 @@ CFLAGS=$lt_save_CFLAGS
|
||||||
])# _LT_LANG_GCJ_CONFIG
|
])# _LT_LANG_GCJ_CONFIG
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_LANG_GO_CONFIG([TAG])
|
||||||
|
# --------------------------
|
||||||
|
# Ensure that the configuration variables for the GNU Go compiler
|
||||||
|
# are suitably defined. These variables are subsequently used by _LT_CONFIG
|
||||||
|
# to write the compiler configuration to `libtool'.
|
||||||
|
m4_defun([_LT_LANG_GO_CONFIG],
|
||||||
|
[AC_REQUIRE([LT_PROG_GO])dnl
|
||||||
|
AC_LANG_SAVE
|
||||||
|
|
||||||
|
# Source file extension for Go test sources.
|
||||||
|
ac_ext=go
|
||||||
|
|
||||||
|
# Object file extension for compiled Go test sources.
|
||||||
|
objext=o
|
||||||
|
_LT_TAGVAR(objext, $1)=$objext
|
||||||
|
|
||||||
|
# Code to be used in simple compile tests
|
||||||
|
lt_simple_compile_test_code="package main; func main() { }"
|
||||||
|
|
||||||
|
# Code to be used in simple link tests
|
||||||
|
lt_simple_link_test_code='package main; func main() { }'
|
||||||
|
|
||||||
|
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
|
||||||
|
_LT_TAG_COMPILER
|
||||||
|
|
||||||
|
# save warnings/boilerplate of simple test code
|
||||||
|
_LT_COMPILER_BOILERPLATE
|
||||||
|
_LT_LINKER_BOILERPLATE
|
||||||
|
|
||||||
|
# Allow CC to be a program name with arguments.
|
||||||
|
lt_save_CC=$CC
|
||||||
|
lt_save_CFLAGS=$CFLAGS
|
||||||
|
lt_save_GCC=$GCC
|
||||||
|
GCC=yes
|
||||||
|
CC=${GOC-"gccgo"}
|
||||||
|
CFLAGS=$GOFLAGS
|
||||||
|
compiler=$CC
|
||||||
|
_LT_TAGVAR(compiler, $1)=$CC
|
||||||
|
_LT_TAGVAR(LD, $1)="$LD"
|
||||||
|
_LT_CC_BASENAME([$compiler])
|
||||||
|
|
||||||
|
# Go did not exist at the time GCC didn't implicitly link libc in.
|
||||||
|
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||||
|
|
||||||
|
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
|
||||||
|
_LT_TAGVAR(reload_flag, $1)=$reload_flag
|
||||||
|
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
|
||||||
|
|
||||||
|
if test -n "$compiler"; then
|
||||||
|
_LT_COMPILER_NO_RTTI($1)
|
||||||
|
_LT_COMPILER_PIC($1)
|
||||||
|
_LT_COMPILER_C_O($1)
|
||||||
|
_LT_COMPILER_FILE_LOCKS($1)
|
||||||
|
_LT_LINKER_SHLIBS($1)
|
||||||
|
_LT_LINKER_HARDCODE_LIBPATH($1)
|
||||||
|
|
||||||
|
_LT_CONFIG($1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
|
||||||
|
GCC=$lt_save_GCC
|
||||||
|
CC=$lt_save_CC
|
||||||
|
CFLAGS=$lt_save_CFLAGS
|
||||||
|
])# _LT_LANG_GO_CONFIG
|
||||||
|
|
||||||
|
|
||||||
# _LT_LANG_RC_CONFIG([TAG])
|
# _LT_LANG_RC_CONFIG([TAG])
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Ensure that the configuration variables for the Windows resource compiler
|
# Ensure that the configuration variables for the Windows resource compiler
|
||||||
|
@ -7508,6 +7642,13 @@ dnl aclocal-1.4 backwards compatibility:
|
||||||
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
|
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
|
||||||
|
|
||||||
|
|
||||||
|
# LT_PROG_GO
|
||||||
|
# ----------
|
||||||
|
AC_DEFUN([LT_PROG_GO],
|
||||||
|
[AC_CHECK_TOOL(GOC, gccgo,)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
# LT_PROG_RC
|
# LT_PROG_RC
|
||||||
# ----------
|
# ----------
|
||||||
AC_DEFUN([LT_PROG_RC],
|
AC_DEFUN([LT_PROG_RC],
|
||||||
|
@ -8172,9 +8313,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||||
m4_define([_LT_WITH_PIC],
|
m4_define([_LT_WITH_PIC],
|
||||||
[AC_ARG_WITH([pic],
|
[AC_ARG_WITH([pic],
|
||||||
[AS_HELP_STRING([--with-pic],
|
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||||
[pic_mode="$withval"],
|
[lt_p=${PACKAGE-default}
|
||||||
|
case $withval in
|
||||||
|
yes|no) pic_mode=$withval ;;
|
||||||
|
*)
|
||||||
|
pic_mode=default
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for lt_pkg in $withval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$lt_pkg" = "X$lt_p"; then
|
||||||
|
pic_mode=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
[pic_mode=default])
|
[pic_mode=default])
|
||||||
|
|
||||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||||
|
@ -8346,15 +8502,15 @@ m4_define([lt_dict_filter],
|
||||||
|
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# serial 3293 ltversion.m4
|
# serial 3337 ltversion.m4
|
||||||
# This file is part of GNU Libtool
|
# This file is part of GNU Libtool
|
||||||
|
|
||||||
m4_define([LT_PACKAGE_VERSION], [2.4])
|
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||||
m4_define([LT_PACKAGE_REVISION], [1.3293])
|
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||||
|
|
||||||
AC_DEFUN([LTVERSION_VERSION],
|
AC_DEFUN([LTVERSION_VERSION],
|
||||||
[macro_version='2.4'
|
[macro_version='2.4.2'
|
||||||
macro_revision='1.3293'
|
macro_revision='1.3337'
|
||||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||||
_LT_DECL(, macro_revision, 0)
|
_LT_DECL(, macro_revision, 0)
|
||||||
])
|
])
|
||||||
|
@ -8513,7 +8669,7 @@ fi[]dnl
|
||||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||||
#
|
#
|
||||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
# only at the first occurence in configure.ac, so if the first place
|
# only at the first occurrence in configure.ac, so if the first place
|
||||||
# it's called might be skipped (such as if it is within an "if", you
|
# it's called might be skipped (such as if it is within an "if", you
|
||||||
# have to call PKG_CHECK_EXISTS manually
|
# have to call PKG_CHECK_EXISTS manually
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
|
@ -41,10 +41,17 @@ PaUtil_InitializeX86PlainConverters @52
|
||||||
PaAsio_GetInputChannelName @53
|
PaAsio_GetInputChannelName @53
|
||||||
PaAsio_GetOutputChannelName @54
|
PaAsio_GetOutputChannelName @54
|
||||||
PaUtil_SetDebugPrintFunction @55
|
PaUtil_SetDebugPrintFunction @55
|
||||||
PaWasapi_GetDeviceDefaultFormat @56
|
PaWasapi_GetAudioClient @56
|
||||||
PaWasapi_GetDeviceRole @57
|
PaWasapi_UpdateDeviceList @57
|
||||||
PaWasapi_ThreadPriorityBoost @58
|
PaWasapi_GetDeviceCurrentFormat @58
|
||||||
PaWasapi_ThreadPriorityRevert @59
|
PaWasapi_GetDeviceDefaultFormat @59
|
||||||
PaWasapi_GetFramesPerHostBuffer @60
|
PaWasapi_GetDeviceMixFormat @60
|
||||||
PaWasapi_GetJackDescription @61
|
PaWasapi_GetDeviceRole @61
|
||||||
PaWasapi_GetJackCount @62
|
PaWasapi_ThreadPriorityBoost @62
|
||||||
|
PaWasapi_ThreadPriorityRevert @63
|
||||||
|
PaWasapi_GetFramesPerHostBuffer @64
|
||||||
|
PaWasapi_GetJackCount @65
|
||||||
|
PaWasapi_GetJackDescription @66
|
||||||
|
PaWasapi_SetStreamStateHandler @68
|
||||||
|
PaWasapiWinrt_SetDefaultDeviceId @67
|
||||||
|
PaWasapiWinrt_PopulateDeviceList @69
|
||||||
|
|
|
@ -24,7 +24,7 @@ This DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS)
|
||||||
Service pack 5:
|
Service pack 5:
|
||||||
Latest known URL:
|
Latest known URL:
|
||||||
http://msdn2.microsoft.com/en-us/vstudio/aa718363.aspx
|
http://msdn2.microsoft.com/en-us/vstudio/aa718363.aspx
|
||||||
Yes there EXISTS a service pack 6 , but the processor pack (below) isnt compatible with it.
|
Yes there EXISTS a service pack 6 , but the processor pack (below) isn't compatible with it.
|
||||||
|
|
||||||
Processor Pack(only works with above SP5)
|
Processor Pack(only works with above SP5)
|
||||||
Latest known URL:
|
Latest known URL:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Clear the Git commit SHA in the include file.
|
||||||
|
# This should be run before checking in code to Git.
|
||||||
|
#
|
||||||
|
revision_filename=src/common/pa_gitrevision.h
|
||||||
|
|
||||||
|
# Update the include file with the current GIT revision.
|
||||||
|
echo "#define PA_GIT_REVISION unknown" > ${revision_filename}
|
||||||
|
|
||||||
|
echo ${revision_filename} now contains
|
||||||
|
cat ${revision_filename}
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Clear the SVN revision in the include file.
|
|
||||||
# This should be run before checking in code to SVN.
|
|
||||||
#
|
|
||||||
revision_filename=src/common/pa_svnrevision.h
|
|
||||||
|
|
||||||
# Update the include file with the current SVN revision.
|
|
||||||
echo "#define PA_SVN_REVISION unknown" > ${revision_filename}
|
|
||||||
|
|
||||||
echo ${revision_filename} now contains
|
|
||||||
cat ${revision_filename}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
# - Try to find jack
|
||||||
|
# Once done this will define
|
||||||
|
# JACK_FOUND - System has jack
|
||||||
|
# JACK_INCLUDE_DIRS - The jack include directories
|
||||||
|
# JACK_LIBRARIES - The libraries needed to use jack
|
||||||
|
# JACK_DEFINITIONS - Compiler switches required for using jack
|
||||||
|
|
||||||
|
if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
# in cache already
|
||||||
|
set(JACK_FOUND TRUE)
|
||||||
|
|
||||||
|
else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
set(JACK_DEFINITIONS "")
|
||||||
|
|
||||||
|
# Look for pkg-config and use it (if available) to find package
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(JACK QUIET jack)
|
||||||
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
if (NOT JACK_FOUND)
|
||||||
|
|
||||||
|
find_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack)
|
||||||
|
find_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
set(JACK_LIBRARIES ${JACK_LIBRARY})
|
||||||
|
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
# Set JACK_FOUND if the library and include paths were found
|
||||||
|
find_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
# Don't show include/library paths in cmake GUI
|
||||||
|
mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)
|
||||||
|
|
||||||
|
endif (NOT JACK_FOUND)
|
||||||
|
|
||||||
|
endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
|
@ -0,0 +1,21 @@
|
||||||
|
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
|
||||||
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
foreach(file ${files})
|
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
exec_program(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||||
|
endif(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||||
|
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
endforeach(file)
|
|
@ -0,0 +1,12 @@
|
||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: PortAudio
|
||||||
|
Description: Portable audio I/O
|
||||||
|
Requires:
|
||||||
|
Version: @PA_PKGCONFIG_VERSION@
|
||||||
|
|
||||||
|
Libs: -L${libdir} -lportaudio @PA_PKGCONFIG_LDFLAGS@
|
||||||
|
Cflags: -I${includedir} @PA_PKGCONFIG_CFLAGS@
|
|
@ -0,0 +1 @@
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/portaudioTargets.cmake")
|
|
@ -40,7 +40,7 @@ Pa_GetSampleSize @33
|
||||||
Pa_Sleep @34
|
Pa_Sleep @34
|
||||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50
|
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50
|
||||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel @51
|
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel @51
|
||||||
PaUtil_InitializeX86PlainConverters @52
|
@DEF_EXCLUDE_X86_PLAIN_CONVERTERS@PaUtil_InitializeX86PlainConverters @52
|
||||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName @53
|
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName @53
|
||||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName @54
|
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName @54
|
||||||
PaUtil_SetDebugPrintFunction @55
|
PaUtil_SetDebugPrintFunction @55
|
||||||
|
|
|
@ -723,6 +723,7 @@ infodir
|
||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
|
runstatedir
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
|
@ -821,6 +822,7 @@ datadir='${datarootdir}'
|
||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
|
runstatedir='${localstatedir}/run'
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||||
|
@ -1073,6 +1075,15 @@ do
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||||
|
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||||
|
| --run | --ru | --r)
|
||||||
|
ac_prev=runstatedir ;;
|
||||||
|
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||||
|
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||||
|
| --run=* | --ru=* | --r=*)
|
||||||
|
runstatedir=$ac_optarg ;;
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
@ -1210,7 +1221,7 @@ fi
|
||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir
|
libdir localedir mandir runstatedir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
|
@ -1363,6 +1374,7 @@ Fine tuning of the installation directories:
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
|
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
|
@ -1417,7 +1429,7 @@ Optional Packages:
|
||||||
--with-asiodir ASIO directory [/usr/local/asiosdk2]
|
--with-asiodir ASIO directory [/usr/local/asiosdk2]
|
||||||
--with-dxdir DirectX directory [/usr/local/dx7sdk]
|
--with-dxdir DirectX directory [/usr/local/dx7sdk]
|
||||||
|
|
||||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
|
||||||
both]
|
both]
|
||||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||||
--with-sysroot=DIR Search for dependent libraries within DIR
|
--with-sysroot=DIR Search for dependent libraries within DIR
|
||||||
|
@ -4145,8 +4157,8 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
macro_version='2.4'
|
macro_version='2.4.2'
|
||||||
macro_revision='1.3293'
|
macro_revision='1.3337'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4920,6 +4932,11 @@ else
|
||||||
lt_cv_sys_max_cmd_len=196608
|
lt_cv_sys_max_cmd_len=196608
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
os2*)
|
||||||
|
# The test takes a long time on OS/2.
|
||||||
|
lt_cv_sys_max_cmd_len=8192
|
||||||
|
;;
|
||||||
|
|
||||||
osf*)
|
osf*)
|
||||||
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
||||||
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
||||||
|
@ -4946,7 +4963,8 @@ else
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
||||||
if test -n "$lt_cv_sys_max_cmd_len"; then
|
if test -n "$lt_cv_sys_max_cmd_len" && \
|
||||||
|
test undefined != "$lt_cv_sys_max_cmd_len"; then
|
||||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
||||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||||
else
|
else
|
||||||
|
@ -4959,7 +4977,7 @@ else
|
||||||
# If test is not a shell built-in, we'll probably end up computing a
|
# If test is not a shell built-in, we'll probably end up computing a
|
||||||
# maximum length that is only half of the actual maximum length, but
|
# maximum length that is only half of the actual maximum length, but
|
||||||
# we can't tell.
|
# we can't tell.
|
||||||
while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
|
while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
|
||||||
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
||||||
test $i != 17 # 1/2 MB should be enough
|
test $i != 17 # 1/2 MB should be enough
|
||||||
do
|
do
|
||||||
|
@ -5344,10 +5362,6 @@ freebsd* | dragonfly*)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
lt_cv_deplibs_check_method=pass_all
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
@ -5385,8 +5399,8 @@ irix5* | irix6* | nonstopux*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be glibc/ELF.
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -6023,13 +6037,13 @@ old_postuninstall_cmds=
|
||||||
if test -n "$RANLIB"; then
|
if test -n "$RANLIB"; then
|
||||||
case $host_os in
|
case $host_os in
|
||||||
openbsd*)
|
openbsd*)
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
|
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
|
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
@ -6218,6 +6232,7 @@ for ac_symprfx in "" "_"; do
|
||||||
# which start with @ or ?.
|
# which start with @ or ?.
|
||||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||||
" {last_section=section; section=\$ 3};"\
|
" {last_section=section; section=\$ 3};"\
|
||||||
|
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||||
" \$ 0!~/External *\|/{next};"\
|
" \$ 0!~/External *\|/{next};"\
|
||||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||||
|
@ -6506,7 +6521,7 @@ ia64-*-hpux*)
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
;;
|
;;
|
||||||
|
|
||||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo 'int i;' > conftest.$ac_ext
|
echo 'int i;' > conftest.$ac_ext
|
||||||
|
@ -6522,9 +6537,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
LD="${LD-ld} -m elf_i386_fbsd"
|
LD="${LD-ld} -m elf_i386_fbsd"
|
||||||
;;
|
;;
|
||||||
x86_64-*linux*)
|
x86_64-*linux*)
|
||||||
LD="${LD-ld} -m elf_i386"
|
case `/usr/bin/file conftest.o` in
|
||||||
|
*x86-64*)
|
||||||
|
LD="${LD-ld} -m elf32_x86_64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LD="${LD-ld} -m elf_i386"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
ppc64-*linux*|powerpc64-*linux*)
|
powerpc64le-*)
|
||||||
|
LD="${LD-ld} -m elf32lppclinux"
|
||||||
|
;;
|
||||||
|
powerpc64-*)
|
||||||
LD="${LD-ld} -m elf32ppclinux"
|
LD="${LD-ld} -m elf32ppclinux"
|
||||||
;;
|
;;
|
||||||
s390x-*linux*)
|
s390x-*linux*)
|
||||||
|
@ -6543,7 +6568,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||||
x86_64-*linux*)
|
x86_64-*linux*)
|
||||||
LD="${LD-ld} -m elf_x86_64"
|
LD="${LD-ld} -m elf_x86_64"
|
||||||
;;
|
;;
|
||||||
ppc*-*linux*|powerpc*-*linux*)
|
powerpcle-*)
|
||||||
|
LD="${LD-ld} -m elf64lppc"
|
||||||
|
;;
|
||||||
|
powerpc-*)
|
||||||
LD="${LD-ld} -m elf64ppc"
|
LD="${LD-ld} -m elf64ppc"
|
||||||
;;
|
;;
|
||||||
s390*-*linux*|s390*-*tpf*)
|
s390*-*linux*|s390*-*tpf*)
|
||||||
|
@ -6606,7 +6634,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
sparc*-*solaris*)
|
*-*solaris*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo 'int i;' > conftest.$ac_ext
|
echo 'int i;' > conftest.$ac_ext
|
||||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||||
|
@ -6617,7 +6645,20 @@ sparc*-*solaris*)
|
||||||
case `/usr/bin/file conftest.o` in
|
case `/usr/bin/file conftest.o` in
|
||||||
*64-bit*)
|
*64-bit*)
|
||||||
case $lt_cv_prog_gnu_ld in
|
case $lt_cv_prog_gnu_ld in
|
||||||
yes*) LD="${LD-ld} -m elf64_sparc" ;;
|
yes*)
|
||||||
|
case $host in
|
||||||
|
i?86-*-solaris*)
|
||||||
|
LD="${LD-ld} -m elf_x86_64"
|
||||||
|
;;
|
||||||
|
sparc*-*-solaris*)
|
||||||
|
LD="${LD-ld} -m elf64_sparc"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
|
||||||
|
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
|
||||||
|
LD="${LD-ld}_sol2"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
||||||
LD="${LD-ld} -64"
|
LD="${LD-ld} -64"
|
||||||
|
@ -7257,7 +7298,13 @@ else
|
||||||
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
||||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||||
_lt_result=$?
|
_lt_result=$?
|
||||||
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
|
# If there is a non-empty error log, and "single_module"
|
||||||
|
# appears in it, assume the flag caused a linker warning
|
||||||
|
if test -s conftest.err && $GREP single_module conftest.err; then
|
||||||
|
cat conftest.err >&5
|
||||||
|
# Otherwise, if the output was created with a 0 exit code from
|
||||||
|
# the compiler, it worked.
|
||||||
|
elif test -f libconftest.dylib && test $_lt_result -eq 0; then
|
||||||
lt_cv_apple_cc_single_mod=yes
|
lt_cv_apple_cc_single_mod=yes
|
||||||
else
|
else
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
|
@ -7268,6 +7315,7 @@ else
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
|
||||||
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
|
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
|
||||||
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
|
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
|
||||||
if ${lt_cv_ld_exported_symbols_list+:} false; then :
|
if ${lt_cv_ld_exported_symbols_list+:} false; then :
|
||||||
|
@ -7300,6 +7348,7 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
|
||||||
$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
|
$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
|
||||||
$as_echo_n "checking for -force_load linker flag... " >&6; }
|
$as_echo_n "checking for -force_load linker flag... " >&6; }
|
||||||
if ${lt_cv_ld_force_load+:} false; then :
|
if ${lt_cv_ld_force_load+:} false; then :
|
||||||
|
@ -7321,7 +7370,9 @@ _LT_EOF
|
||||||
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
|
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
|
||||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||||
_lt_result=$?
|
_lt_result=$?
|
||||||
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
|
if test -s conftest.err && $GREP force_load conftest.err; then
|
||||||
|
cat conftest.err >&5
|
||||||
|
elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
|
||||||
lt_cv_ld_force_load=yes
|
lt_cv_ld_force_load=yes
|
||||||
else
|
else
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
|
@ -7735,7 +7786,22 @@ fi
|
||||||
|
|
||||||
# Check whether --with-pic was given.
|
# Check whether --with-pic was given.
|
||||||
if test "${with_pic+set}" = set; then :
|
if test "${with_pic+set}" = set; then :
|
||||||
withval=$with_pic; pic_mode="$withval"
|
withval=$with_pic; lt_p=${PACKAGE-default}
|
||||||
|
case $withval in
|
||||||
|
yes|no) pic_mode=$withval ;;
|
||||||
|
*)
|
||||||
|
pic_mode=default
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for lt_pkg in $withval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$lt_pkg" = "X$lt_p"; then
|
||||||
|
pic_mode=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
pic_mode=default
|
pic_mode=default
|
||||||
fi
|
fi
|
||||||
|
@ -7808,6 +7874,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8268,7 +8338,9 @@ lt_prog_compiler_static=
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
nvcc*) # Cuda Compiler Driver 2.2
|
nvcc*) # Cuda Compiler Driver 2.2
|
||||||
lt_prog_compiler_wl='-Xlinker '
|
lt_prog_compiler_wl='-Xlinker '
|
||||||
lt_prog_compiler_pic='-Xcompiler -fPIC'
|
if test -n "$lt_prog_compiler_pic"; then
|
||||||
|
lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
@ -8312,7 +8384,7 @@ lt_prog_compiler_static=
|
||||||
lt_prog_compiler_static='-non_shared'
|
lt_prog_compiler_static='-non_shared'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
# old Intel for x86_64 which still supported -KPIC.
|
# old Intel for x86_64 which still supported -KPIC.
|
||||||
ecc*)
|
ecc*)
|
||||||
|
@ -8359,18 +8431,33 @@ lt_prog_compiler_static=
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case `$CC -V 2>&1 | sed 5q` in
|
case `$CC -V 2>&1 | sed 5q` in
|
||||||
*Sun\ F* | *Sun*Fortran*)
|
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
|
||||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||||
lt_prog_compiler_pic='-KPIC'
|
lt_prog_compiler_pic='-KPIC'
|
||||||
lt_prog_compiler_static='-Bstatic'
|
lt_prog_compiler_static='-Bstatic'
|
||||||
lt_prog_compiler_wl=''
|
lt_prog_compiler_wl=''
|
||||||
;;
|
;;
|
||||||
|
*Sun\ F* | *Sun*Fortran*)
|
||||||
|
lt_prog_compiler_pic='-KPIC'
|
||||||
|
lt_prog_compiler_static='-Bstatic'
|
||||||
|
lt_prog_compiler_wl='-Qoption ld '
|
||||||
|
;;
|
||||||
*Sun\ C*)
|
*Sun\ C*)
|
||||||
# Sun C 5.9
|
# Sun C 5.9
|
||||||
lt_prog_compiler_pic='-KPIC'
|
lt_prog_compiler_pic='-KPIC'
|
||||||
lt_prog_compiler_static='-Bstatic'
|
lt_prog_compiler_static='-Bstatic'
|
||||||
lt_prog_compiler_wl='-Wl,'
|
lt_prog_compiler_wl='-Wl,'
|
||||||
;;
|
;;
|
||||||
|
*Intel*\ [CF]*Compiler*)
|
||||||
|
lt_prog_compiler_wl='-Wl,'
|
||||||
|
lt_prog_compiler_pic='-fPIC'
|
||||||
|
lt_prog_compiler_static='-static'
|
||||||
|
;;
|
||||||
|
*Portland\ Group*)
|
||||||
|
lt_prog_compiler_wl='-Wl,'
|
||||||
|
lt_prog_compiler_pic='-fpic'
|
||||||
|
lt_prog_compiler_static='-Bstatic'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -8732,7 +8819,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
||||||
hardcode_direct=no
|
hardcode_direct=no
|
||||||
hardcode_direct_absolute=no
|
hardcode_direct_absolute=no
|
||||||
hardcode_libdir_flag_spec=
|
hardcode_libdir_flag_spec=
|
||||||
hardcode_libdir_flag_spec_ld=
|
|
||||||
hardcode_libdir_separator=
|
hardcode_libdir_separator=
|
||||||
hardcode_minus_L=no
|
hardcode_minus_L=no
|
||||||
hardcode_shlibpath_var=unsupported
|
hardcode_shlibpath_var=unsupported
|
||||||
|
@ -8985,8 +9071,7 @@ _LT_EOF
|
||||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||||
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
||||||
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
|
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
|
||||||
hardcode_libdir_flag_spec=
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
hardcode_libdir_flag_spec_ld='-rpath $libdir'
|
|
||||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||||
if test "x$supports_anon_versioning" = xyes; then
|
if test "x$supports_anon_versioning" = xyes; then
|
||||||
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
|
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
|
||||||
|
@ -9366,6 +9451,7 @@ fi
|
||||||
# The linker will not automatically build a static lib if we build a DLL.
|
# The linker will not automatically build a static lib if we build a DLL.
|
||||||
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
||||||
enable_shared_with_static_runtimes=yes
|
enable_shared_with_static_runtimes=yes
|
||||||
|
exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||||
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
|
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
|
||||||
# Don't use ranlib
|
# Don't use ranlib
|
||||||
old_postinstall_cmds='chmod 644 $oldlib'
|
old_postinstall_cmds='chmod 644 $oldlib'
|
||||||
|
@ -9411,6 +9497,7 @@ fi
|
||||||
hardcode_shlibpath_var=unsupported
|
hardcode_shlibpath_var=unsupported
|
||||||
if test "$lt_cv_ld_force_load" = "yes"; then
|
if test "$lt_cv_ld_force_load" = "yes"; then
|
||||||
whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
||||||
|
|
||||||
else
|
else
|
||||||
whole_archive_flag_spec=''
|
whole_archive_flag_spec=''
|
||||||
fi
|
fi
|
||||||
|
@ -9439,10 +9526,6 @@ fi
|
||||||
hardcode_shlibpath_var=no
|
hardcode_shlibpath_var=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd1*)
|
|
||||||
ld_shlibs=no
|
|
||||||
;;
|
|
||||||
|
|
||||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||||
# does not break anything, and helps significantly (at the cost of a little
|
# does not break anything, and helps significantly (at the cost of a little
|
||||||
|
@ -9455,7 +9538,7 @@ fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||||
freebsd2*)
|
freebsd2.*)
|
||||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||||
hardcode_direct=yes
|
hardcode_direct=yes
|
||||||
hardcode_minus_L=yes
|
hardcode_minus_L=yes
|
||||||
|
@ -9494,7 +9577,6 @@ fi
|
||||||
fi
|
fi
|
||||||
if test "$with_gnu_ld" = no; then
|
if test "$with_gnu_ld" = no; then
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||||
hardcode_libdir_flag_spec_ld='+b $libdir'
|
|
||||||
hardcode_libdir_separator=:
|
hardcode_libdir_separator=:
|
||||||
hardcode_direct=yes
|
hardcode_direct=yes
|
||||||
hardcode_direct_absolute=yes
|
hardcode_direct_absolute=yes
|
||||||
|
@ -10112,11 +10194,6 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10212,7 +10289,7 @@ need_version=unknown
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
aix3*)
|
aix3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
||||||
shlibpath_var=LIBPATH
|
shlibpath_var=LIBPATH
|
||||||
|
|
||||||
|
@ -10221,7 +10298,7 @@ aix3*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
aix[4-9]*)
|
aix[4-9]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
@ -10286,7 +10363,7 @@ beos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
bsdi[45]*)
|
bsdi[45]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
@ -10425,7 +10502,7 @@ darwin* | rhapsody*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dgux*)
|
dgux*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
||||||
|
@ -10433,10 +10510,6 @@ dgux*)
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd1*)
|
|
||||||
dynamic_linker=no
|
|
||||||
;;
|
|
||||||
|
|
||||||
freebsd* | dragonfly*)
|
freebsd* | dragonfly*)
|
||||||
# DragonFly does not have aout. When/if they implement a new
|
# DragonFly does not have aout. When/if they implement a new
|
||||||
# versioning mechanism, adjust this.
|
# versioning mechanism, adjust this.
|
||||||
|
@ -10444,7 +10517,7 @@ freebsd* | dragonfly*)
|
||||||
objformat=`/usr/bin/objformat`
|
objformat=`/usr/bin/objformat`
|
||||||
else
|
else
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd[123]*) objformat=aout ;;
|
freebsd[23].*) objformat=aout ;;
|
||||||
*) objformat=elf ;;
|
*) objformat=elf ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -10462,7 +10535,7 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd2*)
|
freebsd2.*)
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
;;
|
;;
|
||||||
freebsd3.[01]* | freebsdelf3.[01]*)
|
freebsd3.[01]* | freebsdelf3.[01]*)
|
||||||
|
@ -10481,19 +10554,8 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
version_type=linux
|
|
||||||
need_lib_prefix=no
|
|
||||||
need_version=no
|
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
|
||||||
shlibpath_overrides_runpath=no
|
|
||||||
hardcode_into_libs=yes
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
dynamic_linker="$host_os runtime_loader"
|
dynamic_linker="$host_os runtime_loader"
|
||||||
|
@ -10554,7 +10616,7 @@ hpux9* | hpux10* | hpux11*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
interix[3-9]*)
|
interix[3-9]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
@ -10570,7 +10632,7 @@ irix5* | irix6* | nonstopux*)
|
||||||
nonstopux*) version_type=nonstopux ;;
|
nonstopux*) version_type=nonstopux ;;
|
||||||
*)
|
*)
|
||||||
if test "$lt_cv_prog_gnu_ld" = yes; then
|
if test "$lt_cv_prog_gnu_ld" = yes; then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
else
|
else
|
||||||
version_type=irix
|
version_type=irix
|
||||||
fi ;;
|
fi ;;
|
||||||
|
@ -10607,9 +10669,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||||
dynamic_linker=no
|
dynamic_linker=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be glibc/ELF.
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -10703,7 +10765,7 @@ netbsd*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
newsos6)
|
newsos6)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
|
@ -10772,7 +10834,7 @@ rdos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
solaris*)
|
solaris*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -10797,7 +10859,7 @@ sunos4*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sysv4 | sysv4.3*)
|
sysv4 | sysv4.3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -10821,7 +10883,7 @@ sysv4 | sysv4.3*)
|
||||||
|
|
||||||
sysv4*MP*)
|
sysv4*MP*)
|
||||||
if test -d /usr/nec ;then
|
if test -d /usr/nec ;then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
||||||
soname_spec='$libname${shared_ext}.$major'
|
soname_spec='$libname${shared_ext}.$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -10852,7 +10914,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||||
|
|
||||||
tpf*)
|
tpf*)
|
||||||
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -10862,7 +10924,7 @@ tpf*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
uts4*)
|
uts4*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -11787,7 +11849,6 @@ export_dynamic_flag_spec_CXX=
|
||||||
hardcode_direct_CXX=no
|
hardcode_direct_CXX=no
|
||||||
hardcode_direct_absolute_CXX=no
|
hardcode_direct_absolute_CXX=no
|
||||||
hardcode_libdir_flag_spec_CXX=
|
hardcode_libdir_flag_spec_CXX=
|
||||||
hardcode_libdir_flag_spec_ld_CXX=
|
|
||||||
hardcode_libdir_separator_CXX=
|
hardcode_libdir_separator_CXX=
|
||||||
hardcode_minus_L_CXX=no
|
hardcode_minus_L_CXX=no
|
||||||
hardcode_shlibpath_var_CXX=unsupported
|
hardcode_shlibpath_var_CXX=unsupported
|
||||||
|
@ -12371,6 +12432,7 @@ fi
|
||||||
hardcode_shlibpath_var_CXX=unsupported
|
hardcode_shlibpath_var_CXX=unsupported
|
||||||
if test "$lt_cv_ld_force_load" = "yes"; then
|
if test "$lt_cv_ld_force_load" = "yes"; then
|
||||||
whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
||||||
|
|
||||||
else
|
else
|
||||||
whole_archive_flag_spec_CXX=''
|
whole_archive_flag_spec_CXX=''
|
||||||
fi
|
fi
|
||||||
|
@ -12415,7 +12477,7 @@ fi
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd[12]*)
|
freebsd2.*)
|
||||||
# C++ shared libraries reported to be fairly broken before
|
# C++ shared libraries reported to be fairly broken before
|
||||||
# switch to ELF
|
# switch to ELF
|
||||||
ld_shlibs_CXX=no
|
ld_shlibs_CXX=no
|
||||||
|
@ -12431,9 +12493,6 @@ fi
|
||||||
ld_shlibs_CXX=yes
|
ld_shlibs_CXX=yes
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||||
link_all_deplibs_CXX=yes
|
link_all_deplibs_CXX=yes
|
||||||
|
@ -12595,7 +12654,7 @@ fi
|
||||||
inherit_rpath_CXX=yes
|
inherit_rpath_CXX=yes
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
KCC*)
|
KCC*)
|
||||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||||
|
@ -13091,6 +13150,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
|
||||||
case "$CC $CFLAGS " in #(
|
case "$CC $CFLAGS " in #(
|
||||||
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||||
|
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||||
|
@ -13454,7 +13514,7 @@ lt_prog_compiler_static_CXX=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
KCC*)
|
KCC*)
|
||||||
# KAI C++ Compiler
|
# KAI C++ Compiler
|
||||||
|
@ -13880,7 +13940,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
||||||
;;
|
;;
|
||||||
cygwin* | mingw* | cegcc*)
|
cygwin* | mingw* | cegcc*)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
cl*) ;;
|
cl*)
|
||||||
|
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
|
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
|
||||||
exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
|
exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
|
||||||
|
@ -14033,8 +14095,6 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14063,7 +14123,7 @@ need_version=unknown
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
aix3*)
|
aix3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
||||||
shlibpath_var=LIBPATH
|
shlibpath_var=LIBPATH
|
||||||
|
|
||||||
|
@ -14072,7 +14132,7 @@ aix3*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
aix[4-9]*)
|
aix[4-9]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
@ -14137,7 +14197,7 @@ beos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
bsdi[45]*)
|
bsdi[45]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
@ -14274,7 +14334,7 @@ darwin* | rhapsody*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dgux*)
|
dgux*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
||||||
|
@ -14282,10 +14342,6 @@ dgux*)
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd1*)
|
|
||||||
dynamic_linker=no
|
|
||||||
;;
|
|
||||||
|
|
||||||
freebsd* | dragonfly*)
|
freebsd* | dragonfly*)
|
||||||
# DragonFly does not have aout. When/if they implement a new
|
# DragonFly does not have aout. When/if they implement a new
|
||||||
# versioning mechanism, adjust this.
|
# versioning mechanism, adjust this.
|
||||||
|
@ -14293,7 +14349,7 @@ freebsd* | dragonfly*)
|
||||||
objformat=`/usr/bin/objformat`
|
objformat=`/usr/bin/objformat`
|
||||||
else
|
else
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd[123]*) objformat=aout ;;
|
freebsd[23].*) objformat=aout ;;
|
||||||
*) objformat=elf ;;
|
*) objformat=elf ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -14311,7 +14367,7 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
case $host_os in
|
case $host_os in
|
||||||
freebsd2*)
|
freebsd2.*)
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
;;
|
;;
|
||||||
freebsd3.[01]* | freebsdelf3.[01]*)
|
freebsd3.[01]* | freebsdelf3.[01]*)
|
||||||
|
@ -14330,19 +14386,8 @@ freebsd* | dragonfly*)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
|
||||||
version_type=linux
|
|
||||||
need_lib_prefix=no
|
|
||||||
need_version=no
|
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
|
||||||
shlibpath_overrides_runpath=no
|
|
||||||
hardcode_into_libs=yes
|
|
||||||
;;
|
|
||||||
|
|
||||||
haiku*)
|
haiku*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
dynamic_linker="$host_os runtime_loader"
|
dynamic_linker="$host_os runtime_loader"
|
||||||
|
@ -14403,7 +14448,7 @@ hpux9* | hpux10* | hpux11*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
interix[3-9]*)
|
interix[3-9]*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
@ -14419,7 +14464,7 @@ irix5* | irix6* | nonstopux*)
|
||||||
nonstopux*) version_type=nonstopux ;;
|
nonstopux*) version_type=nonstopux ;;
|
||||||
*)
|
*)
|
||||||
if test "$lt_cv_prog_gnu_ld" = yes; then
|
if test "$lt_cv_prog_gnu_ld" = yes; then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
else
|
else
|
||||||
version_type=irix
|
version_type=irix
|
||||||
fi ;;
|
fi ;;
|
||||||
|
@ -14456,9 +14501,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||||
dynamic_linker=no
|
dynamic_linker=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be glibc/ELF.
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -14552,7 +14597,7 @@ netbsd*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
newsos6)
|
newsos6)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
shlibpath_overrides_runpath=yes
|
shlibpath_overrides_runpath=yes
|
||||||
|
@ -14621,7 +14666,7 @@ rdos*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
solaris*)
|
solaris*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -14646,7 +14691,7 @@ sunos4*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sysv4 | sysv4.3*)
|
sysv4 | sysv4.3*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -14670,7 +14715,7 @@ sysv4 | sysv4.3*)
|
||||||
|
|
||||||
sysv4*MP*)
|
sysv4*MP*)
|
||||||
if test -d /usr/nec ;then
|
if test -d /usr/nec ;then
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
||||||
soname_spec='$libname${shared_ext}.$major'
|
soname_spec='$libname${shared_ext}.$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -14701,7 +14746,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||||
|
|
||||||
tpf*)
|
tpf*)
|
||||||
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
|
@ -14711,7 +14756,7 @@ tpf*)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
uts4*)
|
uts4*)
|
||||||
version_type=linux
|
version_type=linux # correct to gnu/linux during the next big refactor
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||||
soname_spec='${libname}${release}${shared_ext}$major'
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
@ -14850,6 +14895,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_commands="$ac_config_commands libtool"
|
ac_config_commands="$ac_config_commands libtool"
|
||||||
|
|
||||||
|
|
||||||
|
@ -15787,13 +15834,13 @@ case "${host_os}" in
|
||||||
$as_echo "#define PA_USE_COREAUDIO 1" >>confdefs.h
|
$as_echo "#define PA_USE_COREAUDIO 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror"
|
||||||
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
|
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
|
||||||
|
|
||||||
if test "x$enable_mac_universal" = "xyes" ; then
|
if test "x$enable_mac_universal" = "xyes" ; then
|
||||||
case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
|
case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
|
||||||
|
|
||||||
12*|3.0|3.1)
|
3.0|3.1)
|
||||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk ] ; then
|
if [ -d /Developer/SDKs/MacOSX10.5.sdk ] ; then
|
||||||
mac_version_min="-mmacosx-version-min=10.3"
|
mac_version_min="-mmacosx-version-min=10.3"
|
||||||
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||||
|
@ -15819,13 +15866,31 @@ case "${host_os}" in
|
||||||
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
||||||
mac_version_min="-mmacosx-version-min=10.4"
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.13 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.13 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.14 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.14 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.15 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.15 Path`"
|
||||||
else
|
else
|
||||||
as_fn_error $? "Couldn't find 10.5, 10.6, 10.7, 10.8 or 10.9 SDK" "$LINENO" 5
|
as_fn_error $? "Could not find 10.5 to 10.13 SDK." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
mac_arches=""
|
mac_arches=""
|
||||||
for arch in i386 x86_64 ppc ppc64
|
for arch in x86_64
|
||||||
do
|
do
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -arch $arch"
|
CFLAGS="$CFLAGS -arch $arch"
|
||||||
|
@ -15894,7 +15959,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
if [ "x$with_wdmks" = "xyes" ]; then
|
if [ "x$with_wdmks" = "xyes" ]; then
|
||||||
DXDIR="$with_dxdir"
|
DXDIR="$with_dxdir"
|
||||||
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o
|
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o
|
||||||
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
|
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
|
||||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
||||||
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
||||||
|
@ -15913,7 +15978,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o
|
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o
|
||||||
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
||||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
||||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
CFLAGS="$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -16943,6 +17008,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
|
||||||
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
|
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
|
||||||
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
|
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
|
||||||
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
|
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
|
||||||
|
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
|
||||||
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
|
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
|
||||||
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
|
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
|
||||||
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
|
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
|
||||||
|
@ -17023,7 +17089,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
|
||||||
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
||||||
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
|
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
|
|
||||||
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
|
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
|
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
|
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
|
||||||
|
@ -17095,7 +17160,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
|
allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
|
no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
|
hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
|
|
||||||
hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
|
hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
|
hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
|
hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
|
||||||
|
@ -17137,6 +17201,7 @@ DLLTOOL \
|
||||||
OBJDUMP \
|
OBJDUMP \
|
||||||
SHELL \
|
SHELL \
|
||||||
ECHO \
|
ECHO \
|
||||||
|
PATH_SEPARATOR \
|
||||||
SED \
|
SED \
|
||||||
GREP \
|
GREP \
|
||||||
EGREP \
|
EGREP \
|
||||||
|
@ -17185,7 +17250,6 @@ with_gnu_ld \
|
||||||
allow_undefined_flag \
|
allow_undefined_flag \
|
||||||
no_undefined_flag \
|
no_undefined_flag \
|
||||||
hardcode_libdir_flag_spec \
|
hardcode_libdir_flag_spec \
|
||||||
hardcode_libdir_flag_spec_ld \
|
|
||||||
hardcode_libdir_separator \
|
hardcode_libdir_separator \
|
||||||
exclude_expsyms \
|
exclude_expsyms \
|
||||||
include_expsyms \
|
include_expsyms \
|
||||||
|
@ -17219,7 +17283,6 @@ with_gnu_ld_CXX \
|
||||||
allow_undefined_flag_CXX \
|
allow_undefined_flag_CXX \
|
||||||
no_undefined_flag_CXX \
|
no_undefined_flag_CXX \
|
||||||
hardcode_libdir_flag_spec_CXX \
|
hardcode_libdir_flag_spec_CXX \
|
||||||
hardcode_libdir_flag_spec_ld_CXX \
|
|
||||||
hardcode_libdir_separator_CXX \
|
hardcode_libdir_separator_CXX \
|
||||||
exclude_expsyms_CXX \
|
exclude_expsyms_CXX \
|
||||||
include_expsyms_CXX \
|
include_expsyms_CXX \
|
||||||
|
@ -17758,8 +17821,8 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
|
||||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||||
# Inc.
|
# Foundation, Inc.
|
||||||
# Written by Gordon Matzigkeit, 1996
|
# Written by Gordon Matzigkeit, 1996
|
||||||
#
|
#
|
||||||
# This file is part of GNU Libtool.
|
# This file is part of GNU Libtool.
|
||||||
|
@ -17822,6 +17885,9 @@ SHELL=$lt_SHELL
|
||||||
# An echo program that protects backslashes.
|
# An echo program that protects backslashes.
|
||||||
ECHO=$lt_ECHO
|
ECHO=$lt_ECHO
|
||||||
|
|
||||||
|
# The PATH separator for the build system.
|
||||||
|
PATH_SEPARATOR=$lt_PATH_SEPARATOR
|
||||||
|
|
||||||
# The host system.
|
# The host system.
|
||||||
host_alias=$host_alias
|
host_alias=$host_alias
|
||||||
host=$host
|
host=$host
|
||||||
|
@ -18117,10 +18183,6 @@ no_undefined_flag=$lt_no_undefined_flag
|
||||||
# This must work even if \$libdir does not exist
|
# This must work even if \$libdir does not exist
|
||||||
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
|
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
|
||||||
|
|
||||||
# If ld is used when linking, flag to hardcode \$libdir into a binary
|
|
||||||
# during linking. This must work even if \$libdir does not exist.
|
|
||||||
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
|
|
||||||
|
|
||||||
# Whether we need a single "-rpath" flag with a separated argument.
|
# Whether we need a single "-rpath" flag with a separated argument.
|
||||||
hardcode_libdir_separator=$lt_hardcode_libdir_separator
|
hardcode_libdir_separator=$lt_hardcode_libdir_separator
|
||||||
|
|
||||||
|
@ -18463,10 +18525,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
|
||||||
# This must work even if \$libdir does not exist
|
# This must work even if \$libdir does not exist
|
||||||
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
|
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
|
||||||
|
|
||||||
# If ld is used when linking, flag to hardcode \$libdir into a binary
|
|
||||||
# during linking. This must work even if \$libdir does not exist.
|
|
||||||
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
|
|
||||||
|
|
||||||
# Whether we need a single "-rpath" flag with a separated argument.
|
# Whether we need a single "-rpath" flag with a separated argument.
|
||||||
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
|
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
|
||||||
|
|
||||||
|
|
|
@ -204,13 +204,13 @@ case "${host_os}" in
|
||||||
|
|
||||||
AC_DEFINE(PA_USE_COREAUDIO,1)
|
AC_DEFINE(PA_USE_COREAUDIO,1)
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror"
|
||||||
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
|
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
|
||||||
|
|
||||||
if test "x$enable_mac_universal" = "xyes" ; then
|
if test "x$enable_mac_universal" = "xyes" ; then
|
||||||
case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
|
case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
|
||||||
|
|
||||||
[12]*|3.0|3.1)
|
3.0|3.1)
|
||||||
dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
|
dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
|
||||||
dnl support -sdk, so we can't use that to look for
|
dnl support -sdk, so we can't use that to look for
|
||||||
dnl SDKs. However, in those versions of Xcode, the
|
dnl SDKs. However, in those versions of Xcode, the
|
||||||
|
@ -249,15 +249,33 @@ case "${host_os}" in
|
||||||
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
||||||
mac_version_min="-mmacosx-version-min=10.4"
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.13 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.13 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.14 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.14 Path`"
|
||||||
|
elif xcodebuild -version -sdk macosx10.15 Path >/dev/null 2>&1 ; then
|
||||||
|
mac_version_min="-mmacosx-version-min=10.4"
|
||||||
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.15 Path`"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([Couldn't find 10.5, 10.6, 10.7, 10.8 or 10.9 SDK])
|
AC_MSG_ERROR([Could not find 10.5 to 10.13 SDK.])
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Pick which architectures to build for based on what
|
dnl Pick which architectures to build for based on what
|
||||||
dnl the compiler supports.
|
dnl the compiler supports.
|
||||||
mac_arches=""
|
mac_arches=""
|
||||||
for arch in i386 x86_64 ppc ppc64
|
for arch in x86_64
|
||||||
do
|
do
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -arch $arch"
|
CFLAGS="$CFLAGS -arch $arch"
|
||||||
|
@ -307,18 +325,18 @@ case "${host_os}" in
|
||||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
|
||||||
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS"
|
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS"
|
||||||
|
|
||||||
dnl Setting the windows version flags below resolves a conflict between Interlocked*
|
dnl Setting the windows version flags below resolves a conflict between Interlocked*
|
||||||
dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h
|
dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h
|
||||||
dnl combase.h is included by asiodrvr.h
|
dnl combase.h is included by asiodrvr.h
|
||||||
dnl PortAudio does not actually require Win XP (winver 501) APIs
|
dnl PortAudio does not actually require Win XP (winver 501) APIs
|
||||||
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
|
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
|
||||||
|
|
||||||
CXXFLAGS="$CFLAGS"
|
CXXFLAGS="$CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "x$with_wdmks" = "xyes" ]]; then
|
if [[ "x$with_wdmks" = "xyes" ]]; then
|
||||||
DXDIR="$with_dxdir"
|
DXDIR="$with_dxdir"
|
||||||
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o
|
add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o
|
||||||
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
|
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
|
||||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
||||||
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
||||||
|
@ -337,7 +355,7 @@ case "${host_os}" in
|
||||||
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o
|
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o
|
||||||
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
||||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
||||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
CFLAGS="$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -371,7 +389,7 @@ case "${host_os}" in
|
||||||
dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
|
dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
|
||||||
dnl
|
dnl
|
||||||
THREAD_CFLAGS="-D_REENTRANT"
|
THREAD_CFLAGS="-D_REENTRANT"
|
||||||
|
|
||||||
OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
|
OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
|
||||||
|
|
||||||
dnl SGI books say -lpthread should be the last of the libs mentioned.
|
dnl SGI books say -lpthread should be the last of the libs mentioned.
|
||||||
|
@ -385,7 +403,7 @@ case "${host_os}" in
|
||||||
dnl Unix configuration
|
dnl Unix configuration
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
|
||||||
|
|
||||||
AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
|
AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
|
||||||
AC_MSG_ERROR([libpthread not found!]))
|
AC_MSG_ERROR([libpthread not found!]))
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2009-04-28.21; # UTC
|
scriptversion=2013-05-30.07; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
# Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
'')
|
'')
|
||||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
exit 1;
|
exit 1;
|
||||||
;;
|
;;
|
||||||
-h | --h*)
|
-h | --h*)
|
||||||
cat <<\EOF
|
cat <<\EOF
|
||||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
@ -40,11 +39,11 @@ as side-effects.
|
||||||
|
|
||||||
Environment variables:
|
Environment variables:
|
||||||
depmode Dependency tracking mode.
|
depmode Dependency tracking mode.
|
||||||
source Source file read by `PROGRAMS ARGS'.
|
source Source file read by 'PROGRAMS ARGS'.
|
||||||
object Object file output by `PROGRAMS ARGS'.
|
object Object file output by 'PROGRAMS ARGS'.
|
||||||
DEPDIR directory where to store dependencies.
|
DEPDIR directory where to store dependencies.
|
||||||
depfile Dependency file to output.
|
depfile Dependency file to output.
|
||||||
tmpdepfile Temporary file to use when outputing dependencies.
|
tmpdepfile Temporary file to use when outputting dependencies.
|
||||||
libtool Whether libtool is used (yes/no).
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
@ -57,6 +56,66 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Get the directory component of the given path, and save it in the
|
||||||
|
# global variables '$dir'. Note that this directory component will
|
||||||
|
# be either empty or ending with a '/' character. This is deliberate.
|
||||||
|
set_dir_from ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||||
|
*) dir=;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the suffix-stripped basename of the given path, and save it the
|
||||||
|
# global variable '$base'.
|
||||||
|
set_base_from ()
|
||||||
|
{
|
||||||
|
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no dependency file was actually created by the compiler invocation,
|
||||||
|
# we still have to create a dummy depfile, to avoid errors with the
|
||||||
|
# Makefile "include basename.Plo" scheme.
|
||||||
|
make_dummy_depfile ()
|
||||||
|
{
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Factor out some common post-processing of the generated depfile.
|
||||||
|
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||||
|
aix_post_process_depfile ()
|
||||||
|
{
|
||||||
|
# If the compiler actually managed to produce a dependency file,
|
||||||
|
# post-process it.
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form 'foo.o: dependency.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# $object: dependency.h
|
||||||
|
# and one to simply output
|
||||||
|
# dependency.h:
|
||||||
|
# which is needed to avoid the deleted-header problem.
|
||||||
|
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||||
|
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||||
|
} > "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A tabulation character.
|
||||||
|
tab=' '
|
||||||
|
# A newline character.
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
# Character ranges might be problematic outside the C locale.
|
||||||
|
# These definitions help.
|
||||||
|
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
lower=abcdefghijklmnopqrstuvwxyz
|
||||||
|
digits=0123456789
|
||||||
|
alpha=${upper}${lower}
|
||||||
|
|
||||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Avoid interferences from the environment.
|
||||||
|
gccflag= dashmflag=
|
||||||
|
|
||||||
# Some modes work just like other modes, but use different flags. We
|
# Some modes work just like other modes, but use different flags. We
|
||||||
# parameterize here, but still list the modes in the big case below,
|
# parameterize here, but still list the modes in the big case below,
|
||||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
@ -80,18 +142,32 @@ if test "$depmode" = hp; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$depmode" = dashXmstdout; then
|
if test "$depmode" = dashXmstdout; then
|
||||||
# This is just like dashmstdout with a different argument.
|
# This is just like dashmstdout with a different argument.
|
||||||
dashmflag=-xM
|
dashmflag=-xM
|
||||||
depmode=dashmstdout
|
depmode=dashmstdout
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cygpath_u="cygpath -u -f -"
|
cygpath_u="cygpath -u -f -"
|
||||||
if test "$depmode" = msvcmsys; then
|
if test "$depmode" = msvcmsys; then
|
||||||
# This is just like msvisualcpp but w/o cygpath translation.
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
# slashes to satisfy depend.m4
|
# slashes to satisfy depend.m4
|
||||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
depmode=msvisualcpp
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = msvc7msys; then
|
||||||
|
# This is just like msvc7 but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvc7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = xlc; then
|
||||||
|
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||||
|
gccflag=-qmakedep=gcc,-MF
|
||||||
|
depmode=gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$depmode" in
|
case "$depmode" in
|
||||||
|
@ -114,8 +190,7 @@ gcc3)
|
||||||
done
|
done
|
||||||
"$@"
|
"$@"
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -ne 0; then
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
@ -123,13 +198,17 @@ gcc3)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gcc)
|
gcc)
|
||||||
|
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||||
|
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||||
|
## (see the conditional assignment to $gccflag above).
|
||||||
## There are various ways to get dependency output from gcc. Here's
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
## why we pick this rather obscure method:
|
## why we pick this rather obscure method:
|
||||||
## - Don't want to use -MD because we'd like the dependencies to end
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
## up in a subdir. Having to rename by hand is ugly.
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
## (We might end up doing this anyway to support other compilers.)
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
## -MM, not -M (despite what the docs say).
|
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||||
|
## supported by the other compilers which use the 'gcc' depmode.
|
||||||
## - Using -M directly means running the compiler twice (even worse
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
## than renaming).
|
## than renaming).
|
||||||
if test -z "$gccflag"; then
|
if test -z "$gccflag"; then
|
||||||
|
@ -137,31 +216,31 @@ gcc)
|
||||||
fi
|
fi
|
||||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -ne 0; then
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
# The second -e expression handles DOS-style file names with drive
|
||||||
## The second -e expression handles DOS-style file names with drive letters.
|
# letters.
|
||||||
sed -e 's/^[^:]*: / /' \
|
sed -e 's/^[^:]*: / /' \
|
||||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
## This next piece of magic avoids the `deleted header file' problem.
|
## This next piece of magic avoids the "deleted header file" problem.
|
||||||
## The problem is that when a header file which appears in a .P file
|
## The problem is that when a header file which appears in a .P file
|
||||||
## is deleted, the dependency causes make to die (because there is
|
## is deleted, the dependency causes make to die (because there is
|
||||||
## typically no way to rebuild the header). We avoid this by adding
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
## this for us directly.
|
## this for us directly.
|
||||||
tr ' ' '
|
## Some versions of gcc put a space before the ':'. On the theory
|
||||||
' < "$tmpdepfile" |
|
|
||||||
## Some versions of gcc put a space before the `:'. On the theory
|
|
||||||
## that the space means something, we add a space to the output as
|
## that the space means something, we add a space to the output as
|
||||||
## well.
|
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||||
|
## to the object. Take care to not repeat it in the output.
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -179,8 +258,7 @@ sgi)
|
||||||
"$@" -MDupdate "$tmpdepfile"
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
fi
|
fi
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -ne 0; then
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
@ -188,43 +266,41 @@ sgi)
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
# Clip off the initial element (the dependent). Don't try to be
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
# clever and replace this with sed code, as IRIX sed won't handle
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
# lines with more than a fixed number of characters (4096 in
|
# lines with more than a fixed number of characters (4096 in
|
||||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||||
# dependency line.
|
# dependency line.
|
||||||
tr ' ' '
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
' < "$tmpdepfile" \
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
| tr "$nl" ' ' >> "$depfile"
|
||||||
tr '
|
|
||||||
' ' ' >> "$depfile"
|
|
||||||
echo >> "$depfile"
|
echo >> "$depfile"
|
||||||
|
|
||||||
# The second pass generates a dummy entry for each header file.
|
# The second pass generates a dummy entry for each header file.
|
||||||
tr ' ' '
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
' < "$tmpdepfile" \
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
>> "$depfile"
|
||||||
>> "$depfile"
|
|
||||||
else
|
else
|
||||||
# The sourcefile does not contain any dependencies, so just
|
make_dummy_depfile
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
|
||||||
# "include basename.Plo" scheme.
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
fi
|
fi
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
xlc)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
aix)
|
aix)
|
||||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
# in a .u file. In older versions, this file always lives in the
|
# in a .u file. In older versions, this file always lives in the
|
||||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||||
# start of each line; $object doesn't have directory information.
|
# start of each line; $object doesn't have directory information.
|
||||||
# Version 6 uses the directory in both cases.
|
# Version 6 uses the directory in both cases.
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
set_dir_from "$object"
|
||||||
test "x$dir" = "x$object" && dir=
|
set_base_from "$object"
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
tmpdepfile1=$dir$base.u
|
tmpdepfile1=$dir$base.u
|
||||||
tmpdepfile2=$base.u
|
tmpdepfile2=$base.u
|
||||||
|
@ -237,9 +313,7 @@ aix)
|
||||||
"$@" -M
|
"$@" -M
|
||||||
fi
|
fi
|
||||||
stat=$?
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
@ -248,44 +322,100 @@ aix)
|
||||||
do
|
do
|
||||||
test -f "$tmpdepfile" && break
|
test -f "$tmpdepfile" && break
|
||||||
done
|
done
|
||||||
if test -f "$tmpdepfile"; then
|
aix_post_process_depfile
|
||||||
# Each line is of the form `foo.o: dependent.h'.
|
;;
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
tcc)
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||||
# That's a tab and a space in the [].
|
# FIXME: That version still under development at the moment of writing.
|
||||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
# Make that this statement remains true also for stable, released
|
||||||
else
|
# versions.
|
||||||
# The sourcefile does not contain any dependencies, so just
|
# It will wrap lines (doesn't matter whether long or short) with a
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
# trailing '\', as in:
|
||||||
# "include basename.Plo" scheme.
|
#
|
||||||
echo "#dummy" > "$depfile"
|
# foo.o : \
|
||||||
|
# foo.c \
|
||||||
|
# foo.h \
|
||||||
|
#
|
||||||
|
# It will put a trailing '\' even on the last line, and will use leading
|
||||||
|
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||||
|
# "Emit spaces for -MD").
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||||
|
# We have to change lines of the first kind to '$object: \'.
|
||||||
|
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||||
|
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||||
|
# dummy dependency, to avoid the deleted-header problem.
|
||||||
|
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
icc)
|
## The order of this option in the case statement is important, since the
|
||||||
# Intel's C compiler understands `-MD -MF file'. However on
|
## shell code in configure will try each of these formats in the order
|
||||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
## listed in this file. A plain '-MD' option would be understood by many
|
||||||
# ICC 7.0 will fill foo.d with something like
|
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||||
# foo.o: sub/foo.c
|
pgcc)
|
||||||
# foo.o: sub/foo.h
|
# Portland's C compiler understands '-MD'.
|
||||||
# which is wrong. We want:
|
# Will always output deps to 'file.d' where file is the root name of the
|
||||||
# sub/foo.o: sub/foo.c
|
# source file under compilation, even if file resides in a subdirectory.
|
||||||
# sub/foo.o: sub/foo.h
|
# The object file name does not affect the name of the '.d' file.
|
||||||
# sub/foo.c:
|
# pgcc 10.2 will output
|
||||||
# sub/foo.h:
|
|
||||||
# ICC 7.1 will output
|
|
||||||
# foo.o: sub/foo.c sub/foo.h
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
# and will wrap long lines using \ :
|
# and will wrap long lines using '\' :
|
||||||
# foo.o: sub/foo.c ... \
|
# foo.o: sub/foo.c ... \
|
||||||
# sub/foo.h ... \
|
# sub/foo.h ... \
|
||||||
# ...
|
# ...
|
||||||
|
set_dir_from "$object"
|
||||||
|
# Use the source, not the object, to determine the base name, since
|
||||||
|
# that's sadly what pgcc will do too.
|
||||||
|
set_base_from "$source"
|
||||||
|
tmpdepfile=$base.d
|
||||||
|
|
||||||
"$@" -MD -MF "$tmpdepfile"
|
# For projects that build the same source file twice into different object
|
||||||
stat=$?
|
# files, the pgcc approach of using the *source* file root name can cause
|
||||||
if test $stat -eq 0; then :
|
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||||
else
|
# the same $tmpdepfile.
|
||||||
|
lockdir=$base.d-lock
|
||||||
|
trap "
|
||||||
|
echo '$0: caught signal, cleaning up...' >&2
|
||||||
|
rmdir '$lockdir'
|
||||||
|
exit 1
|
||||||
|
" 1 2 13 15
|
||||||
|
numtries=100
|
||||||
|
i=$numtries
|
||||||
|
while test $i -gt 0; do
|
||||||
|
# mkdir is a portable test-and-set.
|
||||||
|
if mkdir "$lockdir" 2>/dev/null; then
|
||||||
|
# This process acquired the lock.
|
||||||
|
"$@" -MD
|
||||||
|
stat=$?
|
||||||
|
# Release the lock.
|
||||||
|
rmdir "$lockdir"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
# If the lock is being held by a different process, wait
|
||||||
|
# until the winning process is done or we timeout.
|
||||||
|
while test -d "$lockdir" && test $i -gt 0; do
|
||||||
|
sleep 1
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
trap - 1 2 13 15
|
||||||
|
if test $i -le 0; then
|
||||||
|
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||||
|
echo "$0: check lockdir '$lockdir'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -ne 0; then
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
@ -297,8 +427,8 @@ icc)
|
||||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||||
sed -e 's/$/ :/' >> "$depfile"
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -309,9 +439,8 @@ hp2)
|
||||||
# 'foo.d', which lands next to the object file, wherever that
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
# happens to be.
|
# happens to be.
|
||||||
# Much of this is similar to the tru64 case; see comments there.
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
set_dir_from "$object"
|
||||||
test "x$dir" = "x$object" && dir=
|
set_base_from "$object"
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
tmpdepfile1=$dir$base.d
|
tmpdepfile1=$dir$base.d
|
||||||
tmpdepfile2=$dir.libs/$base.d
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
@ -322,8 +451,7 @@ hp2)
|
||||||
"$@" +Maked
|
"$@" +Maked
|
||||||
fi
|
fi
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -ne 0; then
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
@ -333,77 +461,107 @@ hp2)
|
||||||
test -f "$tmpdepfile" && break
|
test -f "$tmpdepfile" && break
|
||||||
done
|
done
|
||||||
if test -f "$tmpdepfile"; then
|
if test -f "$tmpdepfile"; then
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
# Add `dependent.h:' lines.
|
# Add 'dependent.h:' lines.
|
||||||
sed -ne '2,${
|
sed -ne '2,${
|
||||||
s/^ *//
|
s/^ *//
|
||||||
s/ \\*$//
|
s/ \\*$//
|
||||||
s/$/:/
|
s/$/:/
|
||||||
p
|
p
|
||||||
}' "$tmpdepfile" >> "$depfile"
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
else
|
else
|
||||||
echo "#dummy" > "$depfile"
|
make_dummy_depfile
|
||||||
fi
|
fi
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
tru64)
|
tru64)
|
||||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
# dependencies in `foo.d' instead, so we check for that too.
|
# dependencies in 'foo.d' instead, so we check for that too.
|
||||||
# Subdirectories are respected.
|
# Subdirectories are respected.
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
set_dir_from "$object"
|
||||||
test "x$dir" = "x$object" && dir=
|
set_base_from "$object"
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
|
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
# With Tru64 cc, shared objects can also be used to make a
|
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||||
# static library. This mechanism is used in libtool 1.4 series to
|
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
# handle both shared and static libraries in a single compilation.
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
# one of the two compilations can be disabled. We should prefer
|
||||||
#
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
# With libtool 1.5 this exception was removed, and libtool now
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
# generates 2 separate objects for the 2 libraries. These two
|
# the former would cause a distcleancheck panic.
|
||||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||||
# in $dir$base.o.d. We have to check for both files, because
|
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||||
# one of the two compilations can be disabled. We should prefer
|
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
"$@" -Wc,-MD
|
||||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
else
|
||||||
# the former would cause a distcleancheck panic.
|
tmpdepfile1=$dir$base.d
|
||||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
tmpdepfile2=$dir$base.d
|
||||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
tmpdepfile3=$dir$base.d
|
||||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
"$@" -MD
|
||||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
fi
|
||||||
"$@" -Wc,-MD
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.o.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
tmpdepfile3=$dir$base.d
|
|
||||||
tmpdepfile4=$dir$base.d
|
|
||||||
"$@" -MD
|
|
||||||
fi
|
|
||||||
|
|
||||||
stat=$?
|
stat=$?
|
||||||
if test $stat -eq 0; then :
|
if test $stat -ne 0; then
|
||||||
else
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
exit $stat
|
||||||
exit $stat
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
do
|
do
|
||||||
test -f "$tmpdepfile" && break
|
test -f "$tmpdepfile" && break
|
||||||
done
|
done
|
||||||
if test -f "$tmpdepfile"; then
|
# Same post-processing that is required for AIX mode.
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
aix_post_process_depfile
|
||||||
# That's a tab and a space in the [].
|
;;
|
||||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
msvc7)
|
||||||
echo "#dummy" > "$depfile"
|
if test "$libtool" = yes; then
|
||||||
fi
|
showIncludes=-Wc,-showIncludes
|
||||||
rm -f "$tmpdepfile"
|
else
|
||||||
;;
|
showIncludes=-showIncludes
|
||||||
|
fi
|
||||||
|
"$@" $showIncludes > "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The first sed program below extracts the file names and escapes
|
||||||
|
# backslashes for cygpath. The second sed program outputs the file
|
||||||
|
# name when reading, but also accumulates all include files in the
|
||||||
|
# hold buffer in order to output them again at the end. This only
|
||||||
|
# works with sed implementations that can handle large buffers.
|
||||||
|
sed < "$tmpdepfile" -n '
|
||||||
|
/^Note: including file: *\(.*\)/ {
|
||||||
|
s//\1/
|
||||||
|
s/\\/\\\\/g
|
||||||
|
p
|
||||||
|
}' | $cygpath_u | sort -u | sed -n '
|
||||||
|
s/ /\\ /g
|
||||||
|
s/\(.*\)/'"$tab"'\1 \\/p
|
||||||
|
s/.\(.*\) \\/\1:/
|
||||||
|
H
|
||||||
|
$ {
|
||||||
|
s/.*/'"$tab"'/
|
||||||
|
G
|
||||||
|
p
|
||||||
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7msys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
#nosideeffect)
|
#nosideeffect)
|
||||||
# This comment above is used by automake to tell side-effect
|
# This comment above is used by automake to tell side-effect
|
||||||
|
@ -422,7 +580,7 @@ dashmstdout)
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove `-o $object'.
|
# Remove '-o $object'.
|
||||||
IFS=" "
|
IFS=" "
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
|
@ -442,18 +600,18 @@ dashmstdout)
|
||||||
done
|
done
|
||||||
|
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
# Require at least two characters before searching for `:'
|
# Require at least two characters before searching for ':'
|
||||||
# in the target name. This is to cope with DOS-style filenames:
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||||
"$@" $dashmflag |
|
"$@" $dashmflag |
|
||||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
tr ' ' '
|
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||||
' < "$tmpdepfile" | \
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -503,12 +661,15 @@ makedepend)
|
||||||
touch "$tmpdepfile"
|
touch "$tmpdepfile"
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
# makedepend may prepend the VPATH from the source file name to the object.
|
||||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||||
' | \
|
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
sed '1,2d' "$tmpdepfile" \
|
||||||
|
| tr ' ' "$nl" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -525,7 +686,7 @@ cpp)
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove `-o $object'.
|
# Remove '-o $object'.
|
||||||
IFS=" "
|
IFS=" "
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
|
@ -544,10 +705,10 @@ cpp)
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
"$@" -E |
|
"$@" -E \
|
||||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
sed '$ s: \\$::' > "$tmpdepfile"
|
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
@ -579,23 +740,23 @@ msvisualcpp)
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
set fnord "$@"
|
set fnord "$@"
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
set fnord "$@" "$arg"
|
set fnord "$@" "$arg"
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
"$@" -E 2>/dev/null |
|
"$@" -E 2>/dev/null |
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||||
echo " " >> "$depfile"
|
echo "$tab" >> "$depfile"
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -112,7 +112,7 @@ Many of the tests in the /tests directory of the PortAudio distribution implemen
|
||||||
|
|
||||||
@subsection read_write_io_method The Read/Write I/O Method
|
@subsection read_write_io_method The Read/Write I/O Method
|
||||||
|
|
||||||
As an alternative to the callback I/O method, PortAudio provides a synchronous read/write interface for acquiring and playing audio. This can be useful for applications that don't require the lowest possibly latency, or don't warrant the increased complexity of synchronising with an asynchronous callback funciton. This I/O method is also useful when calling PortAudio from programming languages that don't support asynchronous callbacks.
|
As an alternative to the callback I/O method, PortAudio provides a synchronous read/write interface for acquiring and playing audio. This can be useful for applications that don't require the lowest possibly latency, or don't warrant the increased complexity of synchronising with an asynchronous callback function. This I/O method is also useful when calling PortAudio from programming languages that don't support asynchronous callbacks.
|
||||||
|
|
||||||
To open a Stream in read/write mode you pass a NULL stream callback function pointer to Pa_OpenStream().
|
To open a Stream in read/write mode you pass a NULL stream callback function pointer to Pa_OpenStream().
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,16 @@ The library provides functions that allow your software to acquire and output re
|
||||||
|
|
||||||
@section start_here Start here
|
@section start_here Start here
|
||||||
|
|
||||||
- @ref api_overview<br>
|
- @ref api_overview <br>
|
||||||
A top-down view of the PortAudio API, its capabilities, functions and data structures
|
A top-down view of the PortAudio API, its capabilities, functions and data structures
|
||||||
|
|
||||||
- @ref tutorial_start<br>
|
- @ref tutorial_start <br>
|
||||||
Get started writing code with PortAudio tutorials
|
Get started writing code with PortAudio tutorials
|
||||||
|
|
||||||
- @ref examples_src "Examples"<br>
|
- @ref examples_src "Examples"<br>
|
||||||
Simple example programs demonstrating PortAudio usage
|
Simple example programs demonstrating PortAudio usage
|
||||||
|
|
||||||
- @ref License<br>
|
- @ref License <br>
|
||||||
PortAudio is licenced under the MIT Expat open source licence. We make a non-binding request for you to contribute your changes back to the project.
|
PortAudio is licenced under the MIT Expat open source licence. We make a non-binding request for you to contribute your changes back to the project.
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,12 +34,9 @@ Documentation for non-portable platform-specific host API extensions
|
||||||
|
|
||||||
- <a href="http://www.portaudio.com">The PortAudio website</a>
|
- <a href="http://www.portaudio.com">The PortAudio website</a>
|
||||||
|
|
||||||
- <a href="http://music.columbia.edu/mailman/listinfo/portaudio/">Our mailing list for users and developers</a><br>
|
- <a href="http://www.portaudio.com/contacts.html">Our mailing list for users and developers</a><br>
|
||||||
|
|
||||||
- <a href="http://www.assembla.com/spaces/portaudio/wiki">The PortAudio wiki</a>
|
- <a href="https://github.com/PortAudio/portaudio/wiki">The PortAudio wiki</a>
|
||||||
|
|
||||||
- @ref java_binding<br>
|
|
||||||
Documentation for the Java JNI interface to PortAudio
|
|
||||||
|
|
||||||
@section developer_resources Developer Resources
|
@section developer_resources Developer Resources
|
||||||
|
|
||||||
|
@ -47,16 +44,20 @@ Documentation for the Java JNI interface to PortAudio
|
||||||
- @ref srcguide
|
- @ref srcguide
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
- <a href="http://www.assembla.com/spaces/portaudio/wiki">Our wiki and issue tracking system</a>
|
- <a href="https://github.com/PortAudio/portaudio/">Our repository on GitHub</a>
|
||||||
|
|
||||||
- <a href="http://www.portaudio.com/docs/proposals/014-StyleGuide.html">Coding guidelines</a>
|
- <a href="https://github.com/PortAudio/portaudio/wiki/DeveloperGuidelines">Developer guidelines</a>
|
||||||
|
|
||||||
If you're interested in helping out with PortAudio development we're more than happy for you to be involved. Just drop by the PortAudio mailing list and ask how you can help. Or <a href="http://www.assembla.com/spaces/portaudio/tickets">check out the starter tickets</a>.
|
- <a href="https://github.com/PortAudio/portaudio/wiki/ImplementationStyleGuidelines">Implementation style guidelines</a>
|
||||||
|
|
||||||
|
If you're interested in helping out with PortAudio development we're more than happy for you to be involved.
|
||||||
|
Just drop by the PortAudio mailing list and ask how you can help.
|
||||||
|
Or check out these <a href="https://github.com/PortAudio/portaudio/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22">
|
||||||
|
recommended starter issues</a>.
|
||||||
|
|
||||||
@section older_api_versions Older API Versions
|
@section older_api_versions Older API Versions
|
||||||
|
|
||||||
This documentation covers the current API version: PortAudio V19, API version 2.0. API 2.0 differs in a number of ways from previous versions (most often encountered in PortAudio V18), please consult the enhancement proposals for details of what was added/changed for V19:
|
This documentation covers the current API version: PortAudio V19, API version 2.0. API 2.0 differs in a number of ways from previous versions (most often encountered in PortAudio V18), please consult the enhancement proposals for details of what was added/changed for V19:
|
||||||
http://www.portaudio.com/docs/proposals/index.html
|
http://www.portaudio.com/docs/proposals/index.html
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,29 +1,57 @@
|
||||||
/** @page compile_cmake Creating MSVC Build Files via CMake
|
/** @page compile_cmake PortAudio on Windows, OS X or Linux via. CMake
|
||||||
@ingroup tutorial
|
@ingroup tutorial
|
||||||
|
|
||||||
This is a simple "How-to" for creating build files for Microsoft Visual C++ via CMake and the CMakeLists.txt file
|
@section cmake_building Building PortAudio stand-alone on Windows, OS X or Linux
|
||||||
|
|
||||||
1. Install CMake if you haven't got it already ([http://www.cmake.org], minimum version required is 2.8).
|
CMake can be used to generate Visual Studio solutions on Windows, Makefiles (on Linux and OS X) and build metadata for other build systems for PortAudio. You should obtain a recent version of CMake from [http://www.cmake.org] if you do not have one already. If you are unfamiliar with CMake, this section will provide some information on using CMake to build PortAudio.
|
||||||
|
|
||||||
2. If you want ASIO support you need to D/L the ASIO2 SDK from Steinberg, and place it according to \ref compile_windows_asio_msvc
|
On Linux, CMake serves a very similar purpose to an autotools "configure" script - except it can generate build metadata apart from Makefiles. The equivalent of the following on POSIX'y systems:
|
||||||
|
|
||||||
3. Run the CMake GUI application and browse to <b>source files</b> directory and <b>build</b> directory:
|
build_path> {portaudio path}/configure --prefix=/install_location
|
||||||
a. The <b>source files</b> directory (<i>"Where is the source code"</i>) is where the portaudio CMakeLists.txt file is located.
|
build_path> make
|
||||||
b. The <b>build</b> directory (<i>"Where to build the binaries"</i>) is pretty much anywhere you like. A common practice though is to have the build directory located <b>outside</b> the
|
build_path> make install
|
||||||
source files tree (a so called "out-of-source build")
|
|
||||||
|
|
||||||
4. Click <i>Configure</i>. This will prompt you to select which build files to generate. <b>Note</b> Only Microsoft Visual C++ build files currently supported!
|
Would be:
|
||||||
|
|
||||||
5. In the CMake option list, enable the PORTAUDIO_xxx options you need, then click <i>Configure</i> again (Note that after this there are no options marked with red color)
|
build_path> cmake {portaudio path} -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/install_location
|
||||||
|
build_path> make
|
||||||
|
build_path> make install
|
||||||
|
|
||||||
6. Click <i>Generate</i> and you'll now (hopefully) have your VS build files in your previously defined <b>build</b> directory.
|
The "-G" option specifies the type of build metadata which will be generated. You can obtain a list of supported build metadata formats by invoking (on any platform):
|
||||||
|
|
||||||
Both ASIO and DirectX SDK are automatically searched for by the CMake script, so if you have DirectX SDK installed and have placed the ASIO2 SDK according to point 2 above, you should be able to build portaudio with !DirectSound and ASIO support.
|
cmake -G
|
||||||
|
|
||||||
Should you later on decide to change a portaudio option, just jump in at step 5 above (MSVC will then prompt you to reload projects/solutions/workspace)
|
"make install" should install the same set of files that are installed using the usual configure script included with PortAudio along with a few extra files (similar to pkg-config metadata files) which make it easier for other CMake projects to use the installed libraries.
|
||||||
|
|
||||||
--- Robert Bielik
|
On Windows, you can use CMake to generate Visual Studio project files which can be used to create the PortAudio libraries. The following serves as an example (and should be done from a directory outside the PortAudio tree) which will create Visual Studio 2015 project files targeting a 64-bit build:
|
||||||
|
|
||||||
Back to the Tutorial: \ref tutorial_start
|
C:\PABUILD> cmake {portaudio path} -G "Visual Studio 14 2015 Win64"
|
||||||
|
|
||||||
|
After executing the above, you can either open the generated solution with Visual Studio or use CMake to invoke the build process. The following shows an example of how to build a release configuration (assuming the above command was executed previously in the same directory):
|
||||||
|
|
||||||
|
C:\PABUILD> cmake --build . --config Release
|
||||||
|
|
||||||
|
If you want ASIO support you need to obtain the ASIO2 SDK from Steinberg and place it according to \ref compile_windows_asio_msvc. Both ASIO and the DirectX SDK are automatically searched for by the CMake script - if they are found, they will be enabled by default.
|
||||||
|
|
||||||
|
@section cmake_using Using PortAudio in your CMake project
|
||||||
|
|
||||||
|
PortAudio defines the following CMake targets:
|
||||||
|
|
||||||
|
- "portaudio_static" for a static library and
|
||||||
|
- "portaudio" for a dynamic library
|
||||||
|
|
||||||
|
If you installed PortAudio as described above in \ref cmake_building and the install prefix you used (CMAKE_INSTALL_PREFIX) is in your system PATH or CMAKE_MODULE_PATH CMake variable, you should be able to use:
|
||||||
|
|
||||||
|
find_package(portaudio)
|
||||||
|
|
||||||
|
To define the "portaudio_static" and "portaudio" targets in your CMake project.
|
||||||
|
|
||||||
|
If you do not want to install portaudio into your system but would rather just have it get built as part of your own project (which may be particularly convenient on Windows), you may also use:
|
||||||
|
|
||||||
|
add_subdirectory("path to PortAudio location" "some binary directory" EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
EXCLUDE_FROM_ALL is not strictly necessary, but will ensure that targets which you don't use in your project won't get built.
|
||||||
|
|
||||||
|
Back to \ref tutorial_start
|
||||||
|
|
||||||
*/
|
*/
|
|
@ -32,7 +32,7 @@ That will build PortAudio using Jack, ALSA and OSS in whatever combination they
|
||||||
To use PortAudio in your apps, you can simply install the .so files:
|
To use PortAudio in your apps, you can simply install the .so files:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
make install
|
sudo make install
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:
|
Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:
|
||||||
|
@ -41,10 +41,16 @@ Projects built this way will expect PortAudio to be installed on target systems
|
||||||
cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR
|
cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
You may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the approriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:
|
On some systems you may need to use:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
gcc -lrt -lasound -ljack -lpthread -o YOUR_BINARY main.c libportaudio.a
|
cp /usr/local/lib/libportaudio.a /YOUR/PROJECT/DIR
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
You may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the appropriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:
|
||||||
|
|
||||||
|
@code
|
||||||
|
gcc main.c libportaudio.a -lrt -lm -lasound -ljack -pthread -o YOUR_BINARY
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
@section comp_linux4 Linux Extensions
|
@section comp_linux4 Linux Extensions
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
@section comp_mingw1 Portaudio for Windows With MinGW
|
@section comp_mingw1 Portaudio for Windows With MinGW
|
||||||
|
|
||||||
<i>The following document is still being reviewed</i>
|
<strong>This document contains old or out-of-date information. Please see
|
||||||
|
a draft of new MinGW information on our
|
||||||
|
Wiki: <a href="https://github.com/PortAudio/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW">
|
||||||
|
PortAudio Wiki: Notes about building PortAudio with MinGW</a></strong>
|
||||||
|
|
||||||
= MinGW/MSYS =
|
= MinGW/MSYS =
|
||||||
|
|
||||||
|
@ -50,4 +53,4 @@ To update your copy or check out a fresh copy of the source
|
||||||
|
|
||||||
Back to the Tutorial: \ref tutorial_start
|
Back to the Tutorial: \ref tutorial_start
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,7 @@ PortAudio will not start playing back audio until you start the stream. After ca
|
||||||
if( err != paNoError ) goto error;
|
if( err != paNoError ) goto error;
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
You can communicate with your callback routine through the data structure you passed in on the open call, or through global variables, or using other interprocess communication techniques, but please be aware that your callback function may be called at interrupt time when your foreground process is least expecting it. So avoid sharing complex data structures that are easily corrupted like double linked lists, and avoid using locks such as mutexs as this may cause your callback function to block and therefore drop audio. Such techniques may even cause deadlock on some platforms.
|
You can communicate with your callback routine through the data structure you passed in on the open call, or through global variables, or using other interprocess communication techniques, but please be aware that your callback function may be called at interrupt time when your foreground process is least expecting it. So avoid sharing complex data structures that are easily corrupted like double linked lists, and avoid using locks such as mutexes as this may cause your callback function to block and therefore drop audio. Such techniques may even cause deadlock on some platforms.
|
||||||
|
|
||||||
PortAudio will continue to call your callback and process audio until you stop the stream. This can be done in one of several ways, but, before we do so, we'll want to see that some of our audio gets processed by sleeping for a few seconds. This is easy to do with Pa_Sleep(), which is used by many of the examples in the patests/ directory for exactly this purpose. Note that, for a variety of reasons, you can not rely on this function for accurate scheduling, so your stream may not run for exactly the same amount of time as you expect, but it's good enough for our example.
|
PortAudio will continue to call your callback and process audio until you stop the stream. This can be done in one of several ways, but, before we do so, we'll want to see that some of our audio gets processed by sleeping for a few seconds. This is easy to do with Pa_Sleep(), which is used by many of the examples in the patests/ directory for exactly this purpose. Note that, for a variety of reasons, you can not rely on this function for accurate scheduling, so your stream may not run for exactly the same amount of time as you expect, but it's good enough for our example.
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,13 @@ Once you've downloaded PortAudio you'll need to compile it, which of course, dep
|
||||||
- \ref compile_windows
|
- \ref compile_windows
|
||||||
- \ref compile_windows_mingw
|
- \ref compile_windows_mingw
|
||||||
- \ref compile_windows_asio_msvc
|
- \ref compile_windows_asio_msvc
|
||||||
- \ref compile_cmake
|
|
||||||
- Mac OS X
|
- Mac OS X
|
||||||
- \ref compile_mac_coreaudio
|
- \ref compile_mac_coreaudio
|
||||||
- POSIX
|
- POSIX
|
||||||
- \ref compile_linux
|
- \ref compile_linux
|
||||||
|
|
||||||
|
You can also use CMake to generate project files for PortAudio on Windows, OS X or Linux or include PortAudio easily in your own CMake project. See \ref compile_cmake.
|
||||||
|
|
||||||
Many platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code.
|
Many platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code.
|
||||||
|
|
||||||
@section tut_start3 Programming with PortAudio
|
@section tut_start3 Programming with PortAudio
|
||||||
|
@ -36,7 +37,9 @@ Below are the steps to writing a PortAudio application using the callback techni
|
||||||
|
|
||||||
In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality.
|
In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality.
|
||||||
|
|
||||||
In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API. Also see the page for <a href="http://www.assembla.com/spaces/portaudio/wiki/Tips">tips on programming PortAudio</a> on the PortAudio wiki.
|
In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API.
|
||||||
|
Also see the page for <a href="https://github.com/PortAudio/portaudio/wiki/Tips">tips on programming PortAudio</a>
|
||||||
|
on the PortAudio wiki.
|
||||||
|
|
||||||
@section tut_start4 Programming Tutorial Contents
|
@section tut_start4 Programming Tutorial Contents
|
||||||
|
|
||||||
|
@ -55,4 +58,4 @@ Once you have a basic understanding of how to use PortAudio, you might be intere
|
||||||
|
|
||||||
Next: \ref writing_a_callback
|
Next: \ref writing_a_callback
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,14 +18,23 @@ paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" )
|
||||||
## This can be used as a first-level check to make sure the documentation is in order.
|
## This can be used as a first-level check to make sure the documentation is in order.
|
||||||
##
|
##
|
||||||
## The idea is to get a list of which files are missing doxygen documentation.
|
## The idea is to get a list of which files are missing doxygen documentation.
|
||||||
|
##
|
||||||
|
## How to run:
|
||||||
|
## $ cd doc/utils
|
||||||
|
## $ python checkfiledocs.py
|
||||||
|
|
||||||
|
def oneOf_a_in_b(a, b):
|
||||||
|
for x in a:
|
||||||
|
if x in b:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
# recurse from top and return a list of all with the given
|
# recurse from top and return a list of all with the given
|
||||||
# extensions. ignore .svn directories. return absolute paths
|
# extensions. ignore .svn directories. return absolute paths
|
||||||
def recursiveFindFiles( top, extensions, includePaths ):
|
def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):
|
||||||
result = []
|
result = []
|
||||||
for (dirpath, dirnames, filenames) in os.walk(top):
|
for (dirpath, dirnames, filenames) in os.walk(top):
|
||||||
if not '.svn' in dirpath:
|
if not oneOf_a_in_b(dirBlacklist, dirpath):
|
||||||
for f in filenames:
|
for f in filenames:
|
||||||
if os.path.splitext(f)[1] in extensions:
|
if os.path.splitext(f)[1] in extensions:
|
||||||
if includePaths:
|
if includePaths:
|
||||||
|
@ -41,8 +50,9 @@ def doxygenHtmlDocFileName( sourceFile ):
|
||||||
return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'
|
return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'
|
||||||
|
|
||||||
|
|
||||||
sourceFiles = recursiveFindFiles( paRootDirectory, [ '.c', '.h', '.cpp' ], True );
|
sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );
|
||||||
docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], False );
|
sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True );
|
||||||
|
docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_ASIO_H
|
#ifndef PA_ASIO_H
|
||||||
#define PA_ASIO_H
|
#define PA_ASIO_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_asio.h 1667 2011-05-02 15:49:20Z rossb $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* ASIO specific extensions
|
* ASIO specific extensions
|
||||||
*
|
*
|
||||||
|
@ -52,7 +52,7 @@ extern "C"
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
/** Retrieve legal native buffer sizes for the specificed device, in sample frames.
|
/** Retrieve legal native buffer sizes for the specified device, in sample frames.
|
||||||
|
|
||||||
@param device The global index of the device about which the query is being made.
|
@param device The global index of the device about which the query is being made.
|
||||||
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
||||||
|
@ -112,7 +112,7 @@ PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
|
||||||
@param stream The stream to operate on.
|
@param stream The stream to operate on.
|
||||||
@param sampleRate The new sample rate.
|
@param sampleRate The new sample rate.
|
||||||
|
|
||||||
Note that this function may fail if the stream is alredy running and the
|
Note that this function may fail if the stream is already running and the
|
||||||
ASIO driver does not support switching the sample rate of a running stream.
|
ASIO driver does not support switching the sample rate of a running stream.
|
||||||
|
|
||||||
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
|
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define PA_LINUX_ALSA_H
|
#define PA_LINUX_ALSA_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Id: pa_linux_alsa.h 1597 2011-02-11 00:15:51Z dmitrykos $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* ALSA-specific extensions
|
* ALSA-specific extensions
|
||||||
*
|
*
|
||||||
|
|
|
@ -112,20 +112,20 @@ AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s );
|
||||||
* Returns a statically allocated string with the device's name
|
* Returns a statically allocated string with the device's name
|
||||||
* for the given channel. NULL will be returned on failure.
|
* for the given channel. NULL will be returned on failure.
|
||||||
*
|
*
|
||||||
* This function's implemenation is not complete!
|
* This function's implementation is not complete!
|
||||||
*
|
*
|
||||||
* @param device The PortAudio device index.
|
* @param device The PortAudio device index.
|
||||||
* @param channel The channel number who's name is requested.
|
* @param channel The channel number who's name is requested.
|
||||||
* @return a statically allocated string with the name of the device.
|
* @return a statically allocated string with the name of the device.
|
||||||
* Because this string is statically allocated, it must be
|
* Because this string is statically allocated, it must be
|
||||||
* coppied if it is to be saved and used by the user after
|
* copied if it is to be saved and used by the user after
|
||||||
* another call to this function.
|
* another call to this function.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input );
|
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input );
|
||||||
|
|
||||||
|
|
||||||
/** Retrieve the range of legal native buffer sizes for the specificed device, in sample frames.
|
/** Retrieve the range of legal native buffer sizes for the specified device, in sample frames.
|
||||||
|
|
||||||
@param device The global index of the PortAudio device about which the query is being made.
|
@param device The global index of the PortAudio device about which the query is being made.
|
||||||
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
||||||
|
@ -158,7 +158,7 @@ PaError PaMacCore_GetBufferSizeRange( PaDeviceIndex device,
|
||||||
* are supported by the device. */
|
* are supported by the device. */
|
||||||
#define paMacCoreFailIfConversionRequired (0x02)
|
#define paMacCoreFailIfConversionRequired (0x02)
|
||||||
|
|
||||||
/** These flags set the SR conversion quality, if required. The wierd ordering
|
/** These flags set the SR conversion quality, if required. The weird ordering
|
||||||
* allows Maximum Quality to be the default.*/
|
* allows Maximum Quality to be the default.*/
|
||||||
#define paMacCoreConversionQualityMin (0x0100)
|
#define paMacCoreConversionQualityMin (0x0100)
|
||||||
#define paMacCoreConversionQualityMedium (0x0200)
|
#define paMacCoreConversionQualityMedium (0x0200)
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
/*
|
/*
|
||||||
* $Id: $
|
* $Id: $
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* DirectSound specific extensions
|
* WASAPI specific extensions
|
||||||
*
|
*
|
||||||
* Copyright (c) 1999-2007 Ross Bencina and Phil Burk
|
* Copyright (c) 1999-2018 Ross Bencina and Phil Burk
|
||||||
|
* Copyright (c) 2006-2010 David Viens
|
||||||
|
* Copyright (c) 2010-2018 Dmitry Kostjuchenko
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files
|
* a copy of this software and associated documentation files
|
||||||
|
@ -28,13 +30,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The text above constitutes the entire PortAudio license; however,
|
* The text above constitutes the entire PortAudio license; however,
|
||||||
* the PortAudio community also makes the following non-binding requests:
|
* the PortAudio community also makes the following non-binding requests:
|
||||||
*
|
*
|
||||||
* Any person wishing to distribute modifications to the Software is
|
* Any person wishing to distribute modifications to the Software is
|
||||||
* requested to send the modifications to the original developer so that
|
* requested to send the modifications to the original developer so that
|
||||||
* they can be incorporated into the canonical version. It is also
|
* they can be incorporated into the canonical version. It is also
|
||||||
* requested that these non-binding requests be included along with the
|
* requested that these non-binding requests be included along with the
|
||||||
* license above.
|
* license above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,26 +54,37 @@ extern "C"
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
/* Setup flags */
|
/* Stream setup flags. */
|
||||||
typedef enum PaWasapiFlags
|
typedef enum PaWasapiFlags
|
||||||
{
|
{
|
||||||
/* puts WASAPI into exclusive mode */
|
/* put WASAPI into exclusive mode */
|
||||||
paWinWasapiExclusive = (1 << 0),
|
paWinWasapiExclusive = (1 << 0),
|
||||||
|
|
||||||
/* allows to skip internal PA processing completely */
|
/* allow to skip internal PA processing completely */
|
||||||
paWinWasapiRedirectHostProcessor = (1 << 1),
|
paWinWasapiRedirectHostProcessor = (1 << 1),
|
||||||
|
|
||||||
/* assigns custom channel mask */
|
/* assign custom channel mask */
|
||||||
paWinWasapiUseChannelMask = (1 << 2),
|
paWinWasapiUseChannelMask = (1 << 2),
|
||||||
|
|
||||||
/* selects non-Event driven method of data read/write
|
/* select non-Event driven method of data read/write
|
||||||
Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
|
Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
|
||||||
method can only provide 15-20ms latency. */
|
method can only provide 15-20ms latency. */
|
||||||
paWinWasapiPolling = (1 << 3),
|
paWinWasapiPolling = (1 << 3),
|
||||||
|
|
||||||
/* forces custom thread priority setting. must be used if PaWasapiStreamInfo::threadPriority
|
/* force custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority
|
||||||
is set to custom value. */
|
is set to a custom value */
|
||||||
paWinWasapiThreadPriority = (1 << 4)
|
paWinWasapiThreadPriority = (1 << 4),
|
||||||
|
|
||||||
|
/* force explicit sample format and do not allow PA to select suitable working format, API will
|
||||||
|
fail if provided sample format is not supported by audio hardware in Exclusive mode
|
||||||
|
or system mixer in Shared mode */
|
||||||
|
paWinWasapiExplicitSampleFormat = (1 << 5),
|
||||||
|
|
||||||
|
/* allow API to insert system-level channel matrix mixer and sample rate converter to allow
|
||||||
|
playback formats that do not match the current configured system settings.
|
||||||
|
this is in particular required for streams not matching the system mixer sample rate.
|
||||||
|
only applies in Shared mode. */
|
||||||
|
paWinWasapiAutoConvert = (1 << 6)
|
||||||
}
|
}
|
||||||
PaWasapiFlags;
|
PaWasapiFlags;
|
||||||
#define paWinWasapiExclusive (paWinWasapiExclusive)
|
#define paWinWasapiExclusive (paWinWasapiExclusive)
|
||||||
|
@ -79,19 +92,68 @@ PaWasapiFlags;
|
||||||
#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)
|
#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)
|
||||||
#define paWinWasapiPolling (paWinWasapiPolling)
|
#define paWinWasapiPolling (paWinWasapiPolling)
|
||||||
#define paWinWasapiThreadPriority (paWinWasapiThreadPriority)
|
#define paWinWasapiThreadPriority (paWinWasapiThreadPriority)
|
||||||
|
#define paWinWasapiExplicitSampleFormat (paWinWasapiExplicitSampleFormat)
|
||||||
|
#define paWinWasapiAutoConvert (paWinWasapiAutoConvert)
|
||||||
|
|
||||||
|
|
||||||
/* Host processor. Allows to skip internal PA processing completely.
|
/* Stream state.
|
||||||
You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
|
|
||||||
in order to have host processor redirected to your callback.
|
@note Multiple states can be united into a bitmask.
|
||||||
Use with caution! inputFrames and outputFrames depend solely on final device setup.
|
@see PaWasapiStreamStateCallback, PaWasapi_SetStreamStateHandler
|
||||||
To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,
|
typedef enum PaWasapiStreamState
|
||||||
void *outputBuffer, long outputFrames,
|
{
|
||||||
void *userData);
|
/* state change was caused by the error:
|
||||||
|
|
||||||
/* Device role */
|
Example:
|
||||||
|
1) If thread execution stopped due to AUDCLNT_E_RESOURCES_INVALIDATED then state
|
||||||
|
value will contain paWasapiStreamStateError|paWasapiStreamStateThreadStop.
|
||||||
|
*/
|
||||||
|
paWasapiStreamStateError = (1 << 0),
|
||||||
|
|
||||||
|
/* processing thread is preparing to start execution */
|
||||||
|
paWasapiStreamStateThreadPrepare = (1 << 1),
|
||||||
|
|
||||||
|
/* processing thread started execution (enters its loop) */
|
||||||
|
paWasapiStreamStateThreadStart = (1 << 2),
|
||||||
|
|
||||||
|
/* processing thread stopped execution */
|
||||||
|
paWasapiStreamStateThreadStop = (1 << 3)
|
||||||
|
}
|
||||||
|
PaWasapiStreamState;
|
||||||
|
#define paWasapiStreamStateError (paWasapiStreamStateError)
|
||||||
|
#define paWasapiStreamStateThreadPrepare (paWasapiStreamStateThreadPrepare)
|
||||||
|
#define paWasapiStreamStateThreadStart (paWasapiStreamStateThreadStart)
|
||||||
|
#define paWasapiStreamStateThreadStop (paWasapiStreamStateThreadStop)
|
||||||
|
|
||||||
|
|
||||||
|
/* Host processor.
|
||||||
|
|
||||||
|
Allows to skip internal PA processing completely. paWinWasapiRedirectHostProcessor flag
|
||||||
|
must be set to the PaWasapiStreamInfo::flags member in order to have host processor
|
||||||
|
redirected to this callback.
|
||||||
|
|
||||||
|
Use with caution! inputFrames and outputFrames depend solely on final device setup.
|
||||||
|
To query max values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
|
||||||
|
*/
|
||||||
|
typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,
|
||||||
|
void *outputBuffer, long outputFrames, void *userData);
|
||||||
|
|
||||||
|
|
||||||
|
/* Stream state handler.
|
||||||
|
|
||||||
|
@param pStream Pointer to PaStream object.
|
||||||
|
@param stateFlags State flags, a collection of values from PaWasapiStreamState enum.
|
||||||
|
@param errorId Error id provided by system API (HRESULT).
|
||||||
|
@param userData Pointer to user data.
|
||||||
|
|
||||||
|
@see PaWasapiStreamState
|
||||||
|
*/
|
||||||
|
typedef void (*PaWasapiStreamStateCallback) (PaStream *pStream, unsigned int stateFlags,
|
||||||
|
unsigned int errorId, void *pUserData);
|
||||||
|
|
||||||
|
|
||||||
|
/* Device role. */
|
||||||
typedef enum PaWasapiDeviceRole
|
typedef enum PaWasapiDeviceRole
|
||||||
{
|
{
|
||||||
eRoleRemoteNetworkDevice = 0,
|
eRoleRemoteNetworkDevice = 0,
|
||||||
|
@ -109,7 +171,7 @@ typedef enum PaWasapiDeviceRole
|
||||||
PaWasapiDeviceRole;
|
PaWasapiDeviceRole;
|
||||||
|
|
||||||
|
|
||||||
/* Jack connection type */
|
/* Jack connection type. */
|
||||||
typedef enum PaWasapiJackConnectionType
|
typedef enum PaWasapiJackConnectionType
|
||||||
{
|
{
|
||||||
eJackConnTypeUnknown,
|
eJackConnTypeUnknown,
|
||||||
|
@ -124,14 +186,14 @@ typedef enum PaWasapiJackConnectionType
|
||||||
eJackConnTypeXlrProfessional,
|
eJackConnTypeXlrProfessional,
|
||||||
eJackConnTypeRJ11Modem,
|
eJackConnTypeRJ11Modem,
|
||||||
eJackConnTypeCombination
|
eJackConnTypeCombination
|
||||||
}
|
}
|
||||||
PaWasapiJackConnectionType;
|
PaWasapiJackConnectionType;
|
||||||
|
|
||||||
|
|
||||||
/* Jack geometric location */
|
/* Jack geometric location. */
|
||||||
typedef enum PaWasapiJackGeoLocation
|
typedef enum PaWasapiJackGeoLocation
|
||||||
{
|
{
|
||||||
eJackGeoLocUnk = 0,
|
eJackGeoLocUnk = 0,
|
||||||
eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
|
eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
|
||||||
eJackGeoLocFront,
|
eJackGeoLocFront,
|
||||||
eJackGeoLocLeft,
|
eJackGeoLocLeft,
|
||||||
|
@ -147,37 +209,37 @@ typedef enum PaWasapiJackGeoLocation
|
||||||
eJackGeoLocATAPI,
|
eJackGeoLocATAPI,
|
||||||
eJackGeoLocReserved5,
|
eJackGeoLocReserved5,
|
||||||
eJackGeoLocReserved6,
|
eJackGeoLocReserved6,
|
||||||
}
|
}
|
||||||
PaWasapiJackGeoLocation;
|
PaWasapiJackGeoLocation;
|
||||||
|
|
||||||
|
|
||||||
/* Jack general location */
|
/* Jack general location. */
|
||||||
typedef enum PaWasapiJackGenLocation
|
typedef enum PaWasapiJackGenLocation
|
||||||
{
|
{
|
||||||
eJackGenLocPrimaryBox = 0,
|
eJackGenLocPrimaryBox = 0,
|
||||||
eJackGenLocInternal,
|
eJackGenLocInternal,
|
||||||
eJackGenLocSeparate,
|
eJackGenLocSeparate,
|
||||||
eJackGenLocOther
|
eJackGenLocOther
|
||||||
}
|
}
|
||||||
PaWasapiJackGenLocation;
|
PaWasapiJackGenLocation;
|
||||||
|
|
||||||
|
|
||||||
/* Jack's type of port */
|
/* Jack's type of port. */
|
||||||
typedef enum PaWasapiJackPortConnection
|
typedef enum PaWasapiJackPortConnection
|
||||||
{
|
{
|
||||||
eJackPortConnJack = 0,
|
eJackPortConnJack = 0,
|
||||||
eJackPortConnIntegratedDevice,
|
eJackPortConnIntegratedDevice,
|
||||||
eJackPortConnBothIntegratedAndJack,
|
eJackPortConnBothIntegratedAndJack,
|
||||||
eJackPortConnUnknown
|
eJackPortConnUnknown
|
||||||
}
|
}
|
||||||
PaWasapiJackPortConnection;
|
PaWasapiJackPortConnection;
|
||||||
|
|
||||||
|
|
||||||
/* Thread priority */
|
/* Thread priority. */
|
||||||
typedef enum PaWasapiThreadPriority
|
typedef enum PaWasapiThreadPriority
|
||||||
{
|
{
|
||||||
eThreadPriorityNone = 0,
|
eThreadPriorityNone = 0,
|
||||||
eThreadPriorityAudio, //!< Default for Shared mode.
|
eThreadPriorityAudio, //!< Default for Shared mode.
|
||||||
eThreadPriorityCapture,
|
eThreadPriorityCapture,
|
||||||
eThreadPriorityDistribution,
|
eThreadPriorityDistribution,
|
||||||
eThreadPriorityGames,
|
eThreadPriorityGames,
|
||||||
|
@ -189,7 +251,7 @@ PaWasapiThreadPriority;
|
||||||
|
|
||||||
|
|
||||||
/* Stream descriptor. */
|
/* Stream descriptor. */
|
||||||
typedef struct PaWasapiJackDescription
|
typedef struct PaWasapiJackDescription
|
||||||
{
|
{
|
||||||
unsigned long channelMapping;
|
unsigned long channelMapping;
|
||||||
unsigned long color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
|
unsigned long color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
|
||||||
|
@ -202,8 +264,48 @@ typedef struct PaWasapiJackDescription
|
||||||
PaWasapiJackDescription;
|
PaWasapiJackDescription;
|
||||||
|
|
||||||
|
|
||||||
|
/** Stream category.
|
||||||
|
Note:
|
||||||
|
- values are equal to WASAPI AUDIO_STREAM_CATEGORY enum
|
||||||
|
- supported since Windows 8.0, noop on earlier versions
|
||||||
|
- values 1,2 are deprecated on Windows 10 and not included into enumeration
|
||||||
|
|
||||||
|
@version Available as of 19.6.0
|
||||||
|
*/
|
||||||
|
typedef enum PaWasapiStreamCategory
|
||||||
|
{
|
||||||
|
eAudioCategoryOther = 0,
|
||||||
|
eAudioCategoryCommunications = 3,
|
||||||
|
eAudioCategoryAlerts = 4,
|
||||||
|
eAudioCategorySoundEffects = 5,
|
||||||
|
eAudioCategoryGameEffects = 6,
|
||||||
|
eAudioCategoryGameMedia = 7,
|
||||||
|
eAudioCategoryGameChat = 8,
|
||||||
|
eAudioCategorySpeech = 9,
|
||||||
|
eAudioCategoryMovie = 10,
|
||||||
|
eAudioCategoryMedia = 11
|
||||||
|
}
|
||||||
|
PaWasapiStreamCategory;
|
||||||
|
|
||||||
|
|
||||||
|
/** Stream option.
|
||||||
|
Note:
|
||||||
|
- values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum
|
||||||
|
- supported since Windows 8.1, noop on earlier versions
|
||||||
|
|
||||||
|
@version Available as of 19.6.0
|
||||||
|
*/
|
||||||
|
typedef enum PaWasapiStreamOption
|
||||||
|
{
|
||||||
|
eStreamOptionNone = 0, //!< default
|
||||||
|
eStreamOptionRaw = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1
|
||||||
|
eStreamOptionMatchFormat = 2 //!< force WASAPI Audio Engine into a stream format, supported since Windows 10
|
||||||
|
}
|
||||||
|
PaWasapiStreamOption;
|
||||||
|
|
||||||
|
|
||||||
/* Stream descriptor. */
|
/* Stream descriptor. */
|
||||||
typedef struct PaWasapiStreamInfo
|
typedef struct PaWasapiStreamInfo
|
||||||
{
|
{
|
||||||
unsigned long size; /**< sizeof(PaWasapiStreamInfo) */
|
unsigned long size; /**< sizeof(PaWasapiStreamInfo) */
|
||||||
PaHostApiTypeId hostApiType; /**< paWASAPI */
|
PaHostApiTypeId hostApiType; /**< paWASAPI */
|
||||||
|
@ -211,23 +313,23 @@ typedef struct PaWasapiStreamInfo
|
||||||
|
|
||||||
unsigned long flags; /**< collection of PaWasapiFlags */
|
unsigned long flags; /**< collection of PaWasapiFlags */
|
||||||
|
|
||||||
/* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
|
/** Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
|
||||||
paWinWasapiUseChannelMask this allows you to specify which speakers
|
paWinWasapiUseChannelMask this allows you to specify which speakers
|
||||||
to address in a multichannel stream. Constants for channelMask
|
to address in a multichannel stream. Constants for channelMask
|
||||||
are specified in pa_win_waveformat.h. Will be used only if
|
are specified in pa_win_waveformat.h. Will be used only if
|
||||||
paWinWasapiUseChannelMask flag is specified.
|
paWinWasapiUseChannelMask flag is specified.
|
||||||
*/
|
*/
|
||||||
PaWinWaveFormatChannelMask channelMask;
|
PaWinWaveFormatChannelMask channelMask;
|
||||||
|
|
||||||
/* Delivers raw data to callback obtained from GetBuffer() methods skipping
|
/** Delivers raw data to callback obtained from GetBuffer() methods skipping
|
||||||
internal PortAudio processing inventory completely. userData parameter will
|
internal PortAudio processing inventory completely. userData parameter will
|
||||||
be the same that was passed to Pa_OpenStream method. Will be used only if
|
be the same that was passed to Pa_OpenStream method. Will be used only if
|
||||||
paWinWasapiRedirectHostProcessor flag is specified.
|
paWinWasapiRedirectHostProcessor flag is specified.
|
||||||
*/
|
*/
|
||||||
PaWasapiHostProcessorCallback hostProcessorOutput;
|
PaWasapiHostProcessorCallback hostProcessorOutput;
|
||||||
PaWasapiHostProcessorCallback hostProcessorInput;
|
PaWasapiHostProcessorCallback hostProcessorInput;
|
||||||
|
|
||||||
/* Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
|
/** Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
|
||||||
is specified.
|
is specified.
|
||||||
|
|
||||||
Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
|
Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
|
||||||
|
@ -235,103 +337,270 @@ typedef struct PaWasapiStreamInfo
|
||||||
to setup thread priority.
|
to setup thread priority.
|
||||||
*/
|
*/
|
||||||
PaWasapiThreadPriority threadPriority;
|
PaWasapiThreadPriority threadPriority;
|
||||||
}
|
|
||||||
|
/** Stream category.
|
||||||
|
@see PaWasapiStreamCategory
|
||||||
|
@version Available as of 19.6.0
|
||||||
|
*/
|
||||||
|
PaWasapiStreamCategory streamCategory;
|
||||||
|
|
||||||
|
/** Stream option.
|
||||||
|
@see PaWasapiStreamOption
|
||||||
|
@version Available as of 19.6.0
|
||||||
|
*/
|
||||||
|
PaWasapiStreamOption streamOption;
|
||||||
|
}
|
||||||
PaWasapiStreamInfo;
|
PaWasapiStreamInfo;
|
||||||
|
|
||||||
|
|
||||||
/** Returns default sound format for device. Format is represented by PaWinWaveFormat or
|
/** Returns pointer to WASAPI's IAudioClient object of the stream.
|
||||||
WAVEFORMATEXTENSIBLE structure.
|
|
||||||
|
|
||||||
@param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
@param pStream Pointer to PaStream object.
|
||||||
@param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
|
@param pAudioClient Pointer to pointer of IAudioClient.
|
||||||
@param nDevice Device index.
|
@param bOutput TRUE (1) for output stream, FALSE (0) for input stream.
|
||||||
|
|
||||||
@return Non-negative value indicating the number of bytes copied into format decriptor
|
@return Error code indicating success or failure.
|
||||||
or, a PaErrorCode (which are always negative) if PortAudio is not initialized
|
*/
|
||||||
|
PaError PaWasapi_GetAudioClient( PaStream *pStream, void **pAudioClient, int bOutput );
|
||||||
|
|
||||||
|
|
||||||
|
/** Update device list.
|
||||||
|
|
||||||
|
This function is available if PA_WASAPI_MAX_CONST_DEVICE_COUNT is defined during compile time
|
||||||
|
with maximum constant WASAPI device count (recommended value - 32).
|
||||||
|
If PA_WASAPI_MAX_CONST_DEVICE_COUNT is set to 0 (or not defined) during compile time the implementation
|
||||||
|
will not define PaWasapi_UpdateDeviceList() and thus updating device list can only be possible by calling
|
||||||
|
Pa_Terminate() and then Pa_Initialize().
|
||||||
|
|
||||||
|
@return Error code indicating success or failure.
|
||||||
|
*/
|
||||||
|
PaError PaWasapi_UpdateDeviceList();
|
||||||
|
|
||||||
|
|
||||||
|
/** Get current audio format of the device assigned to the opened stream.
|
||||||
|
|
||||||
|
Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
||||||
|
Use this function to reconfirm format if PA's processor is overridden and
|
||||||
|
paWinWasapiRedirectHostProcessor flag is specified.
|
||||||
|
|
||||||
|
@param pStream Pointer to PaStream object.
|
||||||
|
@param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
||||||
|
@param formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
|
||||||
|
@param bOutput TRUE (1) for output stream, FALSE (0) for input stream.
|
||||||
|
|
||||||
|
@return Non-negative value indicating the number of bytes copied into format descriptor
|
||||||
|
or, a PaErrorCode (which is always negative) if PortAudio is not initialized
|
||||||
or an error is encountered.
|
or an error is encountered.
|
||||||
*/
|
*/
|
||||||
int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
|
int PaWasapi_GetDeviceCurrentFormat( PaStream *pStream, void *pFormat, unsigned int formatSize, int bOutput );
|
||||||
|
|
||||||
|
|
||||||
/** Returns device role (PaWasapiDeviceRole enum).
|
/** Get default audio format for the device in Shared Mode.
|
||||||
|
|
||||||
@param nDevice device index.
|
Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure and obtained
|
||||||
|
by getting the device property with a PKEY_AudioEngine_DeviceFormat key.
|
||||||
|
|
||||||
@return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
|
@param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
||||||
|
@param formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
|
||||||
|
@param device Device index.
|
||||||
|
|
||||||
|
@return Non-negative value indicating the number of bytes copied into format descriptor
|
||||||
|
or, a PaErrorCode (which is always negative) if PortAudio is not initialized
|
||||||
|
or an error is encountered.
|
||||||
|
*/
|
||||||
|
int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device );
|
||||||
|
|
||||||
|
|
||||||
|
/** Get mix audio format for the device in Shared Mode.
|
||||||
|
|
||||||
|
Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structureand obtained by
|
||||||
|
IAudioClient::GetMixFormat.
|
||||||
|
|
||||||
|
@param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
||||||
|
@param formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
|
||||||
|
@param device Device index.
|
||||||
|
|
||||||
|
@return Non-negative value indicating the number of bytes copied into format descriptor
|
||||||
|
or, a PaErrorCode (which is always negative) if PortAudio is not initialized
|
||||||
|
or an error is encountered.
|
||||||
|
*/
|
||||||
|
int PaWasapi_GetDeviceMixFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device );
|
||||||
|
|
||||||
|
|
||||||
|
/** Get device role (PaWasapiDeviceRole enum).
|
||||||
|
|
||||||
|
@param device Device index.
|
||||||
|
|
||||||
|
@return Non-negative value indicating device role or, a PaErrorCode (which is always negative)
|
||||||
if PortAudio is not initialized or an error is encountered.
|
if PortAudio is not initialized or an error is encountered.
|
||||||
*/
|
*/
|
||||||
int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
|
int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex device );
|
||||||
|
|
||||||
|
|
||||||
/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
|
/** Boost thread priority of calling thread (MMCSS).
|
||||||
which makes calls to Pa_WriteStream/Pa_ReadStream.
|
|
||||||
|
|
||||||
@param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
|
Use it for Blocking Interface only inside the thread which makes calls to Pa_WriteStream/Pa_ReadStream.
|
||||||
method to revert thread priority to initial state.
|
|
||||||
|
|
||||||
@param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying
|
@param pTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
|
||||||
eThreadPriorityNone does nothing.
|
method to revert thread priority to initial state.
|
||||||
|
|
||||||
|
@param priorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying
|
||||||
|
eThreadPriorityNone does nothing.
|
||||||
|
|
||||||
@return Error code indicating success or failure.
|
@return Error code indicating success or failure.
|
||||||
@see PaWasapi_RevertThreadPriority
|
@see PaWasapi_RevertThreadPriority
|
||||||
*/
|
*/
|
||||||
PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
|
PaError PaWasapi_ThreadPriorityBoost( void **pTask, PaWasapiThreadPriority priorityClass );
|
||||||
|
|
||||||
|
|
||||||
/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
|
/** Boost thread priority of calling thread (MMCSS).
|
||||||
which makes calls to Pa_WriteStream/Pa_ReadStream.
|
|
||||||
|
Use it for Blocking Interface only inside the thread which makes calls to Pa_WriteStream/Pa_ReadStream.
|
||||||
|
|
||||||
|
@param pTask Task handle obtained by PaWasapi_BoostThreadPriority method.
|
||||||
|
|
||||||
@param hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
|
|
||||||
@return Error code indicating success or failure.
|
@return Error code indicating success or failure.
|
||||||
@see PaWasapi_BoostThreadPriority
|
@see PaWasapi_BoostThreadPriority
|
||||||
*/
|
*/
|
||||||
PaError PaWasapi_ThreadPriorityRevert( void *hTask );
|
PaError PaWasapi_ThreadPriorityRevert( void *pTask );
|
||||||
|
|
||||||
|
|
||||||
/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which
|
/** Get number of frames per host buffer.
|
||||||
can be locked for operations. Use this method as helper to findout maximal values of
|
|
||||||
inputFrames/outputFrames of PaWasapiHostProcessorCallback.
|
It is max value of frames of WASAPI buffer which can be locked for operations.
|
||||||
|
Use this method as helper to find out max values of inputFrames/outputFrames
|
||||||
|
of PaWasapiHostProcessorCallback.
|
||||||
|
|
||||||
|
@param pStream Pointer to PaStream object.
|
||||||
|
@param pInput Pointer to variable to receive number of input frames. Can be NULL.
|
||||||
|
@param pOutput Pointer to variable to receive number of output frames. Can be NULL.
|
||||||
|
|
||||||
@param pStream Pointer to PaStream to query.
|
|
||||||
@param nInput Pointer to variable to receive number of input frames. Can be NULL.
|
|
||||||
@param nOutput Pointer to variable to receive number of output frames. Can be NULL.
|
|
||||||
@return Error code indicating success or failure.
|
@return Error code indicating success or failure.
|
||||||
@see PaWasapiHostProcessorCallback
|
@see PaWasapiHostProcessorCallback
|
||||||
*/
|
*/
|
||||||
PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
|
PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *pInput, unsigned int *pOutput );
|
||||||
|
|
||||||
|
|
||||||
/** Get number of jacks associated with a WASAPI device. Use this method to determine if
|
/** Get number of jacks associated with a WASAPI device.
|
||||||
there are any jacks associated with the provided WASAPI device. Not all audio devices
|
|
||||||
will support this capability. This is valid for both input and output devices.
|
Use this method to determine if there are any jacks associated with the provided WASAPI device.
|
||||||
@param nDevice device index.
|
Not all audio devices will support this capability. This is valid for both input and output devices.
|
||||||
@param jcount Number of jacks is returned in this variable
|
|
||||||
@return Error code indicating success or failure
|
@note Not available on UWP platform.
|
||||||
@see PaWasapi_GetJackDescription
|
|
||||||
|
@param device Device index.
|
||||||
|
@param pJackCount Pointer to variable to receive number of jacks.
|
||||||
|
|
||||||
|
@return Error code indicating success or failure.
|
||||||
|
@see PaWasapi_GetJackDescription
|
||||||
*/
|
*/
|
||||||
PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
|
PaError PaWasapi_GetJackCount( PaDeviceIndex device, int *pJackCount );
|
||||||
|
|
||||||
|
|
||||||
/** Get the jack description associated with a WASAPI device and jack number
|
/** Get the jack description associated with a WASAPI device and jack number.
|
||||||
|
|
||||||
Before this function is called, use PaWasapi_GetJackCount to determine the
|
Before this function is called, use PaWasapi_GetJackCount to determine the
|
||||||
number of jacks associated with device. If jcount is greater than zero, then
|
number of jacks associated with device. If jcount is greater than zero, then
|
||||||
each jack from 0 to jcount can be queried with this function to get the jack
|
each jack from 0 to jcount can be queried with this function to get the jack
|
||||||
description.
|
description.
|
||||||
@param nDevice device index.
|
|
||||||
@param jindex Which jack to return information
|
@note Not available on UWP platform.
|
||||||
@param KSJACK_DESCRIPTION This structure filled in on success.
|
|
||||||
@return Error code indicating success or failure
|
@param device Device index.
|
||||||
|
@param jackIndex Jack index.
|
||||||
|
@param pJackDescription Pointer to PaWasapiJackDescription.
|
||||||
|
|
||||||
|
@return Error code indicating success or failure.
|
||||||
@see PaWasapi_GetJackCount
|
@see PaWasapi_GetJackCount
|
||||||
*/
|
*/
|
||||||
PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
|
PaError PaWasapi_GetJackDescription( PaDeviceIndex device, int jackIndex, PaWasapiJackDescription *pJackDescription );
|
||||||
|
|
||||||
|
|
||||||
|
/** Set stream state handler.
|
||||||
|
|
||||||
|
@param pStream Pointer to PaStream object.
|
||||||
|
@param fnStateHandler Pointer to state handling function.
|
||||||
|
@param pUserData Pointer to user data.
|
||||||
|
|
||||||
|
@return Error code indicating success or failure.
|
||||||
|
*/
|
||||||
|
PaError PaWasapi_SetStreamStateHandler( PaStream *pStream, PaWasapiStreamStateCallback fnStateHandler, void *pUserData );
|
||||||
|
|
||||||
|
|
||||||
|
/** Set default device Id.
|
||||||
|
|
||||||
|
By default implementation will use the DEVINTERFACE_AUDIO_RENDER and
|
||||||
|
DEVINTERFACE_AUDIO_CAPTURE Ids if device Id is not provided explicitly. These default Ids
|
||||||
|
will not allow to use Exclusive mode on UWP/WinRT platform and thus you must provide
|
||||||
|
device Id explicitly via this API before calling the Pa_OpenStream().
|
||||||
|
|
||||||
|
Device Ids on UWP platform are obtainable via:
|
||||||
|
Windows::Media::Devices::MediaDevice::GetDefaultAudioRenderId() or
|
||||||
|
Windows::Media::Devices::MediaDevice::GetDefaultAudioCaptureId() API.
|
||||||
|
|
||||||
|
After the call completes, memory referenced by pointers can be freed, as implementation keeps its own copy.
|
||||||
|
|
||||||
|
Call this function before calling Pa_IsFormatSupported() when Exclusive mode is requested.
|
||||||
|
|
||||||
|
See an example in the IMPORTANT notes.
|
||||||
|
|
||||||
|
@note UWP/WinRT platform only.
|
||||||
|
|
||||||
|
@param pId Device Id, pointer to the 16-bit Unicode string (WCHAR). If NULL then device Id
|
||||||
|
will be reset to the default, e.g. DEVINTERFACE_AUDIO_RENDER or DEVINTERFACE_AUDIO_CAPTURE.
|
||||||
|
@param bOutput TRUE (1) for output (render), FALSE (0) for input (capture).
|
||||||
|
|
||||||
|
@return Error code indicating success or failure. Will return paIncompatibleStreamHostApi if library is not compiled
|
||||||
|
for UWP/WinRT platform. If Id is longer than PA_WASAPI_DEVICE_ID_LEN characters paBufferTooBig will
|
||||||
|
be returned.
|
||||||
|
*/
|
||||||
|
PaError PaWasapiWinrt_SetDefaultDeviceId( const unsigned short *pId, int bOutput );
|
||||||
|
|
||||||
|
|
||||||
|
/** Populate the device list.
|
||||||
|
|
||||||
|
By default the implementation will rely on DEVINTERFACE_AUDIO_RENDER and DEVINTERFACE_AUDIO_CAPTURE as
|
||||||
|
default devices. If device Id is provided by PaWasapiWinrt_SetDefaultDeviceId() then those
|
||||||
|
device Ids will be used as default and only devices for the device list.
|
||||||
|
|
||||||
|
By populating the device list you can provide an additional available audio devices of the system to PA
|
||||||
|
which are obtainable by:
|
||||||
|
Windows::Devices::Enumeration::DeviceInformation::FindAllAsync(selector) where selector is obtainable by
|
||||||
|
Windows::Media::Devices::MediaDevice::GetAudioRenderSelector() or
|
||||||
|
Windows::Media::Devices::MediaDevice::GetAudioCaptureSelector() API.
|
||||||
|
|
||||||
|
After the call completes, memory referenced by pointers can be freed, as implementation keeps its own copy.
|
||||||
|
|
||||||
|
You must call PaWasapi_UpdateDeviceList() to update the internal device list of the implementation after
|
||||||
|
calling this function.
|
||||||
|
|
||||||
|
See an example in the IMPORTANT notes.
|
||||||
|
|
||||||
|
@note UWP/WinRT platform only.
|
||||||
|
|
||||||
|
@param pId Array of device Ids, pointer to the array of pointers of 16-bit Unicode string (WCHAR). If NULL
|
||||||
|
and count is also 0 then device Ids will be reset to the default. Required.
|
||||||
|
@param pName Array of device Names, pointer to the array of pointers of 16-bit Unicode string (WCHAR). Optional.
|
||||||
|
@param pRole Array of device Roles, see PaWasapiDeviceRole and PaWasapi_GetDeviceRole() for more details. Optional.
|
||||||
|
@param count Number of devices, the number of array elements (pId, pName, pRole). Maximum count of devices
|
||||||
|
is limited by PA_WASAPI_DEVICE_MAX_COUNT.
|
||||||
|
@param bOutput TRUE (1) for output (render), FALSE (0) for input (capture).
|
||||||
|
|
||||||
|
@return Error code indicating success or failure. Will return paIncompatibleStreamHostApi if library is not compiled
|
||||||
|
for UWP/WinRT platform. If Id is longer than PA_WASAPI_DEVICE_ID_LEN characters paBufferTooBig will
|
||||||
|
be returned. If Name is longer than PA_WASAPI_DEVICE_NAME_LEN characters paBufferTooBig will
|
||||||
|
be returned.
|
||||||
|
*/
|
||||||
|
PaError PaWasapiWinrt_PopulateDeviceList( const unsigned short **pId, const unsigned short **pName,
|
||||||
|
const PaWasapiDeviceRole *pRole, unsigned int count, int bOutput );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
IMPORTANT:
|
IMPORTANT:
|
||||||
|
|
||||||
WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
|
WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
|
||||||
share modes.
|
share modes.
|
||||||
|
|
||||||
Exclusive Mode:
|
Exclusive Mode:
|
||||||
|
|
||||||
Exclusive mode allows to deliver audio data directly to hardware bypassing
|
Exclusive mode allows to deliver audio data directly to hardware bypassing
|
||||||
|
@ -340,52 +609,111 @@ PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJ
|
||||||
|
|
||||||
Callback Interface:
|
Callback Interface:
|
||||||
|
|
||||||
Provides best audio quality with low latency. Callback interface is implemented in
|
Provides best audio quality with low latency. Callback interface is implemented in
|
||||||
two versions:
|
two versions:
|
||||||
|
|
||||||
1) Event-Driven:
|
1) Event-Driven:
|
||||||
This is the most powerful WASAPI implementation which provides glitch-free
|
This is the most powerful WASAPI implementation which provides glitch-free
|
||||||
audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is
|
audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is
|
||||||
3 ms for HD Audio class audio chips. For the Shared mode latency can not be
|
3 ms for HD Audio class audio chips. For the Shared mode latency can not be
|
||||||
lower than 20 ms.
|
lower than 20 ms.
|
||||||
|
|
||||||
2) Poll-Driven:
|
2) Poll-Driven:
|
||||||
Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
|
Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
|
||||||
and provides latency at around 10-13ms. Polling must be used to overcome a system bug
|
and provides latency at around 10-13ms. Polling must be used to overcome a system bug
|
||||||
under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply
|
under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply
|
||||||
times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug
|
times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug
|
||||||
does not exist in Vista x86 or Windows 7.
|
does not exist in Vista x86 or Windows 7.
|
||||||
Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
|
Polling can be setup by specifying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
|
||||||
WOW64 bug and sets 'paWinWasapiPolling' automatically.
|
WOW64 bug and sets 'paWinWasapiPolling' automatically.
|
||||||
|
|
||||||
Thread priority:
|
Thread priority:
|
||||||
|
|
||||||
Normally thread priority is set automatically and does not require modification. Although
|
Normally thread priority is set automatically and does not require modification. Although
|
||||||
if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
|
if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
|
||||||
flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority
|
flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority
|
||||||
enum.
|
enum.
|
||||||
|
|
||||||
Blocking Interface:
|
Blocking Interface:
|
||||||
|
|
||||||
Blocking interface is implemented but due to above described Poll-Driven method can not
|
Blocking interface is implemented but due to above described Poll-Driven method can not
|
||||||
deliver lowest possible latency. Specifying too low latency in Shared mode will result in
|
deliver lowest possible latency. Specifying too low latency in Shared mode will result in
|
||||||
distorted audio although Exclusive mode adds stability.
|
distorted audio although Exclusive mode adds stability.
|
||||||
|
|
||||||
|
8.24 format:
|
||||||
|
|
||||||
|
If paCustomFormat is specified as sample format then the implementation will understand it
|
||||||
|
as valid 24-bits inside 32-bit container (e.g. wBitsPerSample = 32, Samples.wValidBitsPerSample = 24).
|
||||||
|
|
||||||
|
By using paCustomFormat there will be small optimization when samples are be copied
|
||||||
|
with Copy_24_To_24 by PA processor instead of conversion from packed 3-byte (24-bit) data
|
||||||
|
with Int24_To_Int32.
|
||||||
|
|
||||||
Pa_IsFormatSupported:
|
Pa_IsFormatSupported:
|
||||||
|
|
||||||
To check format with correct Share Mode (Exclusive/Shared) you must supply
|
To check format with correct Share Mode (Exclusive/Shared) you must supply PaWasapiStreamInfo
|
||||||
PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
|
with flags paWinWasapiExclusive set through member of PaStreamParameters::hostApiSpecificStreamInfo
|
||||||
PaStreamParameters::hostApiSpecificStreamInfo structure.
|
structure.
|
||||||
|
|
||||||
|
If paWinWasapiExplicitSampleFormat flag is provided then implementation will not try to select
|
||||||
|
suitable close format and will return an error instead of paFormatIsSupported. By specifying
|
||||||
|
paWinWasapiExplicitSampleFormat flag it is possible to find out what sample formats are
|
||||||
|
supported by Exclusive or Shared modes.
|
||||||
|
|
||||||
Pa_OpenStream:
|
Pa_OpenStream:
|
||||||
|
|
||||||
To set desired Share Mode (Exclusive/Shared) you must supply
|
To set desired Share Mode (Exclusive/Shared) you must supply
|
||||||
PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
|
PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
|
||||||
PaStreamParameters::hostApiSpecificStreamInfo structure.
|
PaStreamParameters::hostApiSpecificStreamInfo structure.
|
||||||
|
|
||||||
|
Coding style for parameters and structure members of the public API:
|
||||||
|
|
||||||
|
1) bXXX - boolean, [1 (TRUE), 0 (FALSE)]
|
||||||
|
2) pXXX - pointer
|
||||||
|
3) fnXXX - pointer to function
|
||||||
|
4) structure members are never prefixed with a type distinguisher
|
||||||
|
|
||||||
|
|
||||||
|
UWP/WinRT:
|
||||||
|
|
||||||
|
This platform has number of limitations which do not allow to enumerate audio devices without
|
||||||
|
an additional external help. Enumeration is possible though from C++/CX, check the related API
|
||||||
|
Windows::Devices::Enumeration::DeviceInformation::FindAllAsync().
|
||||||
|
|
||||||
|
The main limitation is an absence of the device enumeration from inside the PA's implementation.
|
||||||
|
This problem can be solved by using the following functions:
|
||||||
|
|
||||||
|
PaWasapiWinrt_SetDefaultDeviceId() - to set default input/output device,
|
||||||
|
PaWasapiWinrt_PopulateDeviceList() - to populate device list with devices.
|
||||||
|
|
||||||
|
Here is an example of populating the device list which can also be updated dynamically depending on
|
||||||
|
whether device was removed from or added to the system:
|
||||||
|
|
||||||
|
----------------
|
||||||
|
|
||||||
|
std::vector<const UINT16 *> ids, names;
|
||||||
|
std::vector<PaWasapiDeviceRole> role;
|
||||||
|
|
||||||
|
ids.resize(count);
|
||||||
|
names.resize(count);
|
||||||
|
role.resize(count);
|
||||||
|
|
||||||
|
for (UINT32 i = 0; i < count; ++i)
|
||||||
|
{
|
||||||
|
ids[i] = (const UINT16 *)device_ids[i].c_str();
|
||||||
|
names[i] = (const UINT16 *)device_names[i].c_str();
|
||||||
|
role[i] = eRoleUnknownFormFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
PaWasapiWinrt_SetDefaultDeviceId((const UINT16 *)default_device_id.c_str(), !capture);
|
||||||
|
PaWasapiWinrt_PopulateDeviceList(ids.data(), names.data(), role.data(), count, !capture);
|
||||||
|
PaWasapi_UpdateDeviceList();
|
||||||
|
|
||||||
|
----------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* PA_WIN_WASAPI_H */
|
#endif /* PA_WIN_WASAPI_H */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_WIN_WDMKS_H
|
#ifndef PA_WIN_WDMKS_H
|
||||||
#define PA_WIN_WDMKS_H
|
#define PA_WIN_WDMKS_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_wdmks.h 1924 2014-04-09 14:27:21Z robiwan $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* WDM/KS specific extensions
|
* WDM/KS specific extensions
|
||||||
*
|
*
|
||||||
|
@ -53,14 +53,20 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/* Setup flags */
|
/** Flags to indicate valid fields in PaWinWDMKSInfo.
|
||||||
|
@see PaWinWDMKSInfo
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
typedef enum PaWinWDMKSFlags
|
typedef enum PaWinWDMKSFlags
|
||||||
{
|
{
|
||||||
/* Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
|
/** Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
|
||||||
by the WaveCyclic device. Use at own risk! */
|
by the WaveCyclic device. Use at own risk!
|
||||||
|
*/
|
||||||
paWinWDMKSOverrideFramesize = (1 << 0),
|
paWinWDMKSOverrideFramesize = (1 << 0),
|
||||||
|
|
||||||
/* Makes WDMKS (output stream) use the given channelMask instead of the default */
|
/** Makes WDMKS (output stream) use the given channelMask instead of the default.
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
paWinWDMKSUseGivenChannelMask = (1 << 1),
|
paWinWDMKSUseGivenChannelMask = (1 << 1),
|
||||||
|
|
||||||
} PaWinWDMKSFlags;
|
} PaWinWDMKSFlags;
|
||||||
|
@ -69,11 +75,20 @@ extern "C"
|
||||||
unsigned long size; /**< sizeof(PaWinWDMKSInfo) */
|
unsigned long size; /**< sizeof(PaWinWDMKSInfo) */
|
||||||
PaHostApiTypeId hostApiType; /**< paWDMKS */
|
PaHostApiTypeId hostApiType; /**< paWDMKS */
|
||||||
unsigned long version; /**< 1 */
|
unsigned long version; /**< 1 */
|
||||||
|
|
||||||
|
/** Flags indicate which fields are valid.
|
||||||
|
@see PaWinWDMKSFlags
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
/* The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
|
/** The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
|
||||||
unsigned noOfPackets;
|
unsigned noOfPackets;
|
||||||
/* If paWinWDMKSUseGivenChannelMask bit is set in flags, use this as channelMask instead of default */
|
|
||||||
|
/** If paWinWDMKSUseGivenChannelMask bit is set in flags, use this as channelMask instead of default.
|
||||||
|
@see PaWinWDMKSFlags
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
unsigned channelMask;
|
unsigned channelMask;
|
||||||
} PaWinWDMKSInfo;
|
} PaWinWDMKSInfo;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_WIN_WMME_H
|
#ifndef PA_WIN_WMME_H
|
||||||
#define PA_WIN_WMME_H
|
#define PA_WIN_WMME_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_wmme.h 1592 2011-02-04 10:41:58Z rossb $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* MME specific extensions
|
* MME specific extensions
|
||||||
*
|
*
|
||||||
|
@ -109,7 +109,7 @@ typedef struct PaWinMmeStreamInfo{
|
||||||
If devices are specified here, the corresponding device parameter
|
If devices are specified here, the corresponding device parameter
|
||||||
to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,
|
to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,
|
||||||
otherwise an paInvalidDevice error will result.
|
otherwise an paInvalidDevice error will result.
|
||||||
The total number of channels accross all specified devices
|
The total number of channels across all specified devices
|
||||||
must agree with the corresponding channelCount parameter to
|
must agree with the corresponding channelCount parameter to
|
||||||
Pa_OpenStream() otherwise a paInvalidChannelCount error will result.
|
Pa_OpenStream() otherwise a paInvalidChannelCount error will result.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PORTAUDIO_H
|
#ifndef PORTAUDIO_H
|
||||||
#define PORTAUDIO_H
|
#define PORTAUDIO_H
|
||||||
/*
|
/*
|
||||||
* $Id: portaudio.h 1953 2015-04-10 04:00:09Z philburk $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* PortAudio API Header File
|
* PortAudio API Header File
|
||||||
* Latest version available at: http://www.portaudio.com/
|
* Latest version available at: http://www.portaudio.com/
|
||||||
|
@ -51,51 +51,68 @@ extern "C"
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/** Retrieve the release number of the currently running PortAudio build.
|
/** Retrieve the release number of the currently running PortAudio build.
|
||||||
* For example, for version "19.5.1" this will return 0x00130501.
|
For example, for version "19.5.1" this will return 0x00130501.
|
||||||
*/
|
|
||||||
|
@see paMakeVersionNumber
|
||||||
|
*/
|
||||||
int Pa_GetVersion( void );
|
int Pa_GetVersion( void );
|
||||||
|
|
||||||
/** Retrieve a textual description of the current PortAudio build,
|
/** Retrieve a textual description of the current PortAudio build,
|
||||||
* eg "PortAudio V19.5.0-devel, revision 1952M".
|
e.g. "PortAudio V19.5.0-devel, revision 1952M".
|
||||||
* The format of the text may change so do not try to parse the returned string.
|
The format of the text may change in the future. Do not try to parse the
|
||||||
* @deprecated use PaVersionInfo() instead
|
returned string.
|
||||||
*/
|
|
||||||
|
@deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.
|
||||||
|
*/
|
||||||
const char* Pa_GetVersionText( void );
|
const char* Pa_GetVersionText( void );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a packed integer version number in the same format used
|
Generate a packed integer version number in the same format used
|
||||||
* by Pa_GetVersion(). Use this to compare a specified version number with
|
by Pa_GetVersion(). Use this to compare a specified version number with
|
||||||
* the currently running version. For example:
|
the currently running version. For example:
|
||||||
*
|
|
||||||
* if (Pa_GetVersion() < paMakeVersionNumber(19,5,1)) {}
|
@code
|
||||||
*/
|
if( Pa_GetVersion() < paMakeVersionNumber(19,5,1) ) {}
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
@see Pa_GetVersion, Pa_GetVersionInfo
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
#define paMakeVersionNumber(major, minor, subminor) \
|
#define paMakeVersionNumber(major, minor, subminor) \
|
||||||
(((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))
|
(((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A structure containing the components of the version numbers.
|
A structure containing PortAudio API version information.
|
||||||
*/
|
@see Pa_GetVersionInfo, paMakeVersionNumber
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
typedef struct PaVersionInfo {
|
typedef struct PaVersionInfo {
|
||||||
int versionMajor;
|
int versionMajor;
|
||||||
int versionMinor;
|
int versionMinor;
|
||||||
int versionSubMinor;
|
int versionSubMinor;
|
||||||
/**
|
/**
|
||||||
* This is currently the SVN revision but may change in the future.
|
This is currently the Git revision hash but may change in the future.
|
||||||
* The versionControlRevision is updated by running a script before compiling code.
|
The versionControlRevision is updated by running a script before compiling the library.
|
||||||
* If the update does not occur then this value may be less
|
If the update does not occur, this value may refer to an earlier revision.
|
||||||
* than the actual SVN revision number.
|
*/
|
||||||
*/
|
|
||||||
const char *versionControlRevision;
|
const char *versionControlRevision;
|
||||||
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
|
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
|
||||||
const char *versionText;
|
const char *versionText;
|
||||||
} PaVersionInfo;
|
} PaVersionInfo;
|
||||||
|
|
||||||
/**
|
/** Retrieve version information for the currently running PortAudio build.
|
||||||
* The structure that this points to is statically allocated.
|
@return A pointer to an immutable PaVersionInfo structure.
|
||||||
* Do not attempt to free it or modify it.
|
|
||||||
*/
|
@note This function can be called at any time. It does not require PortAudio
|
||||||
const PaVersionInfo* Pa_GetVersionInfo();
|
to be initialized. The structure pointed to is statically allocated. Do not
|
||||||
|
attempt to free it or modify it.
|
||||||
|
|
||||||
|
@see PaVersionInfo, paMakeVersionNumber
|
||||||
|
@version Available as of 19.5.0.
|
||||||
|
*/
|
||||||
|
const PaVersionInfo* Pa_GetVersionInfo( void );
|
||||||
|
|
||||||
|
|
||||||
/** Error codes returned by PortAudio functions.
|
/** Error codes returned by PortAudio functions.
|
||||||
Note that with the exception of paNoError, all PaErrorCodes are negative.
|
Note that with the exception of paNoError, all PaErrorCodes are negative.
|
||||||
|
@ -934,7 +951,7 @@ PaError Pa_CloseStream( PaStream *stream );
|
||||||
(ie once a call to Pa_StopStream() will not block).
|
(ie once a call to Pa_StopStream() will not block).
|
||||||
A stream will become inactive after the stream callback returns non-zero,
|
A stream will become inactive after the stream callback returns non-zero,
|
||||||
or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
|
or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
|
||||||
output, if the stream callback returns paComplete, or Pa_StopStream is called,
|
output, if the stream callback returns paComplete, or Pa_StopStream() is called,
|
||||||
the stream finished callback will not be called until all generated sample data
|
the stream finished callback will not be called until all generated sample data
|
||||||
has been played.
|
has been played.
|
||||||
|
|
||||||
|
@ -1132,7 +1149,7 @@ PaError Pa_ReadStream( PaStream* stream,
|
||||||
|
|
||||||
|
|
||||||
/** Write samples to an output stream. This function doesn't return until the
|
/** Write samples to an output stream. This function doesn't return until the
|
||||||
entire buffer has been consumed - this may involve waiting for the operating
|
entire buffer has been written - this may involve waiting for the operating
|
||||||
system to consume the data.
|
system to consume the data.
|
||||||
|
|
||||||
@param stream A pointer to an open stream previously created with Pa_OpenStream.
|
@param stream A pointer to an open stream previously created with Pa_OpenStream.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2009-04-28.21; # UTC
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC
|
||||||
# FSF changes to this file are in the public domain.
|
# FSF changes to this file are in the public domain.
|
||||||
#
|
#
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
# `make' implicit rules from creating a file called install from it
|
# 'make' implicit rules from creating a file called install from it
|
||||||
# when there is no Makefile.
|
# when there is no Makefile.
|
||||||
#
|
#
|
||||||
# This script is compatible with the BSD install script, but was written
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
@ -156,6 +156,10 @@ while test $# -ne 0; do
|
||||||
-s) stripcmd=$stripprog;;
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
-t) dst_arg=$2
|
-t) dst_arg=$2
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
shift;;
|
shift;;
|
||||||
|
|
||||||
-T) no_target_directory=true;;
|
-T) no_target_directory=true;;
|
||||||
|
@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
fi
|
fi
|
||||||
shift # arg
|
shift # arg
|
||||||
dst_arg=$arg
|
dst_arg=$arg
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -194,13 +202,17 @@ if test $# -eq 0; then
|
||||||
echo "$0: no input file specified." >&2
|
echo "$0: no input file specified." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# It's OK to call `install-sh -d' without argument.
|
# It's OK to call 'install-sh -d' without argument.
|
||||||
# This can happen when creating conditional directories.
|
# This can happen when creating conditional directories.
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
if test -z "$dir_arg"; then
|
||||||
trap '(exit $?); exit' 1 2 13 15
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 15
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
# However, 'strip' requires both read and write access to temps.
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
@ -228,9 +240,9 @@ fi
|
||||||
|
|
||||||
for src
|
for src
|
||||||
do
|
do
|
||||||
# Protect names starting with `-'.
|
# Protect names problematic for 'test' and other utilities.
|
||||||
case $src in
|
case $src in
|
||||||
-*) src=./$src;;
|
-* | [=\(\)!]) src=./$src;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
if test -n "$dir_arg"; then
|
||||||
|
@ -252,12 +264,7 @@ do
|
||||||
echo "$0: no destination specified." >&2
|
echo "$0: no destination specified." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dst=$dst_arg
|
dst=$dst_arg
|
||||||
# Protect names starting with `-'.
|
|
||||||
case $dst in
|
|
||||||
-*) dst=./$dst;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
# If destination is a directory, append the input filename; won't work
|
||||||
# if double slashes aren't ignored.
|
# if double slashes aren't ignored.
|
||||||
|
@ -347,7 +354,7 @@ do
|
||||||
if test -z "$dir_arg" || {
|
if test -z "$dir_arg" || {
|
||||||
# Check for POSIX incompatibilities with -m.
|
# Check for POSIX incompatibilities with -m.
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
# other-writeable bit of parent directory when it shouldn't.
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
case $ls_ld_tmpdir in
|
case $ls_ld_tmpdir in
|
||||||
|
@ -385,7 +392,7 @@ do
|
||||||
|
|
||||||
case $dstdir in
|
case $dstdir in
|
||||||
/*) prefix='/';;
|
/*) prefix='/';;
|
||||||
-*) prefix='./';;
|
[-=\(\)!]*) prefix='./';;
|
||||||
*) prefix='';;
|
*) prefix='';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -403,7 +410,7 @@ do
|
||||||
|
|
||||||
for d
|
for d
|
||||||
do
|
do
|
||||||
test -z "$d" && continue
|
test X"$d" = X && continue
|
||||||
|
|
||||||
prefix=$prefix$d
|
prefix=$prefix$d
|
||||||
if test -d "$prefix"; then
|
if test -d "$prefix"; then
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
# libtool (GNU libtool) 2.4
|
# libtool (GNU libtool) 2.4.2
|
||||||
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
||||||
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
# This is free software; see the source for copying conditions. There is NO
|
# This is free software; see the source for copying conditions. There is NO
|
||||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
||||||
# --quiet, --silent don't print informational messages
|
# --quiet, --silent don't print informational messages
|
||||||
# --no-quiet, --no-silent
|
# --no-quiet, --no-silent
|
||||||
# print informational messages (default)
|
# print informational messages (default)
|
||||||
|
# --no-warn don't display warning messages
|
||||||
# --tag=TAG use configuration variables from tag TAG
|
# --tag=TAG use configuration variables from tag TAG
|
||||||
# -v, --verbose print more informational messages than default
|
# -v, --verbose print more informational messages than default
|
||||||
# --no-verbose don't print the extra informational messages
|
# --no-verbose don't print the extra informational messages
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
# compiler: $LTCC
|
# compiler: $LTCC
|
||||||
# compiler flags: $LTCFLAGS
|
# compiler flags: $LTCFLAGS
|
||||||
# linker: $LD (gnu? $with_gnu_ld)
|
# linker: $LD (gnu? $with_gnu_ld)
|
||||||
# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1
|
# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
|
||||||
# automake: $automake_version
|
# automake: $automake_version
|
||||||
# autoconf: $autoconf_version
|
# autoconf: $autoconf_version
|
||||||
#
|
#
|
||||||
|
@ -79,9 +80,9 @@
|
||||||
|
|
||||||
PROGRAM=libtool
|
PROGRAM=libtool
|
||||||
PACKAGE=libtool
|
PACKAGE=libtool
|
||||||
VERSION="2.4 Debian-2.4-2ubuntu1"
|
VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
|
||||||
TIMESTAMP=""
|
TIMESTAMP=""
|
||||||
package_revision=1.3293
|
package_revision=1.3337
|
||||||
|
|
||||||
# Be Bourne compatible
|
# Be Bourne compatible
|
||||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||||
|
@ -136,15 +137,10 @@ progpath="$0"
|
||||||
|
|
||||||
: ${CP="cp -f"}
|
: ${CP="cp -f"}
|
||||||
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
|
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
|
||||||
: ${EGREP="/bin/grep -E"}
|
|
||||||
: ${FGREP="/bin/grep -F"}
|
|
||||||
: ${GREP="/bin/grep"}
|
|
||||||
: ${LN_S="ln -s"}
|
|
||||||
: ${MAKE="make"}
|
: ${MAKE="make"}
|
||||||
: ${MKDIR="mkdir"}
|
: ${MKDIR="mkdir"}
|
||||||
: ${MV="mv -f"}
|
: ${MV="mv -f"}
|
||||||
: ${RM="rm -f"}
|
: ${RM="rm -f"}
|
||||||
: ${SED="/bin/sed"}
|
|
||||||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
|
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
|
||||||
: ${Xsed="$SED -e 1s/^X//"}
|
: ${Xsed="$SED -e 1s/^X//"}
|
||||||
|
|
||||||
|
@ -193,7 +189,7 @@ func_basename ()
|
||||||
# to NONDIR_REPLACEMENT.
|
# to NONDIR_REPLACEMENT.
|
||||||
# value returned in "$func_dirname_result"
|
# value returned in "$func_dirname_result"
|
||||||
# basename: Compute filename of FILE.
|
# basename: Compute filename of FILE.
|
||||||
# value retuned in "$func_basename_result"
|
# value returned in "$func_basename_result"
|
||||||
# Implementation must be kept synchronized with func_dirname
|
# Implementation must be kept synchronized with func_dirname
|
||||||
# and func_basename. For efficiency, we do not delegate to
|
# and func_basename. For efficiency, we do not delegate to
|
||||||
# those functions but instead duplicate the functionality here.
|
# those functions but instead duplicate the functionality here.
|
||||||
|
@ -387,7 +383,7 @@ case $progpath in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
save_IFS="$IFS"
|
save_IFS="$IFS"
|
||||||
IFS=:
|
IFS=${PATH_SEPARATOR-:}
|
||||||
for progdir in $PATH; do
|
for progdir in $PATH; do
|
||||||
IFS="$save_IFS"
|
IFS="$save_IFS"
|
||||||
test -x "$progdir/$progname" && break
|
test -x "$progdir/$progname" && break
|
||||||
|
@ -771,8 +767,8 @@ func_help ()
|
||||||
s*\$LTCFLAGS*'"$LTCFLAGS"'*
|
s*\$LTCFLAGS*'"$LTCFLAGS"'*
|
||||||
s*\$LD*'"$LD"'*
|
s*\$LD*'"$LD"'*
|
||||||
s/\$with_gnu_ld/'"$with_gnu_ld"'/
|
s/\$with_gnu_ld/'"$with_gnu_ld"'/
|
||||||
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
|
s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
|
||||||
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
|
s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
|
||||||
p
|
p
|
||||||
d
|
d
|
||||||
}
|
}
|
||||||
|
@ -1052,6 +1048,7 @@ opt_finish=false
|
||||||
opt_help=false
|
opt_help=false
|
||||||
opt_help_all=false
|
opt_help_all=false
|
||||||
opt_silent=:
|
opt_silent=:
|
||||||
|
opt_warning=:
|
||||||
opt_verbose=:
|
opt_verbose=:
|
||||||
opt_silent=false
|
opt_silent=false
|
||||||
opt_verbose=false
|
opt_verbose=false
|
||||||
|
@ -1118,6 +1115,10 @@ esac
|
||||||
;;
|
;;
|
||||||
--no-silent|--no-quiet)
|
--no-silent|--no-quiet)
|
||||||
opt_silent=false
|
opt_silent=false
|
||||||
|
func_append preserve_args " $opt"
|
||||||
|
;;
|
||||||
|
--no-warning|--no-warn)
|
||||||
|
opt_warning=false
|
||||||
func_append preserve_args " $opt"
|
func_append preserve_args " $opt"
|
||||||
;;
|
;;
|
||||||
--no-verbose)
|
--no-verbose)
|
||||||
|
@ -2059,7 +2060,7 @@ func_mode_compile ()
|
||||||
*.[cCFSifmso] | \
|
*.[cCFSifmso] | \
|
||||||
*.ada | *.adb | *.ads | *.asm | \
|
*.ada | *.adb | *.ads | *.asm | \
|
||||||
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
|
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
|
||||||
*.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
|
*.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
|
||||||
func_xform "$libobj"
|
func_xform "$libobj"
|
||||||
libobj=$func_xform_result
|
libobj=$func_xform_result
|
||||||
;;
|
;;
|
||||||
|
@ -3201,11 +3202,13 @@ func_mode_install ()
|
||||||
|
|
||||||
# Set up the ranlib parameters.
|
# Set up the ranlib parameters.
|
||||||
oldlib="$destdir/$name"
|
oldlib="$destdir/$name"
|
||||||
|
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||||
|
tool_oldlib=$func_to_tool_file_result
|
||||||
|
|
||||||
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
|
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
|
||||||
|
|
||||||
if test -n "$stripme" && test -n "$old_striplib"; then
|
if test -n "$stripme" && test -n "$old_striplib"; then
|
||||||
func_show_eval "$old_striplib $oldlib" 'exit $?'
|
func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do each command in the postinstall commands.
|
# Do each command in the postinstall commands.
|
||||||
|
@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
|
||||||
# linked before any other PIC object. But we must not use
|
# linked before any other PIC object. But we must not use
|
||||||
# pic_flag when linking with -static. The problem exists in
|
# pic_flag when linking with -static. The problem exists in
|
||||||
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
|
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
|
||||||
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
*-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
||||||
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
|
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
|
||||||
*-*-hpux*)
|
*-*-hpux*)
|
||||||
pic_flag_for_symtable=" $pic_flag" ;;
|
pic_flag_for_symtable=" $pic_flag" ;;
|
||||||
|
@ -3982,14 +3985,17 @@ func_exec_program_core ()
|
||||||
# launches target application with the remaining arguments.
|
# launches target application with the remaining arguments.
|
||||||
func_exec_program ()
|
func_exec_program ()
|
||||||
{
|
{
|
||||||
for lt_wr_arg
|
case \" \$* \" in
|
||||||
do
|
*\\ --lt-*)
|
||||||
case \$lt_wr_arg in
|
for lt_wr_arg
|
||||||
--lt-*) ;;
|
do
|
||||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
case \$lt_wr_arg in
|
||||||
esac
|
--lt-*) ;;
|
||||||
shift
|
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||||
done
|
esac
|
||||||
|
shift
|
||||||
|
done ;;
|
||||||
|
esac
|
||||||
func_exec_program_core \${1+\"\$@\"}
|
func_exec_program_core \${1+\"\$@\"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4388,7 +4394,7 @@ EOF
|
||||||
{
|
{
|
||||||
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
|
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
|
||||||
namespace, but it is not one of the ones we know about and
|
namespace, but it is not one of the ones we know about and
|
||||||
have already dealt with, above (inluding dump-script), then
|
have already dealt with, above (including dump-script), then
|
||||||
report an error. Otherwise, targets might begin to believe
|
report an error. Otherwise, targets might begin to believe
|
||||||
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
|
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
|
||||||
namespace. The first time any user complains about this, we'll
|
namespace. The first time any user complains about this, we'll
|
||||||
|
@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
func_emit_wrapper yes |
|
func_emit_wrapper yes |
|
||||||
$SED -e 's/\([\\"]\)/\\\1/g' \
|
$SED -n -e '
|
||||||
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
|
s/^\(.\{79\}\)\(..*\)/\1\
|
||||||
|
\2/
|
||||||
|
h
|
||||||
|
s/\([\\"]\)/\\\1/g
|
||||||
|
s/$/\\n/
|
||||||
|
s/\([^\n]*\).*/ fputs ("\1", f);/p
|
||||||
|
g
|
||||||
|
D'
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
@ -5643,7 +5655,8 @@ func_mode_link ()
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||||
|
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||||
func_append compiler_flags " $arg"
|
func_append compiler_flags " $arg"
|
||||||
func_append compile_command " $arg"
|
func_append compile_command " $arg"
|
||||||
func_append finalize_command " $arg"
|
func_append finalize_command " $arg"
|
||||||
|
@ -6150,7 +6163,8 @@ func_mode_link ()
|
||||||
lib=
|
lib=
|
||||||
found=no
|
found=no
|
||||||
case $deplib in
|
case $deplib in
|
||||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||||
|
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||||
if test "$linkmode,$pass" = "prog,link"; then
|
if test "$linkmode,$pass" = "prog,link"; then
|
||||||
compile_deplibs="$deplib $compile_deplibs"
|
compile_deplibs="$deplib $compile_deplibs"
|
||||||
finalize_deplibs="$deplib $finalize_deplibs"
|
finalize_deplibs="$deplib $finalize_deplibs"
|
||||||
|
@ -6834,7 +6848,7 @@ func_mode_link ()
|
||||||
test "$hardcode_direct_absolute" = no; then
|
test "$hardcode_direct_absolute" = no; then
|
||||||
add="$dir/$linklib"
|
add="$dir/$linklib"
|
||||||
elif test "$hardcode_minus_L" = yes; then
|
elif test "$hardcode_minus_L" = yes; then
|
||||||
add_dir="-L$dir"
|
add_dir="-L$absdir"
|
||||||
# Try looking first in the location we're being installed to.
|
# Try looking first in the location we're being installed to.
|
||||||
if test -n "$inst_prefix_dir"; then
|
if test -n "$inst_prefix_dir"; then
|
||||||
case $libdir in
|
case $libdir in
|
||||||
|
@ -7319,6 +7333,7 @@ func_mode_link ()
|
||||||
# which has an extra 1 added just for fun
|
# which has an extra 1 added just for fun
|
||||||
#
|
#
|
||||||
case $version_type in
|
case $version_type in
|
||||||
|
# correct linux to gnu/linux during the next big refactor
|
||||||
darwin|linux|osf|windows|none)
|
darwin|linux|osf|windows|none)
|
||||||
func_arith $number_major + $number_minor
|
func_arith $number_major + $number_minor
|
||||||
current=$func_arith_result
|
current=$func_arith_result
|
||||||
|
@ -7438,7 +7453,7 @@ func_mode_link ()
|
||||||
versuffix="$major.$revision"
|
versuffix="$major.$revision"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux)
|
linux) # correct to gnu/linux during the next big refactor
|
||||||
func_arith $current - $age
|
func_arith $current - $age
|
||||||
major=.$func_arith_result
|
major=.$func_arith_result
|
||||||
versuffix="$major.$age.$revision"
|
versuffix="$major.$age.$revision"
|
||||||
|
@ -8026,6 +8041,11 @@ EOF
|
||||||
|
|
||||||
# Test again, we may have decided not to build it any more
|
# Test again, we may have decided not to build it any more
|
||||||
if test "$build_libtool_libs" = yes; then
|
if test "$build_libtool_libs" = yes; then
|
||||||
|
# Remove ${wl} instances when linking with ld.
|
||||||
|
# FIXME: should test the right _cmds variable.
|
||||||
|
case $archive_cmds in
|
||||||
|
*\$LD\ *) wl= ;;
|
||||||
|
esac
|
||||||
if test "$hardcode_into_libs" = yes; then
|
if test "$hardcode_into_libs" = yes; then
|
||||||
# Hardcode the library paths
|
# Hardcode the library paths
|
||||||
hardcode_libdirs=
|
hardcode_libdirs=
|
||||||
|
@ -8056,7 +8076,7 @@ EOF
|
||||||
elif test -n "$runpath_var"; then
|
elif test -n "$runpath_var"; then
|
||||||
case "$perm_rpath " in
|
case "$perm_rpath " in
|
||||||
*" $libdir "*) ;;
|
*" $libdir "*) ;;
|
||||||
*) func_apped perm_rpath " $libdir" ;;
|
*) func_append perm_rpath " $libdir" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -8064,11 +8084,7 @@ EOF
|
||||||
if test -n "$hardcode_libdir_separator" &&
|
if test -n "$hardcode_libdir_separator" &&
|
||||||
test -n "$hardcode_libdirs"; then
|
test -n "$hardcode_libdirs"; then
|
||||||
libdir="$hardcode_libdirs"
|
libdir="$hardcode_libdirs"
|
||||||
if test -n "$hardcode_libdir_flag_spec_ld"; then
|
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
|
||||||
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
|
|
||||||
else
|
|
||||||
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if test -n "$runpath_var" && test -n "$perm_rpath"; then
|
if test -n "$runpath_var" && test -n "$perm_rpath"; then
|
||||||
# We should set the runpath_var.
|
# We should set the runpath_var.
|
||||||
|
@ -9158,6 +9174,8 @@ EOF
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||||
|
tool_oldlib=$func_to_tool_file_result
|
||||||
eval cmds=\"$old_archive_cmds\"
|
eval cmds=\"$old_archive_cmds\"
|
||||||
|
|
||||||
func_len " $cmds"
|
func_len " $cmds"
|
||||||
|
@ -9267,7 +9285,8 @@ EOF
|
||||||
*.la)
|
*.la)
|
||||||
func_basename "$deplib"
|
func_basename "$deplib"
|
||||||
name="$func_basename_result"
|
name="$func_basename_result"
|
||||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
func_resolve_sysroot "$deplib"
|
||||||
|
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
|
||||||
test -z "$libdir" && \
|
test -z "$libdir" && \
|
||||||
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
||||||
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Common stub for a few missing GNU programs while installing.
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
scriptversion=2009-04-28.21; # UTC
|
scriptversion=2013-10-28.13; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
# 2008, 2009 Free Software Foundation, Inc.
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
|
||||||
# the same distribution terms that you use for the rest of that program.
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
if test $# -eq 0; then
|
if test $# -eq 0; then
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run=:
|
|
||||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
|
||||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
|
||||||
|
|
||||||
# In the cases where this matters, `missing' is being run in the
|
|
||||||
# srcdir already.
|
|
||||||
if test -f configure.ac; then
|
|
||||||
configure_ac=configure.ac
|
|
||||||
else
|
|
||||||
configure_ac=configure.in
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg="missing on your system"
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
--run)
|
|
||||||
# Try to run requested program, and just exit if it succeeds.
|
--is-lightweight)
|
||||||
run=
|
# Used by our autoconf macros to check whether the available missing
|
||||||
shift
|
# script is modern enough.
|
||||||
"$@" && exit 0
|
exit 0
|
||||||
# Exit code 63 means version mismatch. This often happens
|
;;
|
||||||
# when the user try to use an ancient version of a tool on
|
|
||||||
# a file that requires a minimum version. In this case we
|
--run)
|
||||||
# we should proceed has if the program had been absent, or
|
# Back-compat with the calling convention used by older automake.
|
||||||
# if --run hadn't been passed.
|
shift
|
||||||
if test $? = 63; then
|
;;
|
||||||
run=:
|
|
||||||
msg="probably too old"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
-h|--h|--he|--hel|--help)
|
||||||
echo "\
|
echo "\
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||||
error status if there is no known handling for PROGRAM.
|
to PROGRAM being missing or too old.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help display this help and exit
|
-h, --help display this help and exit
|
||||||
-v, --version output version information and exit
|
-v, --version output version information and exit
|
||||||
--run try to run the given command, and emulate it if it fails
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
Supported PROGRAM values:
|
||||||
aclocal touch file \`aclocal.m4'
|
aclocal autoconf autoheader autom4te automake makeinfo
|
||||||
autoconf touch file \`configure'
|
bison yacc flex lex help2man
|
||||||
autoheader touch file \`config.h.in'
|
|
||||||
autom4te touch the output file, or create a stub one
|
|
||||||
automake touch all \`Makefile.in' files
|
|
||||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
flex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
help2man touch the output file
|
|
||||||
lex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
makeinfo touch the output file
|
|
||||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
|
||||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
|
|
||||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||||
\`g' are ignored when checking the name.
|
'g' are ignored when checking the name.
|
||||||
|
|
||||||
Send bug reports to <bug-automake@gnu.org>."
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-*)
|
-*)
|
||||||
echo 1>&2 "$0: Unknown \`$1' option"
|
echo 1>&2 "$0: unknown '$1' option"
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# normalize program name to check for.
|
# Run the given program, remember its exit status.
|
||||||
program=`echo "$1" | sed '
|
"$@"; st=$?
|
||||||
s/^gnu-//; t
|
|
||||||
s/^gnu//; t
|
|
||||||
s/^g//; t'`
|
|
||||||
|
|
||||||
# Now exit if we have it, but it failed. Also exit now if we
|
# If it succeeded, we are done.
|
||||||
# don't have it and --version was passed (most likely to detect
|
test $st -eq 0 && exit 0
|
||||||
# the program). This is about non-GNU programs, so use $1 not
|
|
||||||
# $program.
|
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||||
case $1 in
|
# passed; such an option is passed most likely to detect whether the
|
||||||
lex*|yacc*)
|
# program is present and works.
|
||||||
# Not GNU programs, they don't have --version.
|
case $2 in --version|--help) exit $st;; esac
|
||||||
|
|
||||||
|
# Exit code 63 means version mismatch. This often happens when the user
|
||||||
|
# tries to use an ancient version of a tool on a file that requires a
|
||||||
|
# minimum version.
|
||||||
|
if test $st -eq 63; then
|
||||||
|
msg="probably too old"
|
||||||
|
elif test $st -eq 127; then
|
||||||
|
# Program was missing.
|
||||||
|
msg="missing on your system"
|
||||||
|
else
|
||||||
|
# Program was found and executed, but failed. Give up.
|
||||||
|
exit $st
|
||||||
|
fi
|
||||||
|
|
||||||
|
perl_URL=http://www.perl.org/
|
||||||
|
flex_URL=http://flex.sourceforge.net/
|
||||||
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
|
program_details ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
aclocal|automake)
|
||||||
|
echo "The '$1' program is part of the GNU Automake package:"
|
||||||
|
echo "<$gnu_software_URL/automake>"
|
||||||
|
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/autoconf>"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
autoconf|autom4te|autoheader)
|
||||||
|
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||||
|
echo "<$gnu_software_URL/autoconf/>"
|
||||||
|
echo "It also requires GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice ()
|
||||||
|
{
|
||||||
|
# Normalize program name to check for.
|
||||||
|
normalized_program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
printf '%s\n' "'$1' is $msg."
|
||||||
|
|
||||||
|
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||||
|
case $normalized_program in
|
||||||
|
autoconf*)
|
||||||
|
echo "You should only need it if you modified 'configure.ac',"
|
||||||
|
echo "or m4 files included by it."
|
||||||
|
program_details 'autoconf'
|
||||||
|
;;
|
||||||
|
autoheader*)
|
||||||
|
echo "You should only need it if you modified 'acconfig.h' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'autoheader'
|
||||||
|
;;
|
||||||
|
automake*)
|
||||||
|
echo "You should only need it if you modified 'Makefile.am' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'automake'
|
||||||
|
;;
|
||||||
|
aclocal*)
|
||||||
|
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'aclocal'
|
||||||
|
;;
|
||||||
|
autom4te*)
|
||||||
|
echo "You might have modified some maintainer files that require"
|
||||||
|
echo "the 'autom4te' program to be rebuilt."
|
||||||
|
program_details 'autom4te'
|
||||||
|
;;
|
||||||
|
bison*|yacc*)
|
||||||
|
echo "You should only need it if you modified a '.y' file."
|
||||||
|
echo "You may want to install the GNU Bison package:"
|
||||||
|
echo "<$gnu_software_URL/bison/>"
|
||||||
|
;;
|
||||||
|
lex*|flex*)
|
||||||
|
echo "You should only need it if you modified a '.l' file."
|
||||||
|
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||||
|
echo "<$flex_URL>"
|
||||||
|
;;
|
||||||
|
help2man*)
|
||||||
|
echo "You should only need it if you modified a dependency" \
|
||||||
|
"of a man page."
|
||||||
|
echo "You may want to install the GNU Help2man package:"
|
||||||
|
echo "<$gnu_software_URL/help2man/>"
|
||||||
;;
|
;;
|
||||||
|
makeinfo*)
|
||||||
|
echo "You should only need it if you modified a '.texi' file, or"
|
||||||
|
echo "any other file indirectly affecting the aspect of the manual."
|
||||||
|
echo "You might want to install the Texinfo package:"
|
||||||
|
echo "<$gnu_software_URL/texinfo/>"
|
||||||
|
echo "The spurious makeinfo call might also be the consequence of"
|
||||||
|
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||||
|
echo "want to install GNU make:"
|
||||||
|
echo "<$gnu_software_URL/make/>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "You might have modified some files without having the proper"
|
||||||
|
echo "tools for further handling them. Check the 'README' file, it"
|
||||||
|
echo "often tells you about the needed prerequisites for installing"
|
||||||
|
echo "this package. You may also peek at any GNU archive site, in"
|
||||||
|
echo "case some other package contains this missing '$1' program."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
tar*)
|
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||||
if test -n "$run"; then
|
-e '2,$s/^/ /' >&2
|
||||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
|
||||||
exit 1
|
|
||||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
# Propagate the correct exit status (expected to be 127 for a program
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
# not found, 63 for a program that failed due to version mismatch).
|
||||||
# We have it, but it failed.
|
exit $st
|
||||||
exit 1
|
|
||||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
|
||||||
# Could not run --version or --help. This is probably someone
|
|
||||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
|
||||||
# $TOOL exists and not knowing $TOOL uses missing.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If it does not exist, or fails to run (possibly an outdated version),
|
|
||||||
# try to emulate it.
|
|
||||||
case $program in
|
|
||||||
aclocal*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
|
||||||
any GNU archive site."
|
|
||||||
touch aclocal.m4
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoconf*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified \`${configure_ac}'. You might want to install the
|
|
||||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
|
||||||
archive site."
|
|
||||||
touch configure
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoheader*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
|
||||||
from any GNU archive site."
|
|
||||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
|
||||||
test -z "$files" && files="config.h"
|
|
||||||
touch_files=
|
|
||||||
for f in $files; do
|
|
||||||
case $f in
|
|
||||||
*:*) touch_files="$touch_files "`echo "$f" |
|
|
||||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
|
||||||
*) touch_files="$touch_files $f.in";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
touch $touch_files
|
|
||||||
;;
|
|
||||||
|
|
||||||
automake*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
|
||||||
You might want to install the \`Automake' and \`Perl' packages.
|
|
||||||
Grab them from any GNU archive site."
|
|
||||||
find . -type f -name Makefile.am -print |
|
|
||||||
sed 's/\.am$/.in/' |
|
|
||||||
while read f; do touch "$f"; done
|
|
||||||
;;
|
|
||||||
|
|
||||||
autom4te*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is needed, but is $msg.
|
|
||||||
You might have modified some files without having the
|
|
||||||
proper tools for further handling them.
|
|
||||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
|
||||||
archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -f "$file"; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo "#! /bin/sh"
|
|
||||||
echo "# Created by GNU Automake missing as a replacement of"
|
|
||||||
echo "# $ $@"
|
|
||||||
echo "exit 0"
|
|
||||||
chmod +x $file
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
bison*|yacc*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' $msg. You should only need it if
|
|
||||||
you modified a \`.y' file. You may need the \`Bison' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Bison' from any GNU archive site."
|
|
||||||
rm -f y.tab.c y.tab.h
|
|
||||||
if test $# -ne 1; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case $LASTARG in
|
|
||||||
*.y)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" y.tab.c
|
|
||||||
fi
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" y.tab.h
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if test ! -f y.tab.h; then
|
|
||||||
echo >y.tab.h
|
|
||||||
fi
|
|
||||||
if test ! -f y.tab.c; then
|
|
||||||
echo 'main() { return 0; }' >y.tab.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
lex*|flex*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified a \`.l' file. You may need the \`Flex' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Flex' from any GNU archive site."
|
|
||||||
rm -f lex.yy.c
|
|
||||||
if test $# -ne 1; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case $LASTARG in
|
|
||||||
*.l)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if test ! -f lex.yy.c; then
|
|
||||||
echo 'main() { return 0; }' >lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
help2man*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified a dependency of a manual page. You may need the
|
|
||||||
\`Help2man' package in order for those modifications to take
|
|
||||||
effect. You can get \`Help2man' from any GNU archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -f "$file"; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo ".ab help2man is required to generate this page"
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
makeinfo*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is $msg. You should only need it if
|
|
||||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
|
||||||
indirectly affecting the aspect of the manual. The spurious
|
|
||||||
call might also be the consequence of using a buggy \`make' (AIX,
|
|
||||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
|
||||||
the \`GNU make' package. Grab either from any GNU archive site."
|
|
||||||
# The file to touch is that specified with -o ...
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -z "$file"; then
|
|
||||||
# ... or it is the one specified with @setfilename ...
|
|
||||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
|
||||||
file=`sed -n '
|
|
||||||
/^@setfilename/{
|
|
||||||
s/.* \([^ ]*\) *$/\1/
|
|
||||||
p
|
|
||||||
q
|
|
||||||
}' $infile`
|
|
||||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
|
||||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
|
||||||
fi
|
|
||||||
# If the file does not exist, the user really needs makeinfo;
|
|
||||||
# let's fail without touching anything.
|
|
||||||
test -f $file || exit 1
|
|
||||||
touch $file
|
|
||||||
;;
|
|
||||||
|
|
||||||
tar*)
|
|
||||||
shift
|
|
||||||
|
|
||||||
# We have already tried tar in the generic part.
|
|
||||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
|
||||||
# messages.
|
|
||||||
if (gnutar --version > /dev/null 2>&1); then
|
|
||||||
gnutar "$@" && exit 0
|
|
||||||
fi
|
|
||||||
if (gtar --version > /dev/null 2>&1); then
|
|
||||||
gtar "$@" && exit 0
|
|
||||||
fi
|
|
||||||
firstarg="$1"
|
|
||||||
if shift; then
|
|
||||||
case $firstarg in
|
|
||||||
*o*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/o//`
|
|
||||||
tar "$firstarg" "$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case $firstarg in
|
|
||||||
*h*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/h//`
|
|
||||||
tar "$firstarg" "$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
|
||||||
You may want to install GNU tar or Free paxutils, or check the
|
|
||||||
command line arguments."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is needed, and is $msg.
|
|
||||||
You might have modified some files without having the
|
|
||||||
proper tools for further handling them. Check the \`README' file,
|
|
||||||
it often tells you about the needed prerequisites for installing
|
|
||||||
this package. You may also peek at any GNU archive site, in case
|
|
||||||
some other package would contain this missing \`$1' program."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pablio.c 1151 2006-11-29 02:11:16Z leland_lucius $
|
* $Id$
|
||||||
* pablio.c
|
* pablio.c
|
||||||
* Portable Audio Blocking Input/Output utility.
|
* Portable Audio Blocking Input/Output utility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,7 +7,7 @@ extern "C"
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Id: pablio.h 1854 2012-07-09 15:53:00Z philburk $
|
* $Id$
|
||||||
* PABLIO.h
|
* PABLIO.h
|
||||||
* Portable Audio Blocking read/write utility.
|
* Portable Audio Blocking read/write utility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: test_rw.c 1083 2006-08-23 07:30:49Z rossb $
|
* $Id$
|
||||||
* test_rw.c
|
* test_rw.c
|
||||||
* Read input from one stream and write it to another.
|
* Read input from one stream and write it to another.
|
||||||
*
|
*
|
||||||
|
@ -98,7 +98,7 @@ int main(void)
|
||||||
|
|
||||||
error:
|
error:
|
||||||
Pa_Terminate();
|
Pa_Terminate();
|
||||||
fprintf( stderr, "An error occured while using the portaudio stream\n" );
|
fprintf( stderr, "An error occurred while using the portaudio stream\n" );
|
||||||
fprintf( stderr, "Error number: %d\n", err );
|
fprintf( stderr, "Error number: %d\n", err );
|
||||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: test_rw_echo.c 1083 2006-08-23 07:30:49Z rossb $
|
* $Id$
|
||||||
* test_rw_echo.c
|
* test_rw_echo.c
|
||||||
* Echo delayed input to output.
|
* Echo delayed input to output.
|
||||||
*
|
*
|
||||||
|
@ -122,7 +122,7 @@ int main(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
fprintf( stderr, "An error occured while using PortAudio\n" );
|
fprintf( stderr, "An error occurred while using PortAudio\n" );
|
||||||
fprintf( stderr, "Error number: %d\n", err );
|
fprintf( stderr, "Error number: %d\n", err );
|
||||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: test_w_saw.c 1083 2006-08-23 07:30:49Z rossb $
|
* $Id$
|
||||||
* test_w_saw.c
|
* test_w_saw.c
|
||||||
* Generate stereo sawtooth waveforms.
|
* Generate stereo sawtooth waveforms.
|
||||||
*
|
*
|
||||||
|
@ -107,7 +107,7 @@ int main(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
fprintf( stderr, "An error occured while using PABLIO\n" );
|
fprintf( stderr, "An error occurred while using PABLIO\n" );
|
||||||
fprintf( stderr, "Error number: %d\n", err );
|
fprintf( stderr, "Error number: %d\n", err );
|
||||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: test_w_saw8.c 1083 2006-08-23 07:30:49Z rossb $
|
* $Id$
|
||||||
* test_w_saw8.c
|
* test_w_saw8.c
|
||||||
* Generate stereo 8 bit sawtooth waveforms.
|
* Generate stereo 8 bit sawtooth waveforms.
|
||||||
*
|
*
|
||||||
|
@ -105,7 +105,7 @@ int main(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
fprintf( stderr, "An error occured while using PABLIO\n" );
|
fprintf( stderr, "An error occurred while using PABLIO\n" );
|
||||||
fprintf( stderr, "Error number: %d\n", err );
|
fprintf( stderr, "Error number: %d\n", err );
|
||||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_allocation.c 1097 2006-08-26 08:27:53Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library allocation group implementation
|
* Portable Audio I/O Library allocation group implementation
|
||||||
* memory allocation group for tracking allocation groups
|
* memory allocation group for tracking allocation groups
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_ALLOCATION_H
|
#ifndef PA_ALLOCATION_H
|
||||||
#define PA_ALLOCATION_H
|
#define PA_ALLOCATION_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_allocation.h 1339 2008-02-15 07:50:33Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library allocation context header
|
* Portable Audio I/O Library allocation context header
|
||||||
* memory allocation context for tracking allocation groups
|
* memory allocation context for tracking allocation groups
|
||||||
*
|
*
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
of memory which are allocated at the same time (such as during initialization)
|
of memory which are allocated at the same time (such as during initialization)
|
||||||
and need to be deallocated at the same time. The allocation group maintains
|
and need to be deallocated at the same time. The allocation group maintains
|
||||||
a list of allocated blocks, and can free all allocations at once. This
|
a list of allocated blocks, and can free all allocations at once. This
|
||||||
can be usefull for cleaning up after a partially initialized object fails.
|
can be useful for cleaning up after a partially initialized object fails.
|
||||||
|
|
||||||
The allocation group implementation is built on top of the lower
|
The allocation group implementation is built on top of the lower
|
||||||
level allocation functions defined in pa_util.h
|
level allocation functions defined in pa_util.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_converters.c 1748 2011-09-01 22:08:32Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library sample conversion mechanism
|
* Portable Audio I/O Library sample conversion mechanism
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
@ -1325,7 +1325,7 @@ static void Int16_To_Float32(
|
||||||
|
|
||||||
while( count-- )
|
while( count-- )
|
||||||
{
|
{
|
||||||
float samp = *src * const_1_div_32768_; /* FIXME: i'm concerned about this being asymetrical with float->int16 -rb */
|
float samp = *src * const_1_div_32768_; /* FIXME: i'm concerned about this being asymmetrical with float->int16 -rb */
|
||||||
*dest = samp;
|
*dest = samp;
|
||||||
|
|
||||||
src += sourceStride;
|
src += sourceStride;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_CONVERTERS_H
|
#ifndef PA_CONVERTERS_H
|
||||||
#define PA_CONVERTERS_H
|
#define PA_CONVERTERS_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_converters.h 1097 2006-08-26 08:27:53Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library sample conversion mechanism
|
* Portable Audio I/O Library sample conversion mechanism
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
@ -59,7 +59,7 @@ struct PaUtilTriangularDitherGenerator;
|
||||||
|
|
||||||
/** Choose an available sample format which is most appropriate for
|
/** Choose an available sample format which is most appropriate for
|
||||||
representing the requested format. If the requested format is not available
|
representing the requested format. If the requested format is not available
|
||||||
higher quality formats are considered before lower quality formates.
|
higher quality formats are considered before lower quality formats.
|
||||||
@param availableFormats A variable containing the logical OR of all available
|
@param availableFormats A variable containing the logical OR of all available
|
||||||
formats.
|
formats.
|
||||||
@param format The desired format.
|
@param format The desired format.
|
||||||
|
@ -211,7 +211,7 @@ typedef struct{
|
||||||
PaUtil_SelectConverter() uses this table to lookup the appropriate
|
PaUtil_SelectConverter() uses this table to lookup the appropriate
|
||||||
conversion functions. The fields of this structure are initialized
|
conversion functions. The fields of this structure are initialized
|
||||||
with default conversion functions. Fields may be NULL, indicating that
|
with default conversion functions. Fields may be NULL, indicating that
|
||||||
no conversion function is available. User code may substitue optimised
|
no conversion function is available. User code may substitute optimised
|
||||||
conversion functions by assigning different function pointers to
|
conversion functions by assigning different function pointers to
|
||||||
these fields.
|
these fields.
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ typedef struct{
|
||||||
/** A table of pointers to all required zeroer functions.
|
/** A table of pointers to all required zeroer functions.
|
||||||
PaUtil_SelectZeroer() uses this table to lookup the appropriate
|
PaUtil_SelectZeroer() uses this table to lookup the appropriate
|
||||||
conversion functions. The fields of this structure are initialized
|
conversion functions. The fields of this structure are initialized
|
||||||
with default conversion functions. User code may substitue optimised
|
with default conversion functions. User code may substitute optimised
|
||||||
conversion functions by assigning different function pointers to
|
conversion functions by assigning different function pointers to
|
||||||
these fields.
|
these fields.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_cpuload.c 1577 2011-02-01 13:03:45Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library CPU Load measurement functions
|
* Portable Audio I/O Library CPU Load measurement functions
|
||||||
* Portable CPU load measurement facility.
|
* Portable CPU load measurement facility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_CPULOAD_H
|
#ifndef PA_CPULOAD_H
|
||||||
#define PA_CPULOAD_H
|
#define PA_CPULOAD_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_cpuload.h 1097 2006-08-26 08:27:53Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library CPU Load measurement functions
|
* Portable Audio I/O Library CPU Load measurement functions
|
||||||
* Portable CPU load measurement facility.
|
* Portable CPU load measurement facility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -71,7 +71,7 @@ void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If your platform doesn’t have vsnprintf, you are stuck with a
|
If your platform doesn't have vsnprintf, you are stuck with a
|
||||||
VERY dangerous alternative, vsprintf (with no n)
|
VERY dangerous alternative, vsprintf (with no n)
|
||||||
*/
|
*/
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_dither.c 1418 2009-10-12 21:00:53Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library triangular dither generator
|
* Portable Audio I/O Library triangular dither generator
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_DITHER_H
|
#ifndef PA_DITHER_H
|
||||||
#define PA_DITHER_H
|
#define PA_DITHER_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_dither.h 1418 2009-10-12 21:00:53Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library triangular dither generator
|
* Portable Audio I/O Library triangular dither generator
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_ENDIANNESS_H
|
#ifndef PA_ENDIANNESS_H
|
||||||
#define PA_ENDIANNESS_H
|
#define PA_ENDIANNESS_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_endianness.h 1324 2008-01-27 02:03:30Z bjornroche $
|
* $Id$
|
||||||
* Portable Audio I/O Library current platform endianness macros
|
* Portable Audio I/O Library current platform endianness macros
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
example.
|
example.
|
||||||
|
|
||||||
A PA_VALIDATE_ENDIANNESS macro is provided to compare the compile time
|
A PA_VALIDATE_ENDIANNESS macro is provided to compare the compile time
|
||||||
and runtime endiannes and raise an assertion if they don't match.
|
and runtime endianness and raise an assertion if they don't match.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ extern "C"
|
||||||
|
|
||||||
/* If this is an apple, we need to do detect endianness this way */
|
/* If this is an apple, we need to do detect endianness this way */
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
/* we need to do some endian detection that is sensitive to harware arch */
|
/* we need to do some endian detection that is sensitive to hardware arch */
|
||||||
#if defined(__LITTLE_ENDIAN__)
|
#if defined(__LITTLE_ENDIAN__)
|
||||||
#if !defined( PA_LITTLE_ENDIAN )
|
#if !defined( PA_LITTLE_ENDIAN )
|
||||||
#define PA_LITTLE_ENDIAN
|
#define PA_LITTLE_ENDIAN
|
||||||
|
@ -83,7 +83,7 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* this is not an apple, so first check the existing defines, and, failing that,
|
/* this is not an apple, so first check the existing defines, and, failing that,
|
||||||
detect well-known architechtures. */
|
detect well-known architectures. */
|
||||||
|
|
||||||
#if defined(PA_LITTLE_ENDIAN) || defined(PA_BIG_ENDIAN)
|
#if defined(PA_LITTLE_ENDIAN) || defined(PA_BIG_ENDIAN)
|
||||||
/* endianness define has been set externally, such as by autoconf */
|
/* endianness define has been set externally, such as by autoconf */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_front.c 1953 2015-04-10 04:00:09Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library Multi-Host API front end
|
* Portable Audio I/O Library Multi-Host API front end
|
||||||
* Validate function parameters and manage multiple host APIs.
|
* Validate function parameters and manage multiple host APIs.
|
||||||
*
|
*
|
||||||
|
@ -27,26 +27,26 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The text above constitutes the entire PortAudio license; however,
|
* The text above constitutes the entire PortAudio license; however,
|
||||||
* the PortAudio community also makes the following non-binding requests:
|
* the PortAudio community also makes the following non-binding requests:
|
||||||
*
|
*
|
||||||
* Any person wishing to distribute modifications to the Software is
|
* Any person wishing to distribute modifications to the Software is
|
||||||
* requested to send the modifications to the original developer so that
|
* requested to send the modifications to the original developer so that
|
||||||
* they can be incorporated into the canonical version. It is also
|
* they can be incorporated into the canonical version. It is also
|
||||||
* requested that these non-binding requests be included along with the
|
* requested that these non-binding requests be included along with the
|
||||||
* license above.
|
* license above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
@ingroup common_src
|
@ingroup common_src
|
||||||
|
|
||||||
@brief Implements PortAudio API functions defined in portaudio.h, checks
|
@brief Implements PortAudio API functions defined in portaudio.h, checks
|
||||||
some errors, delegates platform-specific behavior to host API implementations.
|
some errors, delegates platform-specific behavior to host API implementations.
|
||||||
|
|
||||||
Implements the functions defined in the PortAudio API (portaudio.h),
|
Implements the functions defined in the PortAudio API (portaudio.h),
|
||||||
validates some parameters and checks for state inconsistencies before
|
validates some parameters and checks for state inconsistencies before
|
||||||
forwarding API requests to specific Host API implementations (via the
|
forwarding API requests to specific Host API implementations (via the
|
||||||
interface declared in pa_hostapi.h), and Streams (via the interface
|
interface declared in pa_hostapi.h), and Streams (via the interface
|
||||||
declared in pa_stream.h).
|
declared in pa_stream.h).
|
||||||
|
|
||||||
This file manages initialization and termination of Host API
|
This file manages initialization and termination of Host API
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
#include "pa_types.h"
|
#include "pa_types.h"
|
||||||
#include "pa_hostapi.h"
|
#include "pa_hostapi.h"
|
||||||
#include "pa_stream.h"
|
#include "pa_stream.h"
|
||||||
#include "pa_trace.h" /* still usefull?*/
|
#include "pa_trace.h" /* still useful?*/
|
||||||
#include "pa_debugprint.h"
|
#include "pa_debugprint.h"
|
||||||
|
|
||||||
#ifndef PA_SVN_REVISION
|
#ifndef PA_GIT_REVISION
|
||||||
#include "pa_svnrevision.h"
|
#include "pa_gitrevision.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
* This is incremented when we add functionality in a backwards-compatible manner.
|
* This is incremented when we add functionality in a backwards-compatible manner.
|
||||||
* Or it is set to zero when paVersionMajor is incremented.
|
* Or it is set to zero when paVersionMajor is incremented.
|
||||||
*/
|
*/
|
||||||
#define paVersionMinor 5
|
#define paVersionMinor 6
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is incremented when we make backwards-compatible bug fixes.
|
* This is incremented when we make backwards-compatible bug fixes.
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a combination of paVersionMajor, paVersionMinor and paVersionSubMinor.
|
* This is a combination of paVersionMajor, paVersionMinor and paVersionSubMinor.
|
||||||
* It will always increase so that version numbers can be compared as integers to
|
* It will always increase so that version numbers can be compared as integers to
|
||||||
* see which is later.
|
* see which is later.
|
||||||
*/
|
*/
|
||||||
#define paVersion paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor)
|
#define paVersion paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor)
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
#define TOSTRING(x) STRINGIFY(x)
|
#define TOSTRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) "." TOSTRING(paVersionMinor) "." TOSTRING(paVersionSubMinor)
|
#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) "." TOSTRING(paVersionMinor) "." TOSTRING(paVersionSubMinor)
|
||||||
#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_SVN_REVISION)
|
#define PA_VERSION_TEXT_ "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_GIT_REVISION)
|
||||||
|
|
||||||
int Pa_GetVersion( void )
|
int Pa_GetVersion( void )
|
||||||
{
|
{
|
||||||
|
@ -123,14 +123,14 @@ const char* Pa_GetVersionText( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
static PaVersionInfo versionInfo_ = {
|
static PaVersionInfo versionInfo_ = {
|
||||||
.versionMajor = paVersionMajor,
|
/*.versionMajor =*/ paVersionMajor,
|
||||||
.versionMinor = paVersionMinor,
|
/*.versionMinor =*/ paVersionMinor,
|
||||||
.versionSubMinor = paVersionSubMinor,
|
/*.versionSubMinor =*/ paVersionSubMinor,
|
||||||
.versionControlRevision = TOSTRING(PA_SVN_REVISION),
|
/*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),
|
||||||
.versionText = PA_VERSION_TEXT_
|
/*.versionText =*/ PA_VERSION_TEXT_
|
||||||
};
|
};
|
||||||
|
|
||||||
const PaVersionInfo* Pa_GetVersionInfo()
|
const PaVersionInfo* Pa_GetVersionInfo( void )
|
||||||
{
|
{
|
||||||
return &versionInfo_;
|
return &versionInfo_;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ static PaError InitializeHostApis( void )
|
||||||
if( !hostApis_ )
|
if( !hostApis_ )
|
||||||
{
|
{
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
hostApisCount_ = 0;
|
hostApisCount_ = 0;
|
||||||
|
@ -235,11 +235,11 @@ static PaError InitializeHostApis( void )
|
||||||
assert( hostApi->info.defaultInputDevice < hostApi->info.deviceCount );
|
assert( hostApi->info.defaultInputDevice < hostApi->info.deviceCount );
|
||||||
assert( hostApi->info.defaultOutputDevice < hostApi->info.deviceCount );
|
assert( hostApi->info.defaultOutputDevice < hostApi->info.deviceCount );
|
||||||
|
|
||||||
/* the first successfully initialized host API with a default input *or*
|
/* the first successfully initialized host API with a default input *or*
|
||||||
output device is used as the default host API.
|
output device is used as the default host API.
|
||||||
*/
|
*/
|
||||||
if( (defaultHostApiIndex_ == -1) &&
|
if( (defaultHostApiIndex_ == -1) &&
|
||||||
( hostApi->info.defaultInputDevice != paNoDevice
|
( hostApi->info.defaultInputDevice != paNoDevice
|
||||||
|| hostApi->info.defaultOutputDevice != paNoDevice ) )
|
|| hostApi->info.defaultOutputDevice != paNoDevice ) )
|
||||||
{
|
{
|
||||||
defaultHostApiIndex_ = hostApisCount_;
|
defaultHostApiIndex_ = hostApisCount_;
|
||||||
|
@ -277,7 +277,7 @@ error:
|
||||||
<device> belongs and returns it. if <hostSpecificDeviceIndex> is
|
<device> belongs and returns it. if <hostSpecificDeviceIndex> is
|
||||||
non-null, the host specific device index is returned in it.
|
non-null, the host specific device index is returned in it.
|
||||||
returns -1 if <device> is out of range.
|
returns -1 if <device> is out of range.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
static int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )
|
static int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )
|
||||||
{
|
{
|
||||||
|
@ -367,7 +367,7 @@ PaError Pa_Initialize( void )
|
||||||
{
|
{
|
||||||
PA_VALIDATE_TYPE_SIZES;
|
PA_VALIDATE_TYPE_SIZES;
|
||||||
PA_VALIDATE_ENDIANNESS;
|
PA_VALIDATE_ENDIANNESS;
|
||||||
|
|
||||||
PaUtil_InitializeClock();
|
PaUtil_InitializeClock();
|
||||||
PaUtil_ResetTraceMessages();
|
PaUtil_ResetTraceMessages();
|
||||||
|
|
||||||
|
@ -390,7 +390,8 @@ PaError Pa_Terminate( void )
|
||||||
|
|
||||||
if( PA_IS_INITIALISED_ )
|
if( PA_IS_INITIALISED_ )
|
||||||
{
|
{
|
||||||
if( --initializationCount_ == 0 )
|
// leave initializationCount_>0 so that Pa_CloseStream() can execute
|
||||||
|
if( initializationCount_ == 1 )
|
||||||
{
|
{
|
||||||
CloseOpenStreams();
|
CloseOpenStreams();
|
||||||
|
|
||||||
|
@ -398,6 +399,7 @@ PaError Pa_Terminate( void )
|
||||||
|
|
||||||
PaUtil_DumpTraceMessages();
|
PaUtil_DumpTraceMessages();
|
||||||
}
|
}
|
||||||
|
--initializationCount_;
|
||||||
result = paNoError;
|
result = paNoError;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -454,11 +456,11 @@ const char *Pa_GetErrorText( PaError errorCode )
|
||||||
case paCanNotWriteToAnInputOnlyStream: result = "Can't write to an input only stream"; break;
|
case paCanNotWriteToAnInputOnlyStream: result = "Can't write to an input only stream"; break;
|
||||||
case paIncompatibleStreamHostApi: result = "Incompatible stream host API"; break;
|
case paIncompatibleStreamHostApi: result = "Incompatible stream host API"; break;
|
||||||
case paBadBufferPtr: result = "Bad buffer pointer"; break;
|
case paBadBufferPtr: result = "Bad buffer pointer"; break;
|
||||||
default:
|
default:
|
||||||
if( errorCode > 0 )
|
if( errorCode > 0 )
|
||||||
result = "Invalid error code (value greater than zero)";
|
result = "Invalid error code (value greater than zero)";
|
||||||
else
|
else
|
||||||
result = "Invalid error code";
|
result = "Invalid error code";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -469,7 +471,7 @@ PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )
|
||||||
{
|
{
|
||||||
PaHostApiIndex result;
|
PaHostApiIndex result;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
PA_LOGAPI_ENTER_PARAMS( "Pa_HostApiTypeIdToHostApiIndex" );
|
PA_LOGAPI_ENTER_PARAMS( "Pa_HostApiTypeIdToHostApiIndex" );
|
||||||
PA_LOGAPI(("\tPaHostApiTypeId type: %d\n", type ));
|
PA_LOGAPI(("\tPaHostApiTypeId type: %d\n", type ));
|
||||||
|
|
||||||
|
@ -480,14 +482,14 @@ PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = paHostApiNotFound;
|
result = paHostApiNotFound;
|
||||||
|
|
||||||
for( i=0; i < hostApisCount_; ++i )
|
for( i=0; i < hostApisCount_; ++i )
|
||||||
{
|
{
|
||||||
if( hostApis_[i]->info.type == type )
|
if( hostApis_[i]->info.type == type )
|
||||||
{
|
{
|
||||||
result = i;
|
result = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +504,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
|
||||||
{
|
{
|
||||||
PaError result;
|
PaError result;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( !PA_IS_INITIALISED_ )
|
if( !PA_IS_INITIALISED_ )
|
||||||
{
|
{
|
||||||
result = paNotInitialized;
|
result = paNotInitialized;
|
||||||
|
@ -510,7 +512,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = paHostApiNotFound;
|
result = paHostApiNotFound;
|
||||||
|
|
||||||
for( i=0; i < hostApisCount_; ++i )
|
for( i=0; i < hostApisCount_; ++i )
|
||||||
{
|
{
|
||||||
if( hostApis_[i]->info.type == type )
|
if( hostApis_[i]->info.type == type )
|
||||||
|
@ -531,7 +533,7 @@ PaError PaUtil_DeviceIndexToHostApiDeviceIndex(
|
||||||
{
|
{
|
||||||
PaError result;
|
PaError result;
|
||||||
PaDeviceIndex x;
|
PaDeviceIndex x;
|
||||||
|
|
||||||
x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;
|
x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;
|
||||||
|
|
||||||
if( x < 0 || x >= hostApi->info.deviceCount )
|
if( x < 0 || x >= hostApi->info.deviceCount )
|
||||||
|
@ -616,7 +618,7 @@ const PaHostApiInfo* Pa_GetHostApiInfo( PaHostApiIndex hostApi )
|
||||||
else if( hostApi < 0 || hostApi >= hostApisCount_ )
|
else if( hostApi < 0 || hostApi >= hostApisCount_ )
|
||||||
{
|
{
|
||||||
info = NULL;
|
info = NULL;
|
||||||
|
|
||||||
PA_LOGAPI(("Pa_GetHostApiInfo returned:\n" ));
|
PA_LOGAPI(("Pa_GetHostApiInfo returned:\n" ));
|
||||||
PA_LOGAPI(("\tPaHostApiInfo*: NULL [ hostApi out of range ]\n" ));
|
PA_LOGAPI(("\tPaHostApiInfo*: NULL [ hostApi out of range ]\n" ));
|
||||||
|
|
||||||
|
@ -725,7 +727,7 @@ PaDeviceIndex Pa_GetDefaultOutputDevice( void )
|
||||||
{
|
{
|
||||||
PaHostApiIndex hostApi;
|
PaHostApiIndex hostApi;
|
||||||
PaDeviceIndex result;
|
PaDeviceIndex result;
|
||||||
|
|
||||||
PA_LOGAPI_ENTER( "Pa_GetDefaultOutputDevice" );
|
PA_LOGAPI_ENTER( "Pa_GetDefaultOutputDevice" );
|
||||||
|
|
||||||
hostApi = Pa_GetDefaultHostApi();
|
hostApi = Pa_GetDefaultHostApi();
|
||||||
|
@ -803,13 +805,13 @@ static int SampleFormatIsValid( PaSampleFormat format )
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NOTE: make sure this validation list is kept syncronised with the one in
|
NOTE: make sure this validation list is kept synchronised with the one in
|
||||||
pa_hostapi.h
|
pa_hostapi.h
|
||||||
|
|
||||||
ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()
|
ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()
|
||||||
conform to the expected values as described below. This function is
|
conform to the expected values as described below. This function is
|
||||||
also designed to be used with the proposed Pa_IsFormatSupported() function.
|
also designed to be used with the proposed Pa_IsFormatSupported() function.
|
||||||
|
|
||||||
There are basically two types of validation that could be performed:
|
There are basically two types of validation that could be performed:
|
||||||
Generic conformance validation, and device capability mismatch
|
Generic conformance validation, and device capability mismatch
|
||||||
validation. This function performs only generic conformance validation.
|
validation. This function performs only generic conformance validation.
|
||||||
|
@ -818,21 +820,21 @@ static int SampleFormatIsValid( PaSampleFormat format )
|
||||||
combinations of parameters - for example, even if the sampleRate
|
combinations of parameters - for example, even if the sampleRate
|
||||||
seems ok, it might not be for a duplex stream - we have no way of
|
seems ok, it might not be for a duplex stream - we have no way of
|
||||||
checking this in an API-neutral way, so we don't try.
|
checking this in an API-neutral way, so we don't try.
|
||||||
|
|
||||||
On success the function returns PaNoError and fills in hostApi,
|
On success the function returns PaNoError and fills in hostApi,
|
||||||
hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure
|
hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure
|
||||||
the function returns an error code indicating the first encountered
|
the function returns an error code indicating the first encountered
|
||||||
parameter error.
|
parameter error.
|
||||||
|
|
||||||
|
|
||||||
If ValidateOpenStreamParameters() returns paNoError, the following
|
If ValidateOpenStreamParameters() returns paNoError, the following
|
||||||
assertions are guaranteed to be true.
|
assertions are guaranteed to be true.
|
||||||
|
|
||||||
- at least one of inputParameters & outputParmeters is valid (not NULL)
|
- at least one of inputParameters & outputParmeters is valid (not NULL)
|
||||||
|
|
||||||
- if inputParameters & outputParameters are both valid, that
|
- if inputParameters & outputParameters are both valid, that
|
||||||
inputParameters->device & outputParameters->device both use the same host api
|
inputParameters->device & outputParameters->device both use the same host api
|
||||||
|
|
||||||
PaDeviceIndex inputParameters->device
|
PaDeviceIndex inputParameters->device
|
||||||
- is within range (0 to Pa_GetDeviceCount-1) Or:
|
- is within range (0 to Pa_GetDeviceCount-1) Or:
|
||||||
- is paUseHostApiSpecificDeviceSpecification and
|
- is paUseHostApiSpecificDeviceSpecification and
|
||||||
|
@ -842,30 +844,30 @@ static int SampleFormatIsValid( PaSampleFormat format )
|
||||||
int inputParameters->channelCount
|
int inputParameters->channelCount
|
||||||
- if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0
|
- if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0
|
||||||
- upper bound is NOT validated against device capabilities
|
- upper bound is NOT validated against device capabilities
|
||||||
|
|
||||||
PaSampleFormat inputParameters->sampleFormat
|
PaSampleFormat inputParameters->sampleFormat
|
||||||
- is one of the sample formats defined in portaudio.h
|
- is one of the sample formats defined in portaudio.h
|
||||||
|
|
||||||
void *inputParameters->hostApiSpecificStreamInfo
|
void *inputParameters->hostApiSpecificStreamInfo
|
||||||
- if supplied its hostApi field matches the input device's host Api
|
- if supplied its hostApi field matches the input device's host Api
|
||||||
|
|
||||||
PaDeviceIndex outputParmeters->device
|
PaDeviceIndex outputParmeters->device
|
||||||
- is within range (0 to Pa_GetDeviceCount-1)
|
- is within range (0 to Pa_GetDeviceCount-1)
|
||||||
|
|
||||||
int outputParmeters->channelCount
|
int outputParmeters->channelCount
|
||||||
- if inputDevice is valid, channelCount is > 0
|
- if inputDevice is valid, channelCount is > 0
|
||||||
- upper bound is NOT validated against device capabilities
|
- upper bound is NOT validated against device capabilities
|
||||||
|
|
||||||
PaSampleFormat outputParmeters->sampleFormat
|
PaSampleFormat outputParmeters->sampleFormat
|
||||||
- is one of the sample formats defined in portaudio.h
|
- is one of the sample formats defined in portaudio.h
|
||||||
|
|
||||||
void *outputParmeters->hostApiSpecificStreamInfo
|
void *outputParmeters->hostApiSpecificStreamInfo
|
||||||
- if supplied its hostApi field matches the output device's host Api
|
- if supplied its hostApi field matches the output device's host Api
|
||||||
|
|
||||||
double sampleRate
|
double sampleRate
|
||||||
- is not an 'absurd' rate (less than 1000. or greater than 384000.)
|
- is not an 'absurd' rate (less than 1000. or greater than 384000.)
|
||||||
- sampleRate is NOT validated against device capabilities
|
- sampleRate is NOT validated against device capabilities
|
||||||
|
|
||||||
PaStreamFlags streamFlags
|
PaStreamFlags streamFlags
|
||||||
- unused platform neutral flags are zero
|
- unused platform neutral flags are zero
|
||||||
- paNeverDropInput is only used for full-duplex callback streams with
|
- paNeverDropInput is only used for full-duplex callback streams with
|
||||||
|
@ -882,7 +884,7 @@ static PaError ValidateOpenStreamParameters(
|
||||||
PaDeviceIndex *hostApiInputDevice,
|
PaDeviceIndex *hostApiInputDevice,
|
||||||
PaDeviceIndex *hostApiOutputDevice )
|
PaDeviceIndex *hostApiOutputDevice )
|
||||||
{
|
{
|
||||||
int inputHostApiIndex = -1, /* Surpress uninitialised var warnings: compiler does */
|
int inputHostApiIndex = -1, /* Suppress uninitialised var warnings: compiler does */
|
||||||
outputHostApiIndex = -1; /* not see that if inputParameters and outputParame- */
|
outputHostApiIndex = -1; /* not see that if inputParameters and outputParame- */
|
||||||
/* ters are both nonzero, these indices are set. */
|
/* ters are both nonzero, these indices are set. */
|
||||||
|
|
||||||
|
@ -992,7 +994,7 @@ static PaError ValidateOpenStreamParameters(
|
||||||
!= (*hostApi)->info.type )
|
!= (*hostApi)->info.type )
|
||||||
return paIncompatibleHostApiSpecificStreamInfo;
|
return paIncompatibleHostApiSpecificStreamInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (inputParameters != NULL) && (outputParameters != NULL) )
|
if( (inputParameters != NULL) && (outputParameters != NULL) )
|
||||||
{
|
{
|
||||||
|
@ -1001,8 +1003,8 @@ static PaError ValidateOpenStreamParameters(
|
||||||
return paBadIODeviceCombination;
|
return paBadIODeviceCombination;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Check for absurd sample rates. */
|
/* Check for absurd sample rates. */
|
||||||
if( (sampleRate < 1000.0) || (sampleRate > 384000.0) )
|
if( (sampleRate < 1000.0) || (sampleRate > 384000.0) )
|
||||||
return paInvalidSampleRate;
|
return paInvalidSampleRate;
|
||||||
|
@ -1024,7 +1026,7 @@ static PaError ValidateOpenStreamParameters(
|
||||||
if( framesPerBuffer != paFramesPerBufferUnspecified )
|
if( framesPerBuffer != paFramesPerBufferUnspecified )
|
||||||
return paInvalidFlag;
|
return paInvalidFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
return paNoError;
|
return paNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1064,7 +1066,7 @@ PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
|
||||||
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
||||||
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
||||||
}
|
}
|
||||||
|
|
||||||
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1087,7 +1089,7 @@ PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
|
||||||
PA_LOGAPI_EXIT_PAERROR( "Pa_IsFormatSupported", result );
|
PA_LOGAPI_EXIT_PAERROR( "Pa_IsFormatSupported", result );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( inputParameters )
|
if( inputParameters )
|
||||||
{
|
{
|
||||||
|
@ -1174,7 +1176,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
||||||
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
||||||
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
||||||
}
|
}
|
||||||
|
|
||||||
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
||||||
PA_LOGAPI(("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer ));
|
PA_LOGAPI(("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer ));
|
||||||
PA_LOGAPI(("\tPaStreamFlags streamFlags: 0x%x\n", streamFlags ));
|
PA_LOGAPI(("\tPaStreamFlags streamFlags: 0x%x\n", streamFlags ));
|
||||||
|
@ -1193,7 +1195,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for parameter errors.
|
/* Check for parameter errors.
|
||||||
NOTE: make sure this validation list is kept syncronised with the one
|
NOTE: make sure this validation list is kept synchronised with the one
|
||||||
in pa_hostapi.h
|
in pa_hostapi.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1221,7 +1223,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
||||||
PA_LOGAPI(("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) ));
|
PA_LOGAPI(("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) ));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( inputParameters )
|
if( inputParameters )
|
||||||
{
|
{
|
||||||
|
@ -1295,8 +1297,8 @@ PaError Pa_OpenDefaultStream( PaStream** stream,
|
||||||
{
|
{
|
||||||
hostApiInputParameters.device = Pa_GetDefaultInputDevice();
|
hostApiInputParameters.device = Pa_GetDefaultInputDevice();
|
||||||
if( hostApiInputParameters.device == paNoDevice )
|
if( hostApiInputParameters.device == paNoDevice )
|
||||||
return paDeviceUnavailable;
|
return paDeviceUnavailable;
|
||||||
|
|
||||||
hostApiInputParameters.channelCount = inputChannelCount;
|
hostApiInputParameters.channelCount = inputChannelCount;
|
||||||
hostApiInputParameters.sampleFormat = sampleFormat;
|
hostApiInputParameters.sampleFormat = sampleFormat;
|
||||||
/* defaultHighInputLatency is used below instead of
|
/* defaultHighInputLatency is used below instead of
|
||||||
|
@ -1304,7 +1306,7 @@ PaError Pa_OpenDefaultStream( PaStream** stream,
|
||||||
stream to work reliably than it is for it to work with the lowest
|
stream to work reliably than it is for it to work with the lowest
|
||||||
latency.
|
latency.
|
||||||
*/
|
*/
|
||||||
hostApiInputParameters.suggestedLatency =
|
hostApiInputParameters.suggestedLatency =
|
||||||
Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;
|
Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;
|
||||||
hostApiInputParameters.hostApiSpecificStreamInfo = NULL;
|
hostApiInputParameters.hostApiSpecificStreamInfo = NULL;
|
||||||
hostApiInputParametersPtr = &hostApiInputParameters;
|
hostApiInputParametersPtr = &hostApiInputParameters;
|
||||||
|
@ -1318,7 +1320,7 @@ PaError Pa_OpenDefaultStream( PaStream** stream,
|
||||||
{
|
{
|
||||||
hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();
|
hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();
|
||||||
if( hostApiOutputParameters.device == paNoDevice )
|
if( hostApiOutputParameters.device == paNoDevice )
|
||||||
return paDeviceUnavailable;
|
return paDeviceUnavailable;
|
||||||
|
|
||||||
hostApiOutputParameters.channelCount = outputChannelCount;
|
hostApiOutputParameters.channelCount = outputChannelCount;
|
||||||
hostApiOutputParameters.sampleFormat = sampleFormat;
|
hostApiOutputParameters.sampleFormat = sampleFormat;
|
||||||
|
@ -1702,7 +1704,7 @@ PaError Pa_WriteStream( PaStream* stream,
|
||||||
else if( result == 1 )
|
else if( result == 1 )
|
||||||
{
|
{
|
||||||
result = paStreamIsStopped;
|
result = paStreamIsStopped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#define PA_GIT_REVISION unknown
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_HOSTAPI_H
|
#ifndef PA_HOSTAPI_H
|
||||||
#define PA_HOSTAPI_H
|
#define PA_HOSTAPI_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_hostapi.h 1880 2012-12-04 18:39:48Z rbencina $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* host api representation
|
* host api representation
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_process.c 1954 2015-04-19 18:48:38Z gineera $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* streamCallback <-> host buffer processing adapter
|
* streamCallback <-> host buffer processing adapter
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_PROCESS_H
|
#ifndef PA_PROCESS_H
|
||||||
#define PA_PROCESS_H
|
#define PA_PROCESS_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_process.h 1668 2011-05-02 17:07:11Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library callback buffer processing adapters
|
* Portable Audio I/O Library callback buffer processing adapters
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
When a stream is opened, the buffer processor should be initialized using
|
When a stream is opened, the buffer processor should be initialized using
|
||||||
PaUtil_InitializeBufferProcessor. This function initializes internal state
|
PaUtil_InitializeBufferProcessor. This function initializes internal state
|
||||||
and allocates temporary buffers as neccesary according to the supplied
|
and allocates temporary buffers as necessary according to the supplied
|
||||||
configuration parameters. Some of the parameters correspond to those requested
|
configuration parameters. Some of the parameters correspond to those requested
|
||||||
by the user in their call to Pa_OpenStream(), others reflect the requirements
|
by the user in their call to Pa_OpenStream(), others reflect the requirements
|
||||||
of the host API implementation - they indicate host buffer sizes, formats,
|
of the host API implementation - they indicate host buffer sizes, formats,
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.
|
PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.
|
||||||
Which function you call will depend on whether the host buffer(s) are
|
Which function you call will depend on whether the host buffer(s) are
|
||||||
interleaved or not.
|
interleaved or not.
|
||||||
- If the available host data is split accross two buffers (for example a
|
- If the available host data is split across two buffers (for example a
|
||||||
data range at the end of a circular buffer and another range at the
|
data range at the end of a circular buffer and another range at the
|
||||||
beginning of the circular buffer), also call
|
beginning of the circular buffer), also call
|
||||||
PaUtil_Set2ndInputFrameCount, PaUtil_Set2ndInputChannel,
|
PaUtil_Set2ndInputFrameCount, PaUtil_Set2ndInputChannel,
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.
|
PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.
|
||||||
Which function you call will depend on whether the host buffer(s) are
|
Which function you call will depend on whether the host buffer(s) are
|
||||||
interleaved or not.
|
interleaved or not.
|
||||||
- If the available host output buffer space is split accross two buffers
|
- If the available host output buffer space is split across two buffers
|
||||||
(for example a data range at the end of a circular buffer and another
|
(for example a data range at the end of a circular buffer and another
|
||||||
range at the beginning of the circular buffer), call
|
range at the beginning of the circular buffer), call
|
||||||
PaUtil_Set2ndOutputFrameCount, PaUtil_Set2ndOutputChannel,
|
PaUtil_Set2ndOutputFrameCount, PaUtil_Set2ndOutputChannel,
|
||||||
|
@ -237,7 +237,7 @@ typedef enum {
|
||||||
}PaUtilHostBufferSizeMode;
|
}PaUtilHostBufferSizeMode;
|
||||||
|
|
||||||
|
|
||||||
/** @brief An auxilliary data structure used internally by the buffer processor
|
/** @brief An auxiliary data structure used internally by the buffer processor
|
||||||
to represent host input and output buffers. */
|
to represent host input and output buffers. */
|
||||||
typedef struct PaUtilChannelDescriptor{
|
typedef struct PaUtilChannelDescriptor{
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -452,10 +452,10 @@ void PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bufferProcessor,
|
||||||
unsigned long frameCount );
|
unsigned long frameCount );
|
||||||
|
|
||||||
|
|
||||||
/** Indicate that no input is avalable. This function should be used when
|
/** Indicate that no input is available. This function should be used when
|
||||||
priming the output of a full-duplex stream opened with the
|
priming the output of a full-duplex stream opened with the
|
||||||
paPrimeOutputBuffersUsingStreamCallback flag. Note that it is not necessary
|
paPrimeOutputBuffersUsingStreamCallback flag. Note that it is not necessary
|
||||||
to call this or any othe PaUtil_Set*Input* functions for ouput-only streams.
|
to call this or any other PaUtil_Set*Input* functions for ouput-only streams.
|
||||||
|
|
||||||
@param bufferProcessor The buffer processor.
|
@param bufferProcessor The buffer processor.
|
||||||
*/
|
*/
|
||||||
|
@ -648,11 +648,11 @@ void PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bufferProcessor,
|
||||||
|
|
||||||
If the stream callback is called its result is stored in *callbackResult. If
|
If the stream callback is called its result is stored in *callbackResult. If
|
||||||
the stream callback returns paComplete or paAbort, all output buffers will be
|
the stream callback returns paComplete or paAbort, all output buffers will be
|
||||||
full of valid data - some of which may be zeros to acount for data that
|
full of valid data - some of which may be zeros to account for data that
|
||||||
wasn't generated by the terminating callback.
|
wasn't generated by the terminating callback.
|
||||||
|
|
||||||
@return The number of frames processed. This usually corresponds to the
|
@return The number of frames processed. This usually corresponds to the
|
||||||
number of frames specified by the PaUtil_Set*FrameCount functions, exept in
|
number of frames specified by the PaUtil_Set*FrameCount functions, except in
|
||||||
the paUtilVariableHostBufferSizePartialUsageAllowed buffer size mode when a
|
the paUtilVariableHostBufferSizePartialUsageAllowed buffer size mode when a
|
||||||
smaller value may be returned.
|
smaller value may be returned.
|
||||||
*/
|
*/
|
||||||
|
@ -660,7 +660,7 @@ unsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bufferProcessor
|
||||||
int *callbackResult );
|
int *callbackResult );
|
||||||
|
|
||||||
|
|
||||||
/** Determine whether any callback generated output remains in the bufffer
|
/** Determine whether any callback generated output remains in the buffer
|
||||||
processor's internal buffers. This method may be used to determine when to
|
processor's internal buffers. This method may be used to determine when to
|
||||||
continue calling PaUtil_EndBufferProcessing() after the callback has returned
|
continue calling PaUtil_EndBufferProcessing() after the callback has returned
|
||||||
a callbackResult of paComplete.
|
a callbackResult of paComplete.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_ringbuffer.c 1738 2011-08-18 11:47:28Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* Ring Buffer utility.
|
* Ring Buffer utility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_RINGBUFFER_H
|
#ifndef PA_RINGBUFFER_H
|
||||||
#define PA_RINGBUFFER_H
|
#define PA_RINGBUFFER_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_ringbuffer.h 1873 2012-10-07 19:00:11Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* Ring Buffer utility.
|
* Ring Buffer utility.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_stream.c 1339 2008-02-15 07:50:33Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* stream interface
|
* stream interface
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_STREAM_H
|
#ifndef PA_STREAM_H
|
||||||
#define PA_STREAM_H
|
#define PA_STREAM_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_stream.h 1339 2008-02-15 07:50:33Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* stream interface
|
* stream interface
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_trace.c 1916 2014-01-17 03:45:15Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library Trace Facility
|
* Portable Audio I/O Library Trace Facility
|
||||||
* Store trace information in real-time for later printing.
|
* Store trace information in real-time for later printing.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_TRACE_H
|
#ifndef PA_TRACE_H
|
||||||
#define PA_TRACE_H
|
#define PA_TRACE_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_trace.h 1812 2012-02-14 09:32:57Z robiwan $
|
* $Id$
|
||||||
* Portable Audio I/O Library Trace Facility
|
* Portable Audio I/O Library Trace Facility
|
||||||
* Store trace information in real-time for later printing.
|
* Store trace information in real-time for later printing.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PA_UTIL_H
|
#ifndef PA_UTIL_H
|
||||||
#define PA_UTIL_H
|
#define PA_UTIL_H
|
||||||
/*
|
/*
|
||||||
* $Id: pa_util.h 1584 2011-02-02 18:58:17Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library implementation utilities header
|
* Portable Audio I/O Library implementation utilities header
|
||||||
* common implementation utilities and interfaces
|
* common implementation utilities and interfaces
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ struct PaUtilHostApiRepresentation;
|
||||||
host api specific extension functions which aren't passed a rep pointer
|
host api specific extension functions which aren't passed a rep pointer
|
||||||
by pa_front.c.
|
by pa_front.c.
|
||||||
|
|
||||||
@param hostApi A pointer to a host API represenation pointer. Apon success
|
@param hostApi A pointer to a host API representation pointer. Upon success
|
||||||
this will receive the requested representation pointer.
|
this will receive the requested representation pointer.
|
||||||
|
|
||||||
@param type A valid host API type identifier.
|
@param type A valid host API type identifier.
|
||||||
|
@ -79,7 +79,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
|
||||||
|
|
||||||
|
|
||||||
/** Convert a PortAudio device index into a host API specific device index.
|
/** Convert a PortAudio device index into a host API specific device index.
|
||||||
@param hostApiDevice Pointer to a device index, on success this will recieve the
|
@param hostApiDevice Pointer to a device index, on success this will receive the
|
||||||
converted device index value.
|
converted device index value.
|
||||||
@param device The PortAudio device index to convert.
|
@param device The PortAudio device index to convert.
|
||||||
@param hostApi The host api which the index should be converted for.
|
@param hostApi The host api which the index should be converted for.
|
||||||
|
@ -121,7 +121,7 @@ void PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,
|
||||||
void *PaUtil_AllocateMemory( long size );
|
void *PaUtil_AllocateMemory( long size );
|
||||||
|
|
||||||
|
|
||||||
/** Realease block if non-NULL. block may be NULL */
|
/** Release block if non-NULL. block may be NULL */
|
||||||
void PaUtil_FreeMemory( void *block );
|
void PaUtil_FreeMemory( void *block );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_linux_alsa.c 1911 2013-10-17 12:44:09Z gineera $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* Latest Version at: http://www.portaudio.com
|
* Latest Version at: http://www.portaudio.com
|
||||||
* ALSA implementation by Joshua Haberman and Arve Knudsen
|
* ALSA implementation by Joshua Haberman and Arve Knudsen
|
||||||
|
@ -323,8 +323,10 @@ int _PA_LOCAL_IMPL(snd_pcm_hw_params_get_buffer_size_max) (const snd_pcm_hw_para
|
||||||
snd_pcm_uframes_t pmax = 0;
|
snd_pcm_uframes_t pmax = 0;
|
||||||
unsigned int pcnt = 0;
|
unsigned int pcnt = 0;
|
||||||
|
|
||||||
|
dir = 0;
|
||||||
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_max)(params, &pmax, &dir) ) < 0 )
|
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_max)(params, &pmax, &dir) ) < 0 )
|
||||||
return ret;
|
return ret;
|
||||||
|
dir = 0;
|
||||||
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_max)(params, &pcnt, &dir) ) < 0 )
|
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_max)(params, &pcnt, &dir) ) < 0 )
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -842,7 +844,6 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
||||||
double * defaultLowLatency, * defaultHighLatency, * defaultSampleRate =
|
double * defaultLowLatency, * defaultHighLatency, * defaultSampleRate =
|
||||||
&devInfo->baseDeviceInfo.defaultSampleRate;
|
&devInfo->baseDeviceInfo.defaultSampleRate;
|
||||||
double defaultSr = *defaultSampleRate;
|
double defaultSr = *defaultSampleRate;
|
||||||
int dir;
|
|
||||||
|
|
||||||
assert( pcm );
|
assert( pcm );
|
||||||
|
|
||||||
|
@ -920,7 +921,7 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
||||||
alsaBufferFrames = 512;
|
alsaBufferFrames = 512;
|
||||||
alsaPeriodFrames = 128;
|
alsaPeriodFrames = 128;
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, NULL ), paUnanticipatedHostError );
|
||||||
*defaultLowLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;
|
*defaultLowLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;
|
||||||
|
|
||||||
/* Base the high latency case on values four times larger */
|
/* Base the high latency case on values four times larger */
|
||||||
|
@ -930,7 +931,7 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
||||||
ENSURE_( SetApproximateSampleRate( pcm, hwParams, defaultSr ), paUnanticipatedHostError );
|
ENSURE_( SetApproximateSampleRate( pcm, hwParams, defaultSr ), paUnanticipatedHostError );
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, NULL ), paUnanticipatedHostError );
|
||||||
*defaultHighLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;
|
*defaultHighLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;
|
||||||
|
|
||||||
*minChannels = (int)minChans;
|
*minChannels = (int)minChans;
|
||||||
|
@ -1066,6 +1067,10 @@ static int IgnorePlugin( const char *pluginId )
|
||||||
static const char *ignoredPlugins[] = {"hw", "plughw", "plug", "dsnoop", "tee",
|
static const char *ignoredPlugins[] = {"hw", "plughw", "plug", "dsnoop", "tee",
|
||||||
"file", "null", "shm", "cards", "rate_convert", NULL};
|
"file", "null", "shm", "cards", "rate_convert", NULL};
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
if( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS" ) && atoi( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS") ) )
|
||||||
|
return 1;
|
||||||
|
|
||||||
while( ignoredPlugins[i] )
|
while( ignoredPlugins[i] )
|
||||||
{
|
{
|
||||||
if( !strcmp( pluginId, ignoredPlugins[i] ) )
|
if( !strcmp( pluginId, ignoredPlugins[i] ) )
|
||||||
|
@ -1327,6 +1332,8 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
||||||
paInsufficientMemory );
|
paInsufficientMemory );
|
||||||
snprintf( deviceName, len, "%s: %s (%s)", cardName, infoName, buf );
|
snprintf( deviceName, len, "%s: %s (%s)", cardName, infoName, buf );
|
||||||
|
|
||||||
|
PA_DEBUG(( "%s: Found device [%d]: %s\n", __FUNCTION__, numDeviceNames, deviceName ));
|
||||||
|
|
||||||
++numDeviceNames;
|
++numDeviceNames;
|
||||||
if( !hwDevInfos || numDeviceNames > maxDeviceNames )
|
if( !hwDevInfos || numDeviceNames > maxDeviceNames )
|
||||||
{
|
{
|
||||||
|
@ -1450,7 +1457,7 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
||||||
|
|
||||||
PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );
|
PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );
|
||||||
}
|
}
|
||||||
assert( devIdx < numDeviceNames );
|
assert( devIdx <= numDeviceNames );
|
||||||
/* Now inspect 'dmix' and 'default' plugins */
|
/* Now inspect 'dmix' and 'default' plugins */
|
||||||
for( i = 0; i < numDeviceNames; ++i )
|
for( i = 0; i < numDeviceNames; ++i )
|
||||||
{
|
{
|
||||||
|
@ -1955,7 +1962,7 @@ static PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *se
|
||||||
{
|
{
|
||||||
/* Configuration consists of setting all of ALSA's parameters.
|
/* Configuration consists of setting all of ALSA's parameters.
|
||||||
* These parameters come in two flavors: hardware parameters
|
* These parameters come in two flavors: hardware parameters
|
||||||
* and software paramters. Hardware parameters will affect
|
* and software parameters. Hardware parameters will affect
|
||||||
* the way the device is initialized, software parameters
|
* the way the device is initialized, software parameters
|
||||||
* affect the way ALSA interacts with me, the user-level client.
|
* affect the way ALSA interacts with me, the user-level client.
|
||||||
*/
|
*/
|
||||||
|
@ -1969,7 +1976,7 @@ static PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *se
|
||||||
|
|
||||||
/* self->framesPerPeriod = framesPerHostBuffer; */
|
/* self->framesPerPeriod = framesPerHostBuffer; */
|
||||||
|
|
||||||
/* ... fill up the configuration space with all possibile
|
/* ... fill up the configuration space with all possible
|
||||||
* combinations of parameters this device will accept */
|
* combinations of parameters this device will accept */
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
|
||||||
|
|
||||||
|
@ -2154,7 +2161,7 @@ static PaError PaAlsaStream_Initialize( PaAlsaStream *self, PaAlsaHostApiReprese
|
||||||
|
|
||||||
self->framesPerUserBuffer = framesPerUserBuffer;
|
self->framesPerUserBuffer = framesPerUserBuffer;
|
||||||
self->neverDropInput = streamFlags & paNeverDropInput;
|
self->neverDropInput = streamFlags & paNeverDropInput;
|
||||||
/* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback untill buffer priming is fully supported in pa_process.c */
|
/* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback until buffer priming is fully supported in pa_process.c */
|
||||||
/*
|
/*
|
||||||
if( outParams & streamFlags & paPrimeOutputBuffersUsingStreamCallback )
|
if( outParams & streamFlags & paPrimeOutputBuffersUsingStreamCallback )
|
||||||
self->primeBuffers = 1;
|
self->primeBuffers = 1;
|
||||||
|
@ -2324,6 +2331,7 @@ static PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamCompo
|
||||||
/* It may be that the device only supports 2 periods for instance */
|
/* It may be that the device only supports 2 periods for instance */
|
||||||
dir = 0;
|
dir = 0;
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_get_periods_min( hwParams, &minPeriods, &dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_get_periods_min( hwParams, &minPeriods, &dir ), paUnanticipatedHostError );
|
||||||
|
dir = 0;
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_get_periods_max( hwParams, &maxPeriods, &dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_get_periods_max( hwParams, &maxPeriods, &dir ), paUnanticipatedHostError );
|
||||||
assert( maxPeriods > 1 );
|
assert( maxPeriods > 1 );
|
||||||
|
|
||||||
|
@ -2381,7 +2389,7 @@ static PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamCompo
|
||||||
{
|
{
|
||||||
framesPerHostBuffer *= 2;
|
framesPerHostBuffer *= 2;
|
||||||
}
|
}
|
||||||
/* One extra period is preferrable to one less (should be more robust) */
|
/* One extra period is preferable to one less (should be more robust) */
|
||||||
if( bufferSize / framesPerHostBuffer < numPeriods )
|
if( bufferSize / framesPerHostBuffer < numPeriods )
|
||||||
{
|
{
|
||||||
framesPerHostBuffer /= 2;
|
framesPerHostBuffer /= 2;
|
||||||
|
@ -3196,7 +3204,7 @@ static int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwPara
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &setRate, NULL ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &setRate, NULL ), paUnanticipatedHostError );
|
||||||
/* The value actually set will be put in 'setRate' (may be way off); check the deviation as a proportion
|
/* The value actually set will be put in 'setRate' (may be way off); check the deviation as a proportion
|
||||||
* of the requested-rate with reference to the max-deviate-ratio (larger values allow less deviation) */
|
* of the requested-rate with reference to the max-deviate-ratio (larger values allow less deviation) */
|
||||||
deviation = abs( setRate - reqRate );
|
deviation = abs( (int)setRate - (int)reqRate );
|
||||||
if( deviation > 0 && deviation * RATE_MAX_DEVIATE_RATIO > reqRate )
|
if( deviation > 0 && deviation * RATE_MAX_DEVIATE_RATIO > reqRate )
|
||||||
result = paInvalidSampleRate;
|
result = paInvalidSampleRate;
|
||||||
|
|
||||||
|
@ -3209,6 +3217,7 @@ error:
|
||||||
unsigned int _min = 0, _max = 0;
|
unsigned int _min = 0, _max = 0;
|
||||||
int _dir = 0;
|
int _dir = 0;
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_get_rate_min( hwParams, &_min, &_dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_get_rate_min( hwParams, &_min, &_dir ), paUnanticipatedHostError );
|
||||||
|
_dir = 0;
|
||||||
ENSURE_( alsa_snd_pcm_hw_params_get_rate_max( hwParams, &_max, &_dir ), paUnanticipatedHostError );
|
ENSURE_( alsa_snd_pcm_hw_params_get_rate_max( hwParams, &_max, &_dir ), paUnanticipatedHostError );
|
||||||
PA_DEBUG(( "%s: SR min = %u, max = %u, req = %u\n", __FUNCTION__, _min, _max, reqRate ));
|
PA_DEBUG(( "%s: SR min = %u, max = %u, req = %u\n", __FUNCTION__, _min, _max, reqRate ));
|
||||||
}
|
}
|
||||||
|
@ -3630,14 +3639,15 @@ error:
|
||||||
*/
|
*/
|
||||||
static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent* self, struct pollfd* pfds )
|
static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent* self, struct pollfd* pfds )
|
||||||
{
|
{
|
||||||
PaError result = paNoError;
|
int nfds = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
|
||||||
int ret = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
|
/* If alsa returns anything else, like -EPIPE return */
|
||||||
(void)ret; /* Prevent unused variable warning if asserts are turned off */
|
if( nfds != self->nfds )
|
||||||
assert( ret == self->nfds );
|
{
|
||||||
|
return paUnanticipatedHostError;
|
||||||
|
}
|
||||||
self->ready = 0;
|
self->ready = 0;
|
||||||
|
|
||||||
return result;
|
return paNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Examine results from poll().
|
/** Examine results from poll().
|
||||||
|
@ -3794,19 +3804,44 @@ static PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *fr
|
||||||
if( pollCapture )
|
if( pollCapture )
|
||||||
{
|
{
|
||||||
capturePfds = self->pfds;
|
capturePfds = self->pfds;
|
||||||
PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds ) );
|
PaError res = PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds );
|
||||||
|
if( res != paNoError)
|
||||||
|
{
|
||||||
|
xrun = 1;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
totalFds += self->capture.nfds;
|
totalFds += self->capture.nfds;
|
||||||
}
|
}
|
||||||
if( pollPlayback )
|
if( pollPlayback )
|
||||||
{
|
{
|
||||||
/* self->pfds is in effect an array of fds; if necessary, index past the capture fds */
|
/* self->pfds is in effect an array of fds; if necessary, index past the capture fds */
|
||||||
playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);
|
playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);
|
||||||
PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds ) );
|
PaError res = PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds );
|
||||||
|
if( res != paNoError)
|
||||||
|
{
|
||||||
|
xrun = 1;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
totalFds += self->playback.nfds;
|
totalFds += self->playback.nfds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PTHREAD_CANCELED
|
||||||
|
if( self->callbackMode )
|
||||||
|
{
|
||||||
|
/* To allow 'Abort' to terminate the callback thread, enable cancelability just for poll() (& disable after) */
|
||||||
|
pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pollResults = poll( self->pfds, totalFds, pollTimeout );
|
pollResults = poll( self->pfds, totalFds, pollTimeout );
|
||||||
|
|
||||||
|
#ifdef PTHREAD_CANCELED
|
||||||
|
if( self->callbackMode )
|
||||||
|
{
|
||||||
|
pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( pollResults < 0 )
|
if( pollResults < 0 )
|
||||||
{
|
{
|
||||||
/* XXX: Depend on preprocessor condition? */
|
/* XXX: Depend on preprocessor condition? */
|
||||||
|
@ -4162,7 +4197,7 @@ error:
|
||||||
* directly is obtained from ALSA, we then request as much directly accessible memory as possible within this amount
|
* directly is obtained from ALSA, we then request as much directly accessible memory as possible within this amount
|
||||||
* from ALSA. The buffer memory is registered with the PA buffer processor and processing is carried out with
|
* from ALSA. The buffer memory is registered with the PA buffer processor and processing is carried out with
|
||||||
* PaUtil_EndBufferProcessing. Finally, the number of processed frames is reported to ALSA. The processing can
|
* PaUtil_EndBufferProcessing. Finally, the number of processed frames is reported to ALSA. The processing can
|
||||||
* happen in several iterations untill we have consumed the known number of available frames (or an xrun is detected).
|
* happen in several iterations until we have consumed the known number of available frames (or an xrun is detected).
|
||||||
*/
|
*/
|
||||||
static void *CallbackThreadFunc( void *userData )
|
static void *CallbackThreadFunc( void *userData )
|
||||||
{
|
{
|
||||||
|
@ -4175,12 +4210,18 @@ static void *CallbackThreadFunc( void *userData )
|
||||||
int streamStarted = 0;
|
int streamStarted = 0;
|
||||||
|
|
||||||
assert( stream );
|
assert( stream );
|
||||||
|
/* Not implemented */
|
||||||
|
assert( !stream->primeBuffers );
|
||||||
|
|
||||||
/* Execute OnExit when exiting */
|
/* Execute OnExit when exiting */
|
||||||
pthread_cleanup_push( &OnExit, stream );
|
pthread_cleanup_push( &OnExit, stream );
|
||||||
|
#ifdef PTHREAD_CANCELED
|
||||||
/* Not implemented */
|
/* 'Abort' will use thread cancellation to terminate the callback thread, but the Alsa-lib functions
|
||||||
assert( !stream->primeBuffers );
|
* are NOT cancel-safe, (and can end up in an inconsistent state). So, disable cancelability for
|
||||||
|
* the thread here, and just re-enable it for the poll() in PaAlsaStream_WaitForFrames(). */
|
||||||
|
pthread_testcancel();
|
||||||
|
pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
|
||||||
|
#endif
|
||||||
|
|
||||||
/* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the
|
/* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the
|
||||||
* stream is started immediately. The latter involves signaling the waiting main thread.
|
* stream is started immediately. The latter involves signaling the waiting main thread.
|
||||||
|
@ -4242,7 +4283,7 @@ static void *CallbackThreadFunc( void *userData )
|
||||||
/* There is still buffered output that needs to be processed */
|
/* There is still buffered output that needs to be processed */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait for data to become available, this comes down to polling the ALSA file descriptors untill we have
|
/* Wait for data to become available, this comes down to polling the ALSA file descriptors until we have
|
||||||
* a number of available frames.
|
* a number of available frames.
|
||||||
*/
|
*/
|
||||||
PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
|
PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
|
||||||
|
@ -4265,10 +4306,6 @@ static void *CallbackThreadFunc( void *userData )
|
||||||
{
|
{
|
||||||
xrun = 0;
|
xrun = 0;
|
||||||
|
|
||||||
#ifdef PTHREAD_CANCELED
|
|
||||||
pthread_testcancel();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @concern Xruns Under/overflows are to be reported to the callback */
|
/** @concern Xruns Under/overflows are to be reported to the callback */
|
||||||
if( stream->underrun > 0.0 )
|
if( stream->underrun > 0.0 )
|
||||||
{
|
{
|
||||||
|
@ -4299,11 +4336,12 @@ static void *CallbackThreadFunc( void *userData )
|
||||||
#if 0
|
#if 0
|
||||||
CallbackUpdate( &stream->threading );
|
CallbackUpdate( &stream->threading );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CalculateTimeInfo( stream, &timeInfo );
|
CalculateTimeInfo( stream, &timeInfo );
|
||||||
PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
|
PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
|
||||||
cbFlags = 0;
|
cbFlags = 0;
|
||||||
|
|
||||||
/* CPU load measurement should include processing activivity external to the stream callback */
|
/* CPU load measurement should include processing activity external to the stream callback */
|
||||||
PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
|
PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
|
||||||
|
|
||||||
framesGot = framesAvail;
|
framesGot = framesAvail;
|
||||||
|
@ -4334,7 +4372,6 @@ static void *CallbackThreadFunc( void *userData )
|
||||||
{
|
{
|
||||||
/* Go back to polling for more frames */
|
/* Go back to polling for more frames */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( paContinue != callbackResult )
|
if( paContinue != callbackResult )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_asio.cpp 1890 2013-05-02 01:06:01Z rbencina $
|
* $Id$
|
||||||
* Portable Audio I/O Library for ASIO Drivers
|
* Portable Audio I/O Library for ASIO Drivers
|
||||||
*
|
*
|
||||||
* Author: Stephane Letz
|
* Author: Stephane Letz
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
08-20-01 More conversion, PA_StreamTime, Pa_GetHostError : Stephane Letz
|
08-20-01 More conversion, PA_StreamTime, Pa_GetHostError : Stephane Letz
|
||||||
08-21-01 PaUInt8 bug correction, implementation of ASIOSTFloat32LSB and ASIOSTFloat32MSB native formats : Stephane Letz
|
08-21-01 PaUInt8 bug correction, implementation of ASIOSTFloat32LSB and ASIOSTFloat32MSB native formats : Stephane Letz
|
||||||
08-24-01 MAX_INT32_FP hack, another Uint8 fix : Stephane and Phil
|
08-24-01 MAX_INT32_FP hack, another Uint8 fix : Stephane and Phil
|
||||||
08-27-01 Implementation of hostBufferSize < userBufferSize case, better management of the ouput buffer when
|
08-27-01 Implementation of hostBufferSize < userBufferSize case, better management of the output buffer when
|
||||||
the stream is stopped : Stephane Letz
|
the stream is stopped : Stephane Letz
|
||||||
08-28-01 Check the stream pointer for null in bufferSwitchTimeInfo, correct bug in bufferSwitchTimeInfo when
|
08-28-01 Check the stream pointer for null in bufferSwitchTimeInfo, correct bug in bufferSwitchTimeInfo when
|
||||||
the stream is stopped : Stephane Letz
|
the stream is stopped : Stephane Letz
|
||||||
|
@ -55,11 +55,11 @@
|
||||||
10-26-01 Management of hostBufferSize and userBufferSize of any size : Stephane Letz
|
10-26-01 Management of hostBufferSize and userBufferSize of any size : Stephane Letz
|
||||||
10-27-01 Improve calculus of hostBufferSize to be multiple or divisor of userBufferSize if possible : Stephane and Phil
|
10-27-01 Improve calculus of hostBufferSize to be multiple or divisor of userBufferSize if possible : Stephane and Phil
|
||||||
10-29-01 Change MAX_INT32_FP to (2147483520.0f) to prevent roundup to 0x80000000 : Phil Burk
|
10-29-01 Change MAX_INT32_FP to (2147483520.0f) to prevent roundup to 0x80000000 : Phil Burk
|
||||||
10-31-01 Clear the ouput buffer and user buffers in PaHost_StartOutput, correct bug in GetFirstMultiple : Stephane Letz
|
10-31-01 Clear the output buffer and user buffers in PaHost_StartOutput, correct bug in GetFirstMultiple : Stephane Letz
|
||||||
11-06-01 Rename functions : Stephane Letz
|
11-06-01 Rename functions : Stephane Letz
|
||||||
11-08-01 New Pa_ASIO_Adaptor_Init function to init Callback adpatation variables, cleanup of Pa_ASIO_Callback_Input: Stephane Letz
|
11-08-01 New Pa_ASIO_Adaptor_Init function to init Callback adpatation variables, cleanup of Pa_ASIO_Callback_Input: Stephane Letz
|
||||||
11-29-01 Break apart device loading to debug random failure in Pa_ASIO_QueryDeviceInfo ; Phil Burk
|
11-29-01 Break apart device loading to debug random failure in Pa_ASIO_QueryDeviceInfo ; Phil Burk
|
||||||
01-03-02 Desallocate all resources in PaHost_Term for cases where Pa_CloseStream is not called properly : Stephane Letz
|
01-03-02 Deallocate all resources in PaHost_Term for cases where Pa_CloseStream is not called properly : Stephane Letz
|
||||||
02-01-02 Cleanup, test of multiple-stream opening : Stephane Letz
|
02-01-02 Cleanup, test of multiple-stream opening : Stephane Letz
|
||||||
19-02-02 New Pa_ASIO_loadDriver that calls CoInitialize on each thread on Windows : Stephane Letz
|
19-02-02 New Pa_ASIO_loadDriver that calls CoInitialize on each thread on Windows : Stephane Letz
|
||||||
09-04-02 Correct error code management in PaHost_Term, removes various compiler warning : Stephane Letz
|
09-04-02 Correct error code management in PaHost_Term, removes various compiler warning : Stephane Letz
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
12-06-02 Rehashed into new multi-api infrastructure, added support for all ASIO sample formats : Ross Bencina
|
12-06-02 Rehashed into new multi-api infrastructure, added support for all ASIO sample formats : Ross Bencina
|
||||||
18-06-02 Added pa_asio.h, PaAsio_GetAvailableLatencyValues() : Ross B.
|
18-06-02 Added pa_asio.h, PaAsio_GetAvailableLatencyValues() : Ross B.
|
||||||
21-06-02 Added SelectHostBufferSize() which selects host buffer size based on user latency parameters : Ross Bencina
|
21-06-02 Added SelectHostBufferSize() which selects host buffer size based on user latency parameters : Ross Bencina
|
||||||
** NOTE maintanance history is now stored in CVS **
|
** NOTE maintenance history is now stored in CVS **
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
#include "pa_win_coinitialize.h"
|
#include "pa_win_coinitialize.h"
|
||||||
|
|
||||||
/* This version of pa_asio.cpp is currently only targetted at Win32,
|
/* This version of pa_asio.cpp is currently only targeted at Win32,
|
||||||
It would require a few tweaks to work with pre-OS X Macintosh.
|
It would require a few tweaks to work with pre-OS X Macintosh.
|
||||||
To make configuration easier, we define WIN32 here to make sure
|
To make configuration easier, we define WIN32 here to make sure
|
||||||
that the ASIO SDK knows this is Win32.
|
that the ASIO SDK knows this is Win32.
|
||||||
|
@ -2549,7 +2549,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
enough to store at least two complete data blocks.
|
enough to store at least two complete data blocks.
|
||||||
|
|
||||||
1) Determine the amount of latency to be added to the
|
1) Determine the amount of latency to be added to the
|
||||||
prefered ASIO latency.
|
preferred ASIO latency.
|
||||||
2) Make sure we have at lest one additional latency frame.
|
2) Make sure we have at lest one additional latency frame.
|
||||||
3) Divide the number of frames by the desired block size to
|
3) Divide the number of frames by the desired block size to
|
||||||
get the number (rounded up to pure integer) of blocks to
|
get the number (rounded up to pure integer) of blocks to
|
||||||
|
@ -2568,7 +2568,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );
|
while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );
|
||||||
lBlockingBufferSize = lBlockingBufferSizePow2;
|
lBlockingBufferSize = lBlockingBufferSizePow2;
|
||||||
|
|
||||||
/* Compute total intput latency in seconds */
|
/* Compute total input latency in seconds */
|
||||||
stream->streamRepresentation.streamInfo.inputLatency =
|
stream->streamRepresentation.streamInfo.inputLatency =
|
||||||
(double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor )
|
(double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor )
|
||||||
+ PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor)
|
+ PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor)
|
||||||
|
@ -2635,7 +2635,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
enough to store at least two complete data blocks.
|
enough to store at least two complete data blocks.
|
||||||
|
|
||||||
1) Determine the amount of latency to be added to the
|
1) Determine the amount of latency to be added to the
|
||||||
prefered ASIO latency.
|
preferred ASIO latency.
|
||||||
2) Make sure we have at lest one additional latency frame.
|
2) Make sure we have at lest one additional latency frame.
|
||||||
3) Divide the number of frames by the desired block size to
|
3) Divide the number of frames by the desired block size to
|
||||||
get the number (rounded up to pure integer) of blocks to
|
get the number (rounded up to pure integer) of blocks to
|
||||||
|
@ -2872,7 +2872,7 @@ static void bufferSwitch(long index, ASIOBool directProcess)
|
||||||
//TAKEN FROM THE ASIO SDK
|
//TAKEN FROM THE ASIO SDK
|
||||||
|
|
||||||
// the actual processing callback.
|
// the actual processing callback.
|
||||||
// Beware that this is normally in a seperate thread, hence be sure that
|
// Beware that this is normally in a separate thread, hence be sure that
|
||||||
// you take care about thread synchronization. This is omitted here for
|
// you take care about thread synchronization. This is omitted here for
|
||||||
// simplicity.
|
// simplicity.
|
||||||
|
|
||||||
|
@ -2904,7 +2904,7 @@ static void bufferSwitch(long index, ASIOBool directProcess)
|
||||||
static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )
|
static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )
|
||||||
{
|
{
|
||||||
// the actual processing callback.
|
// the actual processing callback.
|
||||||
// Beware that this is normally in a seperate thread, hence be sure that
|
// Beware that this is normally in a separate thread, hence be sure that
|
||||||
// you take care about thread synchronization.
|
// you take care about thread synchronization.
|
||||||
|
|
||||||
|
|
||||||
|
@ -3269,7 +3269,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kAsioSupportsTimeInfo:
|
case kAsioSupportsTimeInfo:
|
||||||
// informs the driver wether the asioCallbacks.bufferSwitchTimeInfo() callback
|
// informs the driver whether the asioCallbacks.bufferSwitchTimeInfo() callback
|
||||||
// is supported.
|
// is supported.
|
||||||
// For compatibility with ASIO 1.0 drivers the host application should always support
|
// For compatibility with ASIO 1.0 drivers the host application should always support
|
||||||
// the "old" bufferSwitch method, too.
|
// the "old" bufferSwitch method, too.
|
||||||
|
@ -3277,7 +3277,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kAsioSupportsTimeCode:
|
case kAsioSupportsTimeCode:
|
||||||
// informs the driver wether application is interested in time code info.
|
// informs the driver whether application is interested in time code info.
|
||||||
// If an application does not need to know about time code, the driver has less work
|
// If an application does not need to know about time code, the driver has less work
|
||||||
// to do.
|
// to do.
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -3423,7 +3423,7 @@ static PaError StopStream( PaStream *s )
|
||||||
blockingState->stopFlag = TRUE;
|
blockingState->stopFlag = TRUE;
|
||||||
|
|
||||||
/* Wait until requested number of buffers has been freed. Time
|
/* Wait until requested number of buffers has been freed. Time
|
||||||
out after twice the blocking i/o ouput buffer could have
|
out after twice the blocking i/o output buffer could have
|
||||||
been consumed. */
|
been consumed. */
|
||||||
DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000
|
DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000
|
||||||
/ stream->streamRepresentation.streamInfo.sampleRate );
|
/ stream->streamRepresentation.streamInfo.sampleRate );
|
||||||
|
@ -3762,7 +3762,7 @@ static PaError WriteStream( PaStream *s ,
|
||||||
unsigned int i; /* Just a counter. */
|
unsigned int i; /* Just a counter. */
|
||||||
|
|
||||||
|
|
||||||
/* Check if the stream ist still available ready to recieve new data. */
|
/* Check if the stream is still available ready to receive new data. */
|
||||||
if( blockingState->stopFlag || !stream->isActive )
|
if( blockingState->stopFlag || !stream->isActive )
|
||||||
{
|
{
|
||||||
PA_DEBUG(("Warning! Stream no longer available for writing in WriteStream()\n"));
|
PA_DEBUG(("Warning! Stream no longer available for writing in WriteStream()\n"));
|
||||||
|
|
|
@ -81,7 +81,7 @@ latency will be provided even if a large latency setting is selected.
|
||||||
- Latency: Latency settings are generally ignored. They may be used as a
|
- Latency: Latency settings are generally ignored. They may be used as a
|
||||||
hint for buffer size in paHostFramesPerBufferUnspecified, or the value may
|
hint for buffer size in paHostFramesPerBufferUnspecified, or the value may
|
||||||
be used in cases where additional buffering is needed, such as doing input and
|
be used in cases where additional buffering is needed, such as doing input and
|
||||||
output on seperate devices. Latency settings are always automatically bound
|
output on separate devices. Latency settings are always automatically bound
|
||||||
to "safe" values, however, so setting extreme values here should not be
|
to "safe" values, however, so setting extreme values here should not be
|
||||||
an issue.
|
an issue.
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ static bool ensureChannelNameSize( int size )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Function declared in pa_mac_core.h. retrives channel names.
|
* Function declared in pa_mac_core.h. retrieves channel names.
|
||||||
*/
|
*/
|
||||||
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input )
|
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input )
|
||||||
{
|
{
|
||||||
|
@ -1173,8 +1173,13 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
const double sampleRate,
|
const double sampleRate,
|
||||||
void *refCon )
|
void *refCon )
|
||||||
{
|
{
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
AudioComponentDescription desc;
|
||||||
|
AudioComponent comp;
|
||||||
|
#else
|
||||||
ComponentDescription desc;
|
ComponentDescription desc;
|
||||||
Component comp;
|
Component comp;
|
||||||
|
#endif
|
||||||
/*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/
|
/*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/
|
||||||
AudioStreamBasicDescription desiredFormat;
|
AudioStreamBasicDescription desiredFormat;
|
||||||
OSStatus result = noErr;
|
OSStatus result = noErr;
|
||||||
|
@ -1245,7 +1250,11 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
desc.componentFlags = 0;
|
desc.componentFlags = 0;
|
||||||
desc.componentFlagsMask = 0;
|
desc.componentFlagsMask = 0;
|
||||||
/* -- find the component -- */
|
/* -- find the component -- */
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
comp = AudioComponentFindNext( NULL, &desc );
|
||||||
|
#else
|
||||||
comp = FindNextComponent( NULL, &desc );
|
comp = FindNextComponent( NULL, &desc );
|
||||||
|
#endif
|
||||||
if( !comp )
|
if( !comp )
|
||||||
{
|
{
|
||||||
DBUG( ( "AUHAL component not found." ) );
|
DBUG( ( "AUHAL component not found." ) );
|
||||||
|
@ -1254,7 +1263,11 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
return paUnanticipatedHostError;
|
return paUnanticipatedHostError;
|
||||||
}
|
}
|
||||||
/* -- open it -- */
|
/* -- open it -- */
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
result = AudioComponentInstanceNew( comp, audioUnit );
|
||||||
|
#else
|
||||||
result = OpenAComponent( comp, audioUnit );
|
result = OpenAComponent( comp, audioUnit );
|
||||||
|
#endif
|
||||||
if( result )
|
if( result )
|
||||||
{
|
{
|
||||||
DBUG( ( "Failed to open AUHAL component." ) );
|
DBUG( ( "Failed to open AUHAL component." ) );
|
||||||
|
@ -1345,7 +1358,7 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
/* set device format first, but only touch the device if the user asked */
|
/* set device format first, but only touch the device if the user asked */
|
||||||
if( inStreamParams ) {
|
if( inStreamParams ) {
|
||||||
/*The callback never calls back if we don't set the FPB */
|
/*The callback never calls back if we don't set the FPB */
|
||||||
/*This seems wierd, because I would think setting anything on the device
|
/*This seems weird, because I would think setting anything on the device
|
||||||
would be disruptive.*/
|
would be disruptive.*/
|
||||||
paResult = setBestFramesPerBuffer( *audioDevice, FALSE,
|
paResult = setBestFramesPerBuffer( *audioDevice, FALSE,
|
||||||
requestedFramesPerBuffer,
|
requestedFramesPerBuffer,
|
||||||
|
@ -1363,7 +1376,7 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
}
|
}
|
||||||
if( outStreamParams && !inStreamParams ) {
|
if( outStreamParams && !inStreamParams ) {
|
||||||
/*The callback never calls back if we don't set the FPB */
|
/*The callback never calls back if we don't set the FPB */
|
||||||
/*This seems wierd, because I would think setting anything on the device
|
/*This seems weird, because I would think setting anything on the device
|
||||||
would be disruptive.*/
|
would be disruptive.*/
|
||||||
paResult = setBestFramesPerBuffer( *audioDevice, TRUE,
|
paResult = setBestFramesPerBuffer( *audioDevice, TRUE,
|
||||||
requestedFramesPerBuffer,
|
requestedFramesPerBuffer,
|
||||||
|
@ -1607,7 +1620,12 @@ static PaError OpenAndSetupOneAudioUnit(
|
||||||
#undef ERR_WRAP
|
#undef ERR_WRAP
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
AudioComponentInstanceDispose( *audioUnit );
|
||||||
|
#else
|
||||||
CloseComponent( *audioUnit );
|
CloseComponent( *audioUnit );
|
||||||
|
#endif
|
||||||
*audioUnit = NULL;
|
*audioUnit = NULL;
|
||||||
if( result )
|
if( result )
|
||||||
return PaMacCore_SetError( result, line, 1 );
|
return PaMacCore_SetError( result, line, 1 );
|
||||||
|
@ -1740,7 +1758,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inputChannelCount = 0;
|
inputChannelCount = 0;
|
||||||
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Surpress 'uninitialised var' warnings. */
|
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Suppress 'uninitialised var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if( outputParameters )
|
if( outputParameters )
|
||||||
|
@ -1770,7 +1788,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
outputChannelCount = 0;
|
outputChannelCount = 0;
|
||||||
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Surpress 'uninitialized var' warnings. */
|
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Suppress 'uninitialized var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* validate platform specific flags */
|
/* validate platform specific flags */
|
||||||
|
@ -1921,14 +1939,13 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If input and output devs are different or we are doing SR conversion,
|
* If input and output devs are different or we are doing SR conversion,
|
||||||
* we also need a
|
* we also need a ring buffer to store input data while waiting for
|
||||||
* ring buffer to store inpt data while waiting for output
|
* output data.
|
||||||
* data.
|
|
||||||
*/
|
*/
|
||||||
if( (stream->outputUnit && (stream->inputUnit != stream->outputUnit))
|
if( (stream->outputUnit && (stream->inputUnit != stream->outputUnit))
|
||||||
|| stream->inputSRConverter )
|
|| stream->inputSRConverter )
|
||||||
{
|
{
|
||||||
/* May want the ringSize ot initial position in
|
/* May want the ringSize or initial position in
|
||||||
ring buffer to depend somewhat on sample rate change */
|
ring buffer to depend somewhat on sample rate change */
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -1951,7 +1968,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now we can initialize the ring buffer */
|
/* now we can initialize the ring buffer */
|
||||||
PaUtil_InitializeRingBuffer( &stream->inputRingBuffer, szfl*inputParameters->channelCount, ringSize, data ) ;
|
result = PaUtil_InitializeRingBuffer( &stream->inputRingBuffer, szfl*inputParameters->channelCount, ringSize, data );
|
||||||
|
if( result != 0 )
|
||||||
|
{
|
||||||
|
/* The only reason this should fail is if ringSize is not a power of 2, which we do not anticipate happening. */
|
||||||
|
result = paUnanticipatedHostError;
|
||||||
|
free(data);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* advance the read point a little, so we are reading from the
|
/* advance the read point a little, so we are reading from the
|
||||||
middle of the buffer */
|
middle of the buffer */
|
||||||
if( stream->outputUnit )
|
if( stream->outputUnit )
|
||||||
|
@ -1973,12 +1998,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
stream->outputFramesPerBuffer,
|
stream->outputFramesPerBuffer,
|
||||||
sampleRate );
|
sampleRate );
|
||||||
result = initializeBlioRingBuffers( &stream->blio,
|
result = initializeBlioRingBuffers( &stream->blio,
|
||||||
inputParameters?inputParameters->sampleFormat:0 ,
|
inputParameters ? inputParameters->sampleFormat : 0,
|
||||||
outputParameters?outputParameters->sampleFormat:0 ,
|
outputParameters ? outputParameters->sampleFormat : 0,
|
||||||
MAX(stream->inputFramesPerBuffer,stream->outputFramesPerBuffer),
|
|
||||||
ringSize,
|
ringSize,
|
||||||
inputParameters?inputChannelCount:0 ,
|
inputParameters ? inputChannelCount : 0,
|
||||||
outputParameters?outputChannelCount:0 ) ;
|
outputParameters ? outputChannelCount : 0 ) ;
|
||||||
if( result != paNoError )
|
if( result != paNoError )
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -2158,8 +2182,8 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
|
|
||||||
/* -----------------------------------------------------------------*\
|
/* -----------------------------------------------------------------*\
|
||||||
This output may be useful for debugging,
|
This output may be useful for debugging,
|
||||||
But printing durring the callback is a bad enough idea that
|
But printing during the callback is a bad enough idea that
|
||||||
this is not enabled by enableing the usual debugging calls.
|
this is not enabled by enabling the usual debugging calls.
|
||||||
\* -----------------------------------------------------------------*/
|
\* -----------------------------------------------------------------*/
|
||||||
/*
|
/*
|
||||||
static int renderCount = 0;
|
static int renderCount = 0;
|
||||||
|
@ -2277,9 +2301,10 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
INPUT_ELEMENT,
|
INPUT_ELEMENT,
|
||||||
inNumberFrames,
|
inNumberFrames,
|
||||||
&stream->inputAudioBufferList );
|
&stream->inputAudioBufferList );
|
||||||
/* FEEDBACK: I'm not sure what to do when this call fails. There's nothing in the PA API to
|
if(err != noErr)
|
||||||
* do about failures in the callback system. */
|
{
|
||||||
assert( !err );
|
goto stop_stream;
|
||||||
|
}
|
||||||
|
|
||||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
||||||
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
||||||
|
@ -2359,7 +2384,7 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
&size,
|
&size,
|
||||||
(void *)&data );
|
(void *)&data );
|
||||||
if( err == RING_BUFFER_EMPTY )
|
if( err == RING_BUFFER_EMPTY )
|
||||||
{ /*the ring buffer callback underflowed */
|
{ /* the ring buffer callback underflowed */
|
||||||
err = 0;
|
err = 0;
|
||||||
bzero( ((char *)data) + size, sizeof(data)-size );
|
bzero( ((char *)data) + size, sizeof(data)-size );
|
||||||
/* The ring buffer can underflow normally when the stream is stopping.
|
/* The ring buffer can underflow normally when the stream is stopping.
|
||||||
|
@ -2370,8 +2395,11 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ERR( err );
|
ERR( err );
|
||||||
assert( !err );
|
if(err != noErr)
|
||||||
|
{
|
||||||
|
goto stop_stream;
|
||||||
|
}
|
||||||
|
|
||||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
||||||
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
||||||
0,
|
0,
|
||||||
|
@ -2477,9 +2505,12 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
if( err == -10874 )
|
if( err == -10874 )
|
||||||
inNumberFrames /= 2;
|
inNumberFrames /= 2;
|
||||||
} while( err == -10874 && inNumberFrames > 1 );
|
} while( err == -10874 && inNumberFrames > 1 );
|
||||||
/* FEEDBACK: I'm not sure what to do when this call fails */
|
|
||||||
ERR( err );
|
ERR( err );
|
||||||
assert( !err );
|
if(err != noErr)
|
||||||
|
{
|
||||||
|
goto stop_stream;
|
||||||
|
}
|
||||||
|
|
||||||
if( stream->inputSRConverter || stream->outputUnit )
|
if( stream->inputSRConverter || stream->outputUnit )
|
||||||
{
|
{
|
||||||
/* If this is duplex or we use a converter, put the data
|
/* If this is duplex or we use a converter, put the data
|
||||||
|
@ -2522,11 +2553,11 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
* chunks, and let the BufferProcessor deal with the rest.
|
* chunks, and let the BufferProcessor deal with the rest.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*This might be too big or small depending on SR conversion*/
|
/* This might be too big or small depending on SR conversion. */
|
||||||
float data[ chan * inNumberFrames ];
|
float data[ chan * inNumberFrames ];
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
do
|
do
|
||||||
{ /*Run the buffer processor until we are out of data*/
|
{ /* Run the buffer processor until we are out of data. */
|
||||||
UInt32 size;
|
UInt32 size;
|
||||||
long f;
|
long f;
|
||||||
|
|
||||||
|
@ -2539,7 +2570,11 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
(void *)data );
|
(void *)data );
|
||||||
if( err != RING_BUFFER_EMPTY )
|
if( err != RING_BUFFER_EMPTY )
|
||||||
ERR( err );
|
ERR( err );
|
||||||
assert( err == 0 || err == RING_BUFFER_EMPTY );
|
if( err != noErr && err != RING_BUFFER_EMPTY )
|
||||||
|
{
|
||||||
|
goto stop_stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
f = size / ( chan * sizeof(float) );
|
f = size / ( chan * sizeof(float) );
|
||||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), f );
|
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), f );
|
||||||
|
@ -2562,24 +2597,24 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( callbackResult )
|
// Should we return successfully or fall through to stopping the stream?
|
||||||
{
|
if( callbackResult == paContinue )
|
||||||
case paContinue: break;
|
{
|
||||||
case paComplete:
|
PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
|
||||||
case paAbort:
|
return noErr;
|
||||||
stream->state = CALLBACK_STOPPED ;
|
}
|
||||||
if( stream->outputUnit )
|
|
||||||
AudioOutputUnitStop(stream->outputUnit);
|
|
||||||
if( stream->inputUnit )
|
|
||||||
AudioOutputUnitStop(stream->inputUnit);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
|
stop_stream:
|
||||||
return noErr;
|
stream->state = CALLBACK_STOPPED ;
|
||||||
|
if( stream->outputUnit )
|
||||||
|
AudioOutputUnitStop(stream->outputUnit);
|
||||||
|
if( stream->inputUnit )
|
||||||
|
AudioOutputUnitStop(stream->inputUnit);
|
||||||
|
|
||||||
|
PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
|
||||||
|
return noErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
When CloseStream() is called, the multi-api layer ensures that
|
When CloseStream() is called, the multi-api layer ensures that
|
||||||
the stream has already been stopped or aborted.
|
the stream has already been stopped or aborted.
|
||||||
|
@ -2587,7 +2622,7 @@ static OSStatus AudioIOProc( void *inRefCon,
|
||||||
static PaError CloseStream( PaStream* s )
|
static PaError CloseStream( PaStream* s )
|
||||||
{
|
{
|
||||||
/* This may be called from a failed OpenStream.
|
/* This may be called from a failed OpenStream.
|
||||||
Therefore, each piece of info is treated seperately. */
|
Therefore, each piece of info is treated separately. */
|
||||||
PaError result = paNoError;
|
PaError result = paNoError;
|
||||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||||
|
|
||||||
|
@ -2628,13 +2663,21 @@ static PaError CloseStream( PaStream* s )
|
||||||
}
|
}
|
||||||
if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {
|
if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {
|
||||||
AudioUnitUninitialize( stream->outputUnit );
|
AudioUnitUninitialize( stream->outputUnit );
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
AudioComponentInstanceDispose( stream->outputUnit );
|
||||||
|
#else
|
||||||
CloseComponent( stream->outputUnit );
|
CloseComponent( stream->outputUnit );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
stream->outputUnit = NULL;
|
stream->outputUnit = NULL;
|
||||||
if( stream->inputUnit )
|
if( stream->inputUnit )
|
||||||
{
|
{
|
||||||
AudioUnitUninitialize( stream->inputUnit );
|
AudioUnitUninitialize( stream->inputUnit );
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||||
|
AudioComponentInstanceDispose( stream->inputUnit );
|
||||||
|
#else
|
||||||
CloseComponent( stream->inputUnit );
|
CloseComponent( stream->inputUnit );
|
||||||
|
#endif
|
||||||
stream->inputUnit = NULL;
|
stream->inputUnit = NULL;
|
||||||
}
|
}
|
||||||
if( stream->inputRingBuffer.buffer )
|
if( stream->inputRingBuffer.buffer )
|
||||||
|
@ -2707,18 +2750,10 @@ static ComponentResult BlockWhileAudioUnitIsRunning( AudioUnit audioUnit, AudioU
|
||||||
return noErr;
|
return noErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PaError StopStream( PaStream *s )
|
static PaError FinishStoppingStream( PaMacCoreStream *stream )
|
||||||
{
|
{
|
||||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
|
||||||
OSStatus result = noErr;
|
OSStatus result = noErr;
|
||||||
PaError paErr;
|
PaError paErr;
|
||||||
VVDBUG(("StopStream()\n"));
|
|
||||||
|
|
||||||
VDBUG( ("Waiting for BLIO.\n") );
|
|
||||||
waitUntilBlioWriteBufferIsFlushed( &stream->blio );
|
|
||||||
VDBUG( ( "Stopping stream.\n" ) );
|
|
||||||
|
|
||||||
stream->state = STOPPING;
|
|
||||||
|
|
||||||
#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)
|
#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)
|
||||||
/* -- stop and reset -- */
|
/* -- stop and reset -- */
|
||||||
|
@ -2770,12 +2805,34 @@ static PaError StopStream( PaStream *s )
|
||||||
#undef ERR_WRAP
|
#undef ERR_WRAP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Block until buffer is empty then stop the stream. */
|
||||||
|
static PaError StopStream( PaStream *s )
|
||||||
|
{
|
||||||
|
PaError paErr;
|
||||||
|
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||||
|
VVDBUG(("StopStream()\n"));
|
||||||
|
|
||||||
|
/* Tell WriteStream to stop filling the buffer. */
|
||||||
|
stream->state = STOPPING;
|
||||||
|
|
||||||
|
if( stream->userOutChan > 0 ) /* Does this stream do output? */
|
||||||
|
{
|
||||||
|
size_t maxHostFrames = MAX( stream->inputFramesPerBuffer, stream->outputFramesPerBuffer );
|
||||||
|
VDBUG( ("Waiting for write buffer to be drained.\n") );
|
||||||
|
paErr = waitUntilBlioWriteBufferIsEmpty( &stream->blio, stream->sampleRate,
|
||||||
|
maxHostFrames );
|
||||||
|
VDBUG( ( "waitUntilBlioWriteBufferIsEmpty returned %d\n", paErr ) );
|
||||||
|
}
|
||||||
|
return FinishStoppingStream( stream );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Immediately stop the stream. */
|
||||||
static PaError AbortStream( PaStream *s )
|
static PaError AbortStream( PaStream *s )
|
||||||
{
|
{
|
||||||
VVDBUG(("AbortStream()->StopStream()\n"));
|
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||||
VDBUG( ( "Aborting stream.\n" ) );
|
VDBUG( ( "AbortStream()\n" ) );
|
||||||
/* We have nothing faster than StopStream. */
|
stream->state = STOPPING;
|
||||||
return StopStream(s);
|
return FinishStoppingStream( stream );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -108,14 +108,16 @@ static size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This should be called with the relevant info when initializing a stream for
|
/**
|
||||||
callback. */
|
* This should be called with the relevant info when initializing a stream for callback.
|
||||||
|
*
|
||||||
|
* @param ringBufferSizeInFrames must be a power of 2
|
||||||
|
*/
|
||||||
PaError initializeBlioRingBuffers(
|
PaError initializeBlioRingBuffers(
|
||||||
PaMacBlio *blio,
|
PaMacBlio *blio,
|
||||||
PaSampleFormat inputSampleFormat,
|
PaSampleFormat inputSampleFormat,
|
||||||
PaSampleFormat outputSampleFormat,
|
PaSampleFormat outputSampleFormat,
|
||||||
size_t framesPerBuffer,
|
long ringBufferSizeInFrames,
|
||||||
long ringBufferSize,
|
|
||||||
int inChan,
|
int inChan,
|
||||||
int outChan )
|
int outChan )
|
||||||
{
|
{
|
||||||
|
@ -126,20 +128,19 @@ PaError initializeBlioRingBuffers(
|
||||||
/* zeroify things */
|
/* zeroify things */
|
||||||
bzero( blio, sizeof( PaMacBlio ) );
|
bzero( blio, sizeof( PaMacBlio ) );
|
||||||
/* this is redundant, but the buffers are used to check
|
/* this is redundant, but the buffers are used to check
|
||||||
if the bufffers have been initialized, so we do it explicitly. */
|
if the buffers have been initialized, so we do it explicitly. */
|
||||||
blio->inputRingBuffer.buffer = NULL;
|
blio->inputRingBuffer.buffer = NULL;
|
||||||
blio->outputRingBuffer.buffer = NULL;
|
blio->outputRingBuffer.buffer = NULL;
|
||||||
|
|
||||||
/* initialize simple data */
|
/* initialize simple data */
|
||||||
blio->ringBufferFrames = ringBufferSize;
|
blio->ringBufferFrames = ringBufferSizeInFrames;
|
||||||
blio->inputSampleFormat = inputSampleFormat;
|
blio->inputSampleFormat = inputSampleFormat;
|
||||||
blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);
|
blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);
|
||||||
blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat);
|
blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat); // FIXME: WHY?
|
||||||
blio->outputSampleFormat = outputSampleFormat;
|
blio->outputSampleFormat = outputSampleFormat;
|
||||||
blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);
|
blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);
|
||||||
blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);
|
blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);
|
||||||
|
|
||||||
blio->framesPerBuffer = framesPerBuffer;
|
|
||||||
blio->inChan = inChan;
|
blio->inChan = inChan;
|
||||||
blio->outChan = outChan;
|
blio->outChan = outChan;
|
||||||
blio->statusFlags = 0;
|
blio->statusFlags = 0;
|
||||||
|
@ -163,7 +164,7 @@ PaError initializeBlioRingBuffers(
|
||||||
result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );
|
result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );
|
||||||
#endif
|
#endif
|
||||||
if( inChan ) {
|
if( inChan ) {
|
||||||
data = calloc( ringBufferSize, blio->inputSampleSizePow2*inChan );
|
data = calloc( ringBufferSizeInFrames, blio->inputSampleSizePow2 * inChan );
|
||||||
if( !data )
|
if( !data )
|
||||||
{
|
{
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
|
@ -172,12 +173,13 @@ PaError initializeBlioRingBuffers(
|
||||||
|
|
||||||
err = PaUtil_InitializeRingBuffer(
|
err = PaUtil_InitializeRingBuffer(
|
||||||
&blio->inputRingBuffer,
|
&blio->inputRingBuffer,
|
||||||
1, ringBufferSize*blio->inputSampleSizePow2*inChan,
|
blio->inputSampleSizePow2 * inChan,
|
||||||
|
ringBufferSizeInFrames,
|
||||||
data );
|
data );
|
||||||
assert( !err );
|
assert( !err );
|
||||||
}
|
}
|
||||||
if( outChan ) {
|
if( outChan ) {
|
||||||
data = calloc( ringBufferSize, blio->outputSampleSizePow2*outChan );
|
data = calloc( ringBufferSizeInFrames, blio->outputSampleSizePow2 * outChan );
|
||||||
if( !data )
|
if( !data )
|
||||||
{
|
{
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
|
@ -186,7 +188,8 @@ PaError initializeBlioRingBuffers(
|
||||||
|
|
||||||
err = PaUtil_InitializeRingBuffer(
|
err = PaUtil_InitializeRingBuffer(
|
||||||
&blio->outputRingBuffer,
|
&blio->outputRingBuffer,
|
||||||
1, ringBufferSize*blio->outputSampleSizePow2*outChan,
|
blio->outputSampleSizePow2 * outChan,
|
||||||
|
ringBufferSizeInFrames,
|
||||||
data );
|
data );
|
||||||
assert( !err );
|
assert( !err );
|
||||||
}
|
}
|
||||||
|
@ -210,7 +213,7 @@ PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* we need to update the value. Here's what we do:
|
/* we need to update the value. Here's what we do:
|
||||||
* - Lock the mutex, so noone else can write.
|
* - Lock the mutex, so no one else can write.
|
||||||
* - update the value.
|
* - update the value.
|
||||||
* - unlock.
|
* - unlock.
|
||||||
* - broadcast to all listeners.
|
* - broadcast to all listeners.
|
||||||
|
@ -236,7 +239,7 @@ PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* we need to update the value. Here's what we do:
|
/* we need to update the value. Here's what we do:
|
||||||
* - Lock the mutex, so noone else can write.
|
* - Lock the mutex, so no one else can write.
|
||||||
* - update the value.
|
* - update the value.
|
||||||
* - unlock.
|
* - unlock.
|
||||||
* - broadcast to all listeners.
|
* - broadcast to all listeners.
|
||||||
|
@ -266,12 +269,11 @@ PaError resetBlioRingBuffers( PaMacBlio *blio )
|
||||||
#endif
|
#endif
|
||||||
blio->statusFlags = 0;
|
blio->statusFlags = 0;
|
||||||
if( blio->outputRingBuffer.buffer ) {
|
if( blio->outputRingBuffer.buffer ) {
|
||||||
PaUtil_FlushRingBuffer( &blio->outputRingBuffer );
|
PaUtil_FlushRingBuffer( &blio->outputRingBuffer );
|
||||||
bzero( blio->outputRingBuffer.buffer,
|
/* Fill the buffer with zeros. */
|
||||||
blio->outputRingBuffer.bufferSize );
|
bzero( blio->outputRingBuffer.buffer,
|
||||||
/* Advance buffer */
|
blio->outputRingBuffer.bufferSize * blio->outputRingBuffer.elementSizeBytes );
|
||||||
PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames*blio->outputSampleSizeActual*blio->outChan );
|
PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames );
|
||||||
//PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->outputRingBuffer.bufferSize );
|
|
||||||
|
|
||||||
/* Update isOutputFull. */
|
/* Update isOutputFull. */
|
||||||
#ifdef PA_MAC__BLIO_MUTEX
|
#ifdef PA_MAC__BLIO_MUTEX
|
||||||
|
@ -280,16 +282,14 @@ PaError resetBlioRingBuffers( PaMacBlio *blio )
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
printf( "------%d\n" , blio->framesPerBuffer );
|
|
||||||
printf( "------%d\n" , blio->outChan );
|
printf( "------%d\n" , blio->outChan );
|
||||||
printf( "------%d\n" , blio->outputSampleSize );
|
printf( "------%d\n" , blio->outputSampleSize );
|
||||||
printf( "------%d\n" , blio->framesPerBuffer*blio->outChan*blio->outputSampleSize );
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
if( blio->inputRingBuffer.buffer ) {
|
if( blio->inputRingBuffer.buffer ) {
|
||||||
PaUtil_FlushRingBuffer( &blio->inputRingBuffer );
|
PaUtil_FlushRingBuffer( &blio->inputRingBuffer );
|
||||||
bzero( blio->inputRingBuffer.buffer,
|
bzero( blio->inputRingBuffer.buffer,
|
||||||
blio->inputRingBuffer.bufferSize );
|
blio->inputRingBuffer.bufferSize * blio->inputRingBuffer.elementSizeBytes );
|
||||||
/* Update isInputEmpty. */
|
/* Update isInputEmpty. */
|
||||||
#ifdef PA_MAC__BLIO_MUTEX
|
#ifdef PA_MAC__BLIO_MUTEX
|
||||||
result = blioSetIsInputEmpty( blio, true );
|
result = blioSetIsInputEmpty( blio, true );
|
||||||
|
@ -334,7 +334,7 @@ PaError destroyBlioRingBuffers( PaMacBlio *blio )
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is the BlioCallback function. It expects to recieve a PaMacBlio Object
|
* this is the BlioCallback function. It expects to receive a PaMacBlio Object
|
||||||
* pointer as userData.
|
* pointer as userData.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -344,30 +344,32 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
||||||
void *userData )
|
void *userData )
|
||||||
{
|
{
|
||||||
PaMacBlio *blio = (PaMacBlio*)userData;
|
PaMacBlio *blio = (PaMacBlio*)userData;
|
||||||
long avail;
|
ring_buffer_size_t framesAvailable;
|
||||||
long toRead;
|
ring_buffer_size_t framesToTransfer;
|
||||||
long toWrite;
|
ring_buffer_size_t framesTransferred;
|
||||||
long read;
|
|
||||||
long written;
|
|
||||||
|
|
||||||
/* set flags returned by OS: */
|
/* set flags returned by OS: */
|
||||||
OSAtomicOr32( statusFlags, &blio->statusFlags ) ;
|
OSAtomicOr32( statusFlags, &blio->statusFlags ) ;
|
||||||
|
|
||||||
/* --- Handle Input Buffer --- */
|
/* --- Handle Input Buffer --- */
|
||||||
if( blio->inChan ) {
|
if( blio->inChan ) {
|
||||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );
|
framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );
|
||||||
|
|
||||||
/* check for underflow */
|
/* check for underflow */
|
||||||
if( avail < frameCount * blio->inputSampleSizeActual * blio->inChan )
|
if( framesAvailable < frameCount )
|
||||||
{
|
{
|
||||||
OSAtomicOr32( paInputOverflow, &blio->statusFlags );
|
OSAtomicOr32( paInputOverflow, &blio->statusFlags );
|
||||||
|
framesToTransfer = framesAvailable;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
framesToTransfer = (ring_buffer_size_t)frameCount;
|
||||||
}
|
}
|
||||||
toRead = MIN( avail, frameCount * blio->inputSampleSizeActual * blio->inChan );
|
|
||||||
|
|
||||||
/* copy the data */
|
/* Copy the data from the audio input to the application ring buffer. */
|
||||||
/*printf( "reading %d\n", toRead );*/
|
/*printf( "reading %d\n", toRead );*/
|
||||||
read = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead );
|
framesTransferred = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, framesToTransfer );
|
||||||
assert( toRead == read );
|
assert( framesToTransfer == framesTransferred );
|
||||||
#ifdef PA_MAC__BLIO_MUTEX
|
#ifdef PA_MAC__BLIO_MUTEX
|
||||||
/* Priority inversion. See notes below. */
|
/* Priority inversion. See notes below. */
|
||||||
blioSetIsInputEmpty( blio, false );
|
blioSetIsInputEmpty( blio, false );
|
||||||
|
@ -377,21 +379,31 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
||||||
|
|
||||||
/* --- Handle Output Buffer --- */
|
/* --- Handle Output Buffer --- */
|
||||||
if( blio->outChan ) {
|
if( blio->outChan ) {
|
||||||
avail = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
||||||
|
|
||||||
/* check for underflow */
|
/* check for underflow */
|
||||||
if( avail < frameCount * blio->outputSampleSizeActual * blio->outChan )
|
if( framesAvailable < frameCount )
|
||||||
OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );
|
{
|
||||||
|
/* zero out the end of the output buffer that we do not have data for */
|
||||||
|
framesToTransfer = framesAvailable;
|
||||||
|
|
||||||
toWrite = MIN( avail, frameCount * blio->outputSampleSizeActual * blio->outChan );
|
size_t bytesPerFrame = blio->outputSampleSizeActual * blio->outChan;
|
||||||
|
size_t offsetInBytes = framesToTransfer * bytesPerFrame;
|
||||||
|
size_t countInBytes = (frameCount - framesToTransfer) * bytesPerFrame;
|
||||||
|
bzero( ((char *)output) + offsetInBytes, countInBytes );
|
||||||
|
|
||||||
|
OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );
|
||||||
|
framesToTransfer = framesAvailable;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
framesToTransfer = (ring_buffer_size_t)frameCount;
|
||||||
|
}
|
||||||
|
|
||||||
if( toWrite != frameCount * blio->outputSampleSizeActual * blio->outChan )
|
|
||||||
bzero( ((char *)output)+toWrite,
|
|
||||||
frameCount * blio->outputSampleSizeActual * blio->outChan - toWrite );
|
|
||||||
/* copy the data */
|
/* copy the data */
|
||||||
/*printf( "writing %d\n", toWrite );*/
|
/*printf( "writing %d\n", toWrite );*/
|
||||||
written = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite );
|
framesTransferred = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, framesToTransfer );
|
||||||
assert( toWrite == written );
|
assert( framesToTransfer == framesTransferred );
|
||||||
#ifdef PA_MAC__BLIO_MUTEX
|
#ifdef PA_MAC__BLIO_MUTEX
|
||||||
/* We have a priority inversion here. However, we will only have to
|
/* We have a priority inversion here. However, we will only have to
|
||||||
wait if this was true and is now false, which means we've got
|
wait if this was true and is now false, which means we've got
|
||||||
|
@ -406,24 +418,25 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
||||||
|
|
||||||
PaError ReadStream( PaStream* stream,
|
PaError ReadStream( PaStream* stream,
|
||||||
void *buffer,
|
void *buffer,
|
||||||
unsigned long frames )
|
unsigned long framesRequested )
|
||||||
{
|
{
|
||||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||||
char *cbuf = (char *) buffer;
|
char *cbuf = (char *) buffer;
|
||||||
PaError ret = paNoError;
|
PaError ret = paNoError;
|
||||||
VVDBUG(("ReadStream()\n"));
|
VVDBUG(("ReadStream()\n"));
|
||||||
|
|
||||||
while( frames > 0 ) {
|
while( framesRequested > 0 ) {
|
||||||
long avail;
|
ring_buffer_size_t framesAvailable;
|
||||||
long toRead;
|
ring_buffer_size_t framesToTransfer;
|
||||||
|
ring_buffer_size_t framesTransferred;
|
||||||
do {
|
do {
|
||||||
avail = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
||||||
/*
|
/*
|
||||||
printf( "Read Buffer is %%%g full: %ld of %ld.\n",
|
printf( "Read Buffer is %%%g full: %ld of %ld.\n",
|
||||||
100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,
|
100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,
|
||||||
avail, blio->inputRingBuffer.bufferSize );
|
framesAvailable, blio->inputRingBuffer.bufferSize );
|
||||||
*/
|
*/
|
||||||
if( avail == 0 ) {
|
if( framesAvailable == 0 ) {
|
||||||
#ifdef PA_MAC_BLIO_MUTEX
|
#ifdef PA_MAC_BLIO_MUTEX
|
||||||
/**block when empty*/
|
/**block when empty*/
|
||||||
ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
|
ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
|
||||||
|
@ -441,14 +454,13 @@ PaError ReadStream( PaStream* stream,
|
||||||
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} while( avail == 0 );
|
} while( framesAvailable == 0 );
|
||||||
toRead = MIN( avail, frames * blio->inputSampleSizeActual * blio->inChan );
|
framesToTransfer = (ring_buffer_size_t) MIN( framesAvailable, framesRequested );
|
||||||
toRead -= toRead % blio->inputSampleSizeActual * blio->inChan ;
|
framesTransferred = PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, framesToTransfer );
|
||||||
PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, toRead );
|
cbuf += framesTransferred * blio->inputSampleSizeActual * blio->inChan;
|
||||||
cbuf += toRead;
|
framesRequested -= framesTransferred;
|
||||||
frames -= toRead / ( blio->inputSampleSizeActual * blio->inChan );
|
|
||||||
|
|
||||||
if( toRead == avail ) {
|
if( framesToTransfer == framesAvailable ) {
|
||||||
#ifdef PA_MAC_BLIO_MUTEX
|
#ifdef PA_MAC_BLIO_MUTEX
|
||||||
/* we just emptied the buffer, so we need to mark it as empty. */
|
/* we just emptied the buffer, so we need to mark it as empty. */
|
||||||
ret = blioSetIsInputEmpty( blio, true );
|
ret = blioSetIsInputEmpty( blio, true );
|
||||||
|
@ -457,8 +469,10 @@ PaError ReadStream( PaStream* stream,
|
||||||
/* of course, in the meantime, the callback may have put some sats
|
/* of course, in the meantime, the callback may have put some sats
|
||||||
in, so
|
in, so
|
||||||
so check for that, too, to avoid a race condition. */
|
so check for that, too, to avoid a race condition. */
|
||||||
|
/* FIXME - this does not seem to fix any race condition. */
|
||||||
if( PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer ) ) {
|
if( PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer ) ) {
|
||||||
blioSetIsInputEmpty( blio, false );
|
blioSetIsInputEmpty( blio, false );
|
||||||
|
/* FIXME - why check? ret has not been set? */
|
||||||
if( ret )
|
if( ret )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -468,6 +482,7 @@ PaError ReadStream( PaStream* stream,
|
||||||
|
|
||||||
/* Report either paNoError or paInputOverflowed. */
|
/* Report either paNoError or paInputOverflowed. */
|
||||||
/* may also want to report other errors, but this is non-standard. */
|
/* may also want to report other errors, but this is non-standard. */
|
||||||
|
/* FIXME should not clobber ret, use if(blio->statusFlags & paInputOverflow) */
|
||||||
ret = blio->statusFlags & paInputOverflow;
|
ret = blio->statusFlags & paInputOverflow;
|
||||||
|
|
||||||
/* report underflow only once: */
|
/* report underflow only once: */
|
||||||
|
@ -482,25 +497,27 @@ PaError ReadStream( PaStream* stream,
|
||||||
|
|
||||||
PaError WriteStream( PaStream* stream,
|
PaError WriteStream( PaStream* stream,
|
||||||
const void *buffer,
|
const void *buffer,
|
||||||
unsigned long frames )
|
unsigned long framesRequested )
|
||||||
{
|
{
|
||||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
PaMacCoreStream *macStream = (PaMacCoreStream*)stream;
|
||||||
|
PaMacBlio *blio = &macStream->blio;
|
||||||
char *cbuf = (char *) buffer;
|
char *cbuf = (char *) buffer;
|
||||||
PaError ret = paNoError;
|
PaError ret = paNoError;
|
||||||
VVDBUG(("WriteStream()\n"));
|
VVDBUG(("WriteStream()\n"));
|
||||||
|
|
||||||
while( frames > 0 ) {
|
while( framesRequested > 0 && macStream->state != STOPPING ) {
|
||||||
long avail = 0;
|
ring_buffer_size_t framesAvailable;
|
||||||
long toWrite;
|
ring_buffer_size_t framesToTransfer;
|
||||||
|
ring_buffer_size_t framesTransferred;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||||
/*
|
/*
|
||||||
printf( "Write Buffer is %%%g full: %ld of %ld.\n",
|
printf( "Write Buffer is %%%g full: %ld of %ld.\n",
|
||||||
100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,
|
100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,
|
||||||
avail, blio->outputRingBuffer.bufferSize );
|
framesAvailable, blio->outputRingBuffer.bufferSize );
|
||||||
*/
|
*/
|
||||||
if( avail == 0 ) {
|
if( framesAvailable == 0 ) {
|
||||||
#ifdef PA_MAC_BLIO_MUTEX
|
#ifdef PA_MAC_BLIO_MUTEX
|
||||||
/*block while full*/
|
/*block while full*/
|
||||||
ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
|
ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
|
||||||
|
@ -518,16 +535,20 @@ PaError WriteStream( PaStream* stream,
|
||||||
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} while( avail == 0 );
|
} while( framesAvailable == 0 && macStream->state != STOPPING );
|
||||||
|
|
||||||
toWrite = MIN( avail, frames * blio->outputSampleSizeActual * blio->outChan );
|
if( macStream->state == STOPPING )
|
||||||
toWrite -= toWrite % blio->outputSampleSizeActual * blio->outChan ;
|
{
|
||||||
PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, toWrite );
|
break;
|
||||||
cbuf += toWrite;
|
}
|
||||||
frames -= toWrite / ( blio->outputSampleSizeActual * blio->outChan );
|
|
||||||
|
framesToTransfer = MIN( framesAvailable, framesRequested );
|
||||||
|
framesTransferred = PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, framesToTransfer );
|
||||||
|
cbuf += framesTransferred * blio->outputSampleSizeActual * blio->outChan;
|
||||||
|
framesRequested -= framesTransferred;
|
||||||
|
|
||||||
#ifdef PA_MAC_BLIO_MUTEX
|
#ifdef PA_MAC_BLIO_MUTEX
|
||||||
if( toWrite == avail ) {
|
if( framesToTransfer == framesAvailable ) {
|
||||||
/* we just filled up the buffer, so we need to mark it as filled. */
|
/* we just filled up the buffer, so we need to mark it as filled. */
|
||||||
ret = blioSetIsOutputFull( blio, true );
|
ret = blioSetIsOutputFull( blio, true );
|
||||||
if( ret )
|
if( ret )
|
||||||
|
@ -536,6 +557,7 @@ PaError WriteStream( PaStream* stream,
|
||||||
so check for that, too, to avoid a race condition. */
|
so check for that, too, to avoid a race condition. */
|
||||||
if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {
|
if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {
|
||||||
blioSetIsOutputFull( blio, false );
|
blioSetIsOutputFull( blio, false );
|
||||||
|
/* FIXME remove or review this code, does not fix race, ret not set! */
|
||||||
if( ret )
|
if( ret )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -543,42 +565,65 @@ PaError WriteStream( PaStream* stream,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Report either paNoError or paOutputUnderflowed. */
|
if ( macStream->state == STOPPING )
|
||||||
/* may also want to report other errors, but this is non-standard. */
|
{
|
||||||
ret = blio->statusFlags & paOutputUnderflow;
|
ret = paInternalError;
|
||||||
|
}
|
||||||
|
else if (ret == paNoError )
|
||||||
|
{
|
||||||
|
/* Test for underflow. */
|
||||||
|
ret = blio->statusFlags & paOutputUnderflow;
|
||||||
|
|
||||||
/* report underflow only once: */
|
/* report underflow only once: */
|
||||||
if( ret ) {
|
if( ret )
|
||||||
OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );
|
{
|
||||||
ret = paOutputUnderflowed;
|
OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );
|
||||||
|
ret = paOutputUnderflowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* Wait until the data in the buffer has finished playing.
|
||||||
*/
|
*/
|
||||||
void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio )
|
PaError waitUntilBlioWriteBufferIsEmpty( PaMacBlio *blio, double sampleRate,
|
||||||
|
size_t framesPerBuffer )
|
||||||
{
|
{
|
||||||
|
PaError result = paNoError;
|
||||||
if( blio->outputRingBuffer.buffer ) {
|
if( blio->outputRingBuffer.buffer ) {
|
||||||
long avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
ring_buffer_size_t framesLeft = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
||||||
while( avail != blio->outputRingBuffer.bufferSize ) {
|
|
||||||
if( avail == 0 )
|
|
||||||
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
|
||||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* Calculate when we should give up waiting. To be safe wait for two extra periods. */
|
||||||
|
PaTime now = PaUtil_GetTime();
|
||||||
|
PaTime startTime = now;
|
||||||
|
PaTime timeoutTime = startTime + (framesLeft + (2 * framesPerBuffer)) / sampleRate;
|
||||||
|
|
||||||
|
long msecPerBuffer = 1 + (long)( 1000.0 * framesPerBuffer / sampleRate);
|
||||||
|
while( framesLeft > 0 && now < timeoutTime ) {
|
||||||
|
VDBUG(( "waitUntilBlioWriteBufferIsFlushed: framesLeft = %d, framesPerBuffer = %ld\n",
|
||||||
|
framesLeft, framesPerBuffer ));
|
||||||
|
Pa_Sleep( msecPerBuffer );
|
||||||
|
framesLeft = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
||||||
|
now = PaUtil_GetTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( framesLeft > 0 )
|
||||||
|
{
|
||||||
|
VDBUG(( "waitUntilBlioWriteBufferIsFlushed: TIMED OUT - framesLeft = %d\n", framesLeft ));
|
||||||
|
result = paTimedOut;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
signed long GetStreamReadAvailable( PaStream* stream )
|
signed long GetStreamReadAvailable( PaStream* stream )
|
||||||
{
|
{
|
||||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||||
VVDBUG(("GetStreamReadAvailable()\n"));
|
VVDBUG(("GetStreamReadAvailable()\n"));
|
||||||
|
|
||||||
return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer )
|
return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
||||||
/ ( blio->inputSampleSizeActual * blio->inChan );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -587,7 +632,6 @@ signed long GetStreamWriteAvailable( PaStream* stream )
|
||||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||||
VVDBUG(("GetStreamWriteAvailable()\n"));
|
VVDBUG(("GetStreamWriteAvailable()\n"));
|
||||||
|
|
||||||
return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer )
|
return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||||
/ ( blio->outputSampleSizeActual * blio->outChan );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
#include "pa_mac_core_utilities.h"
|
#include "pa_mac_core_utilities.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of miliseconds to busy wait whil waiting for data in blocking calls.
|
* Number of milliseconds to busy wait while waiting for data in blocking calls.
|
||||||
*/
|
*/
|
||||||
#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)
|
#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)
|
||||||
/*
|
/*
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PaUtilRingBuffer inputRingBuffer;
|
PaUtilRingBuffer inputRingBuffer;
|
||||||
PaUtilRingBuffer outputRingBuffer;
|
PaUtilRingBuffer outputRingBuffer;
|
||||||
size_t ringBufferFrames;
|
ring_buffer_size_t ringBufferFrames;
|
||||||
PaSampleFormat inputSampleFormat;
|
PaSampleFormat inputSampleFormat;
|
||||||
size_t inputSampleSizeActual;
|
size_t inputSampleSizeActual;
|
||||||
size_t inputSampleSizePow2;
|
size_t inputSampleSizePow2;
|
||||||
|
@ -87,8 +87,6 @@ typedef struct {
|
||||||
size_t outputSampleSizeActual;
|
size_t outputSampleSizeActual;
|
||||||
size_t outputSampleSizePow2;
|
size_t outputSampleSizePow2;
|
||||||
|
|
||||||
size_t framesPerBuffer;
|
|
||||||
|
|
||||||
int inChan;
|
int inChan;
|
||||||
int outChan;
|
int outChan;
|
||||||
|
|
||||||
|
@ -117,8 +115,7 @@ PaError initializeBlioRingBuffers(
|
||||||
PaMacBlio *blio,
|
PaMacBlio *blio,
|
||||||
PaSampleFormat inputSampleFormat,
|
PaSampleFormat inputSampleFormat,
|
||||||
PaSampleFormat outputSampleFormat,
|
PaSampleFormat outputSampleFormat,
|
||||||
size_t framesPerBuffer,
|
long ringBufferSizeInFrames,
|
||||||
long ringBufferSize,
|
|
||||||
int inChan,
|
int inChan,
|
||||||
int outChan );
|
int outChan );
|
||||||
PaError destroyBlioRingBuffers( PaMacBlio *blio );
|
PaError destroyBlioRingBuffers( PaMacBlio *blio );
|
||||||
|
@ -131,6 +128,7 @@ int BlioCallback(
|
||||||
PaStreamCallbackFlags statusFlags,
|
PaStreamCallbackFlags statusFlags,
|
||||||
void *userData );
|
void *userData );
|
||||||
|
|
||||||
void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio );
|
PaError waitUntilBlioWriteBufferIsEmpty( PaMacBlio *blio, double sampleRate,
|
||||||
|
size_t framesPerBuffer );
|
||||||
|
|
||||||
#endif /*PA_MAC_CORE_BLOCKING_H_*/
|
#endif /*PA_MAC_CORE_BLOCKING_H_*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_mac_core_old.c 1083 2006-08-23 07:30:49Z rossb $
|
* $Id$
|
||||||
* pa_mac_core.c
|
* pa_mac_core.c
|
||||||
* Implementation of PortAudio for Mac OS X CoreAudio
|
* Implementation of PortAudio for Mac OS X CoreAudio
|
||||||
*
|
*
|
||||||
|
|
|
@ -168,7 +168,7 @@ PaError PaMacCore_SetError(OSStatus error, int line, int isError)
|
||||||
errorText = "Audio Unit: Format Not Supported";
|
errorText = "Audio Unit: Format Not Supported";
|
||||||
result = paInternalError; break;
|
result = paInternalError; break;
|
||||||
case kAudioUnitErr_Uninitialized:
|
case kAudioUnitErr_Uninitialized:
|
||||||
errorText = "Audio Unit: Unitialized";
|
errorText = "Audio Unit: Uninitialized";
|
||||||
result = paInternalError; break;
|
result = paInternalError; break;
|
||||||
case kAudioUnitErr_InvalidScope:
|
case kAudioUnitErr_InvalidScope:
|
||||||
errorText = "Audio Unit: Invalid Scope";
|
errorText = "Audio Unit: Invalid Scope";
|
||||||
|
@ -296,12 +296,12 @@ long computeRingBufferSize( const PaStreamParameters *inputParameters,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Durring testing of core audio, I found that serious crashes could occur
|
* During testing of core audio, I found that serious crashes could occur
|
||||||
* if properties such as sample rate were changed multiple times in rapid
|
* if properties such as sample rate were changed multiple times in rapid
|
||||||
* succession. The function below could be used to with a condition variable.
|
* succession. The function below could be used to with a condition variable.
|
||||||
* to prevent propertychanges from happening until the last property
|
* to prevent propertychanges from happening until the last property
|
||||||
* change is acknowledged. Instead, I implemented a busy-wait, which is simpler
|
* change is acknowledged. Instead, I implemented a busy-wait, which is simpler
|
||||||
* to implement b/c in second round of testing (nov '09) property changes occured
|
* to implement b/c in second round of testing (nov '09) property changes occurred
|
||||||
* quickly and so there was no real way to test the condition variable implementation.
|
* quickly and so there was no real way to test the condition variable implementation.
|
||||||
* therefore, this function is not used, but it is aluded to in commented code below,
|
* therefore, this function is not used, but it is aluded to in commented code below,
|
||||||
* since it represents a theoretically better implementation.
|
* since it represents a theoretically better implementation.
|
||||||
|
@ -505,7 +505,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
||||||
if( err )
|
if( err )
|
||||||
return ERR( err );
|
return ERR( err );
|
||||||
|
|
||||||
/* -- otherwise, something wierd happened: we didn't set the rate, and we got no errors. Just bail. */
|
/* -- otherwise, something weird happened: we didn't set the rate, and we got no errors. Just bail. */
|
||||||
return paInternalError;
|
return paInternalError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
||||||
is available, it uses the smallest available size.
|
is available, it uses the smallest available size.
|
||||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||||
OK to pass NULL to actualFramesPerBuffer.
|
OK to pass NULL to actualFramesPerBuffer.
|
||||||
The logic is very simmilar too setBestSampleRate only failure here is
|
The logic is very similar too setBestSampleRate only failure here is
|
||||||
not usually catastrophic.
|
not usually catastrophic.
|
||||||
*/
|
*/
|
||||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||||
|
@ -641,13 +641,13 @@ OSStatus xrunCallback(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int initializeXRunListenerList()
|
int initializeXRunListenerList( void )
|
||||||
{
|
{
|
||||||
xRunListSize = 0;
|
xRunListSize = 0;
|
||||||
bzero( (void *) &firstXRunListNode, sizeof(firstXRunListNode) );
|
bzero( (void *) &firstXRunListNode, sizeof(firstXRunListNode) );
|
||||||
return pthread_mutex_init( &xrunMutex, NULL );
|
return pthread_mutex_init( &xrunMutex, NULL );
|
||||||
}
|
}
|
||||||
int destroyXRunListenerList()
|
int destroyXRunListenerList( void )
|
||||||
{
|
{
|
||||||
PaMacXRunListNode *node;
|
PaMacXRunListNode *node;
|
||||||
node = firstXRunListNode.next;
|
node = firstXRunListNode.next;
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
#define INPUT_ELEMENT (1)
|
#define INPUT_ELEMENT (1)
|
||||||
#define OUTPUT_ELEMENT (0)
|
#define OUTPUT_ELEMENT (0)
|
||||||
|
|
||||||
/* Normal level of debugging: fine for most apps that don't mind the occational warning being printf'ed */
|
/* Normal level of debugging: fine for most apps that don't mind the occasional warning being printf'ed */
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
#define MAC_CORE_DEBUG
|
#define MAC_CORE_DEBUG
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
# define DBUG(MSG)
|
# define DBUG(MSG)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Verbose Debugging: useful for developement */
|
/* Verbose Debugging: useful for development */
|
||||||
/*
|
/*
|
||||||
#define MAC_CORE_VERBOSE_DEBUG
|
#define MAC_CORE_VERBOSE_DEBUG
|
||||||
*/
|
*/
|
||||||
|
@ -183,7 +183,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
||||||
is available, it uses the smallest available size.
|
is available, it uses the smallest available size.
|
||||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||||
OK to pass NULL to actualFramesPerBuffer.
|
OK to pass NULL to actualFramesPerBuffer.
|
||||||
The logic is very simmilar too setBestSampleRate only failure here is
|
The logic is very similar too setBestSampleRate only failure here is
|
||||||
not usually catastrophic.
|
not usually catastrophic.
|
||||||
*/
|
*/
|
||||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||||
|
@ -206,9 +206,9 @@ OSStatus xrunCallback(
|
||||||
void* inClientData ) ;
|
void* inClientData ) ;
|
||||||
|
|
||||||
/** returns zero on success or a unix style error code. */
|
/** returns zero on success or a unix style error code. */
|
||||||
int initializeXRunListenerList();
|
int initializeXRunListenerList( void );
|
||||||
/** returns zero on success or a unix style error code. */
|
/** returns zero on success or a unix style error code. */
|
||||||
int destroyXRunListenerList();
|
int destroyXRunListenerList( void );
|
||||||
|
|
||||||
/**Returns the list, so that it can be passed to CorAudio.*/
|
/**Returns the list, so that it can be passed to CorAudio.*/
|
||||||
void *addToXRunListenerList( void *stream );
|
void *addToXRunListenerList( void *stream );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_ds.c 1945 2015-01-21 06:24:32Z rbencina $
|
* $Id$
|
||||||
* Portable Audio I/O Library DirectSound implementation
|
* Portable Audio I/O Library DirectSound implementation
|
||||||
*
|
*
|
||||||
* Authors: Phil Burk, Robert Marsanyi & Ross Bencina
|
* Authors: Phil Burk, Robert Marsanyi & Ross Bencina
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Use the earliest version of DX required, no need to polute the namespace
|
Use the earliest version of DX required, no need to pollute the namespace
|
||||||
*/
|
*/
|
||||||
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
||||||
#define DIRECTSOUND_VERSION 0x0800
|
#define DIRECTSOUND_VERSION 0x0800
|
||||||
|
@ -408,16 +408,6 @@ static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, cons
|
||||||
|
|
||||||
if( src != NULL )
|
if( src != NULL )
|
||||||
{
|
{
|
||||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
|
||||||
size_t len = WideCharToMultiByte(CP_ACP, 0, src, -1, NULL, 0, NULL, NULL);
|
|
||||||
|
|
||||||
result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
|
|
||||||
if( result ) {
|
|
||||||
if (WideCharToMultiByte(CP_ACP, 0, src, -1, result, (int)len, NULL, NULL) == 0) {
|
|
||||||
result = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
size_t len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);
|
size_t len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);
|
||||||
|
|
||||||
result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
|
result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
|
||||||
|
@ -426,7 +416,6 @@ static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, cons
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -667,7 +656,7 @@ static GUID pawin_IID_IKsPropertySet =
|
||||||
property, and the other is using DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE.
|
property, and the other is using DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE.
|
||||||
I tried both methods and only the second worked. I found two postings on the
|
I tried both methods and only the second worked. I found two postings on the
|
||||||
net from people who had the same problem with the first method, so I think the method used here is
|
net from people who had the same problem with the first method, so I think the method used here is
|
||||||
more common/likely to work. The probem is that IKsPropertySet_Get returns S_OK
|
more common/likely to work. The problem is that IKsPropertySet_Get returns S_OK
|
||||||
but the fields of the device description are not filled in.
|
but the fields of the device description are not filled in.
|
||||||
|
|
||||||
The mechanism we use works by registering an enumeration callback which is called for
|
The mechanism we use works by registering an enumeration callback which is called for
|
||||||
|
@ -757,7 +746,7 @@ static double defaultSampleRateSearchOrder_[] =
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
** Extract capabilities from an output device, and add it to the device info list
|
** Extract capabilities from an output device, and add it to the device info list
|
||||||
** if successful. This function assumes that there is enough room in the
|
** if successful. This function assumes that there is enough room in the
|
||||||
** device info list to accomodate all entries.
|
** device info list to accommodate all entries.
|
||||||
**
|
**
|
||||||
** The device will not be added to the device list if any errors are encountered.
|
** The device will not be added to the device list if any errors are encountered.
|
||||||
*/
|
*/
|
||||||
|
@ -904,6 +893,9 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
||||||
case DSSPEAKER_STEREO: count = 2; break;
|
case DSSPEAKER_STEREO: count = 2; break;
|
||||||
case DSSPEAKER_SURROUND: count = 4; break;
|
case DSSPEAKER_SURROUND: count = 4; break;
|
||||||
case DSSPEAKER_5POINT1: count = 6; break;
|
case DSSPEAKER_5POINT1: count = 6; break;
|
||||||
|
#ifndef DSSPEAKER_7POINT1
|
||||||
|
#define DSSPEAKER_7POINT1 0x00000007
|
||||||
|
#endif
|
||||||
case DSSPEAKER_7POINT1: count = 8; break;
|
case DSSPEAKER_7POINT1: count = 8; break;
|
||||||
#ifndef DSSPEAKER_7POINT1_SURROUND
|
#ifndef DSSPEAKER_7POINT1_SURROUND
|
||||||
#define DSSPEAKER_7POINT1_SURROUND 0x00000008
|
#define DSSPEAKER_7POINT1_SURROUND 0x00000008
|
||||||
|
@ -1011,7 +1003,7 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
** Extract capabilities from an input device, and add it to the device info list
|
** Extract capabilities from an input device, and add it to the device info list
|
||||||
** if successful. This function assumes that there is enough room in the
|
** if successful. This function assumes that there is enough room in the
|
||||||
** device info list to accomodate all entries.
|
** device info list to accommodate all entries.
|
||||||
**
|
**
|
||||||
** The device will not be added to the device list if any errors are encountered.
|
** The device will not be added to the device list if any errors are encountered.
|
||||||
*/
|
*/
|
||||||
|
@ -2136,7 +2128,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CalculateBufferSettings( &stream->hostBufferSizeFrames, &pollingPeriodFrames,
|
CalculateBufferSettings( (unsigned long*)&stream->hostBufferSizeFrames, &pollingPeriodFrames,
|
||||||
/* isFullDuplex = */ (inputParameters && outputParameters),
|
/* isFullDuplex = */ (inputParameters && outputParameters),
|
||||||
suggestedInputLatencyFrames,
|
suggestedInputLatencyFrames,
|
||||||
suggestedOutputLatencyFrames,
|
suggestedOutputLatencyFrames,
|
||||||
|
@ -2252,7 +2244,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
|
|
||||||
/* create half duplex buffers. also used for full-duplex streams which didn't
|
/* create half duplex buffers. also used for full-duplex streams which didn't
|
||||||
succeed when using the full duplex API. that could happen because
|
succeed when using the full duplex API. that could happen because
|
||||||
DX8 or greater isnt installed, the i/o devices aren't the same
|
DX8 or greater isn't installed, the i/o devices aren't the same
|
||||||
physical device. etc.
|
physical device. etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2795,7 +2787,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* tick using WaitForSingleObject timout */
|
/* tick using WaitForSingleObject timeout */
|
||||||
while ( WaitForSingleObject( stream->processingCompleted, timerPeriodMs ) == WAIT_TIMEOUT )
|
while ( WaitForSingleObject( stream->processingCompleted, timerPeriodMs ) == WAIT_TIMEOUT )
|
||||||
{
|
{
|
||||||
TimerCallback( 0, 0, (DWORD_PTR)pArg, 0, 0 );
|
TimerCallback( 0, 0, (DWORD_PTR)pArg, 0, 0 );
|
||||||
|
|
|
@ -210,7 +210,7 @@ void PaWinDs_TerminateDSoundEntryPoints(void)
|
||||||
{
|
{
|
||||||
if( paWinDsDSoundEntryPoints.hInstance_ != NULL )
|
if( paWinDsDSoundEntryPoints.hInstance_ != NULL )
|
||||||
{
|
{
|
||||||
/* ensure that we crash reliably if the entry points arent initialised */
|
/* ensure that we crash reliably if the entry points aren't initialised */
|
||||||
paWinDsDSoundEntryPoints.DirectSoundCreate = 0;
|
paWinDsDSoundEntryPoints.DirectSoundCreate = 0;
|
||||||
paWinDsDSoundEntryPoints.DirectSoundEnumerateW = 0;
|
paWinDsDSoundEntryPoints.DirectSoundEnumerateW = 0;
|
||||||
paWinDsDSoundEntryPoints.DirectSoundEnumerateA = 0;
|
paWinDsDSoundEntryPoints.DirectSoundEnumerateA = 0;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Use the earliest version of DX required, no need to polute the namespace
|
Use the earliest version of DX required, no need to pollute the namespace
|
||||||
*/
|
*/
|
||||||
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
|
||||||
#define DIRECTSOUND_VERSION 0x0800
|
#define DIRECTSOUND_VERSION 0x0800
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_jack.c 1912 2013-11-15 12:27:07Z gineera $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* Latest Version at: http://www.portaudio.com
|
* Latest Version at: http://www.portaudio.com
|
||||||
* JACK Implementation by Joshua Haberman
|
* JACK Implementation by Joshua Haberman
|
||||||
|
@ -71,6 +71,8 @@
|
||||||
#include "pa_ringbuffer.h"
|
#include "pa_ringbuffer.h"
|
||||||
#include "pa_debugprint.h"
|
#include "pa_debugprint.h"
|
||||||
|
|
||||||
|
#include "pa_jack.h"
|
||||||
|
|
||||||
static pthread_t mainThread_;
|
static pthread_t mainThread_;
|
||||||
static char *jackErr_ = NULL;
|
static char *jackErr_ = NULL;
|
||||||
static const char* clientName_ = "PortAudio";
|
static const char* clientName_ = "PortAudio";
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_unix_oss.c 1894 2013-06-08 19:30:41Z gineera $
|
* $Id$
|
||||||
* PortAudio Portable Real-Time Audio Library
|
* PortAudio Portable Real-Time Audio Library
|
||||||
* Latest Version at: http://www.portaudio.com
|
* Latest Version at: http://www.portaudio.com
|
||||||
* OSS implementation by:
|
* OSS implementation by:
|
||||||
|
@ -466,7 +466,7 @@ static PaError QueryDevice( char *deviceName, PaOSSHostApiRepresentation *ossApi
|
||||||
|
|
||||||
/* douglas:
|
/* douglas:
|
||||||
we have to do this querying in a slightly different order. apparently
|
we have to do this querying in a slightly different order. apparently
|
||||||
some sound cards will give you different info based on their settins.
|
some sound cards will give you different info based on their settings.
|
||||||
e.g. a card might give you stereo at 22kHz but only mono at 44kHz.
|
e.g. a card might give you stereo at 22kHz but only mono at 44kHz.
|
||||||
the correct order for OSS is: format, channels, sample rate
|
the correct order for OSS is: format, channels, sample rate
|
||||||
*/
|
*/
|
||||||
|
@ -1335,7 +1335,7 @@ static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *fr
|
||||||
#ifdef PTHREAD_CANCELED
|
#ifdef PTHREAD_CANCELED
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
#else
|
#else
|
||||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||||
if( stream->callbackStop || stream->callbackAbort )
|
if( stream->callbackStop || stream->callbackAbort )
|
||||||
{
|
{
|
||||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||||
|
@ -1369,7 +1369,7 @@ static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *fr
|
||||||
#ifdef PTHREAD_CANCELED
|
#ifdef PTHREAD_CANCELED
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
#else
|
#else
|
||||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||||
if( stream->callbackStop || stream->callbackAbort )
|
if( stream->callbackStop || stream->callbackAbort )
|
||||||
{
|
{
|
||||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||||
|
@ -1640,7 +1640,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
||||||
#ifdef PTHREAD_CANCELED
|
#ifdef PTHREAD_CANCELED
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
#else
|
#else
|
||||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancelation */
|
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */
|
||||||
{
|
{
|
||||||
PA_DEBUG(( "Aborting callback thread\n" ));
|
PA_DEBUG(( "Aborting callback thread\n" ));
|
||||||
break;
|
break;
|
||||||
|
@ -1681,7 +1681,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
||||||
callbackResult = paComplete;
|
callbackResult = paComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancelation */
|
if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */
|
||||||
{
|
{
|
||||||
PA_DEBUG(( "Aborting callback thread\n" ));
|
PA_DEBUG(( "Aborting callback thread\n" ));
|
||||||
break;
|
break;
|
||||||
|
@ -1793,7 +1793,7 @@ static PaError CloseStream( PaStream* s )
|
||||||
*
|
*
|
||||||
* Aspect StreamState: After returning, the stream shall be in the Active state, implying that an eventual
|
* Aspect StreamState: After returning, the stream shall be in the Active state, implying that an eventual
|
||||||
* callback will be repeatedly called in a separate thread. If a separate thread is started this function
|
* callback will be repeatedly called in a separate thread. If a separate thread is started this function
|
||||||
* will block untill it has started processing audio, otherwise audio processing is started directly.
|
* will block until it has started processing audio, otherwise audio processing is started directly.
|
||||||
*/
|
*/
|
||||||
static PaError StartStream( PaStream *s )
|
static PaError StartStream( PaStream *s )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_hostapi_skeleton.c 1668 2011-05-02 17:07:11Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library skeleton implementation
|
* Portable Audio I/O Library skeleton implementation
|
||||||
* demonstrates how to use the common functions to implement support
|
* demonstrates how to use the common functions to implement support
|
||||||
* for a host API
|
* for a host API
|
||||||
|
@ -413,7 +413,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inputChannelCount = 0;
|
inputChannelCount = 0;
|
||||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
|
inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if( outputParameters )
|
if( outputParameters )
|
||||||
|
@ -442,7 +442,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
outputChannelCount = 0;
|
outputChannelCount = 0;
|
||||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
|
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,24 +2,21 @@
|
||||||
* WASAPI API *
|
* WASAPI API *
|
||||||
**************
|
**************
|
||||||
|
|
||||||
----------------------------------------
|
-------------------------------------------
|
||||||
Microsoft Visual Studio 2005SP1/2008/10
|
Microsoft Visual Studio 2005 SP1 and higher
|
||||||
----------------------------------------
|
-------------------------------------------
|
||||||
No specific actions are needed to compile WASAPI API under Visual Studio.
|
No specific action is required to compile WASAPI API under Visual Studio.
|
||||||
You are only required to install min. Windows Vista SDK (v6.0A) prior
|
You are only required to install min. Windows Vista SDK (v6.0A) prior
|
||||||
compilation.
|
the compilation. To compile with WASAPI specific functionality for Windows 8
|
||||||
|
and higher the min. Windows 8 SDK is required.
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
MinGW (GCC 32-bit)/ MinGW64 (GCC 64-bit)
|
MinGW (GCC 32/64-bit)
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
To compile under MinGW you are required to include 'mingw-include' directory
|
To compile with MinGW you are required to include 'mingw-include' directory
|
||||||
which contains necessary files with WASAPI API. These files are modified
|
which contains necessary files with WASAPI API. These files are modified
|
||||||
in order to be compiled by MinGW compiler. These files are taken from
|
for the compatibility with MinGW compiler. These files are taken from
|
||||||
Windows Vista SDK (v6.0A). MinGW compilation is tested and proved to be
|
the Windows Vista SDK (v6.0A). MinGW compilation is tested and proved to be
|
||||||
fully working under 32-bit and 64-bit modes.
|
fully working.
|
||||||
MinGW (32-bit) tested: gcc version 4.4.0 (GCC)
|
MinGW (32-bit) tested min. version: gcc version 4.4.0 (GCC)
|
||||||
MinGW64 (64-bit) tested: gcc version 4.4.4 20100226 (prerelease) (GCC)
|
MinGW64 (64-bit) tested min. version: gcc version 4.4.4 20100226 (prerelease) (GCC)
|
||||||
|
|
||||||
PortAudio
|
|
||||||
/Dmitry Kostjuchenko/
|
|
||||||
04.03.2010
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_wdmks.c 1945 2015-01-21 06:24:32Z rbencina $
|
* $Id$
|
||||||
* PortAudio Windows WDM-KS interface
|
* PortAudio Windows WDM-KS interface
|
||||||
*
|
*
|
||||||
* Author: Andrew Baldwin, Robert Bielik (WaveRT)
|
* Author: Andrew Baldwin, Robert Bielik (WaveRT)
|
||||||
|
@ -94,7 +94,9 @@ of a device for the duration of active stream using those devices
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifndef __GNUC__ /* Fix for ticket #257: MinGW-w64: Inclusion of <winioctl.h> triggers multiple redefinition errors. */
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
|
#endif
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -161,9 +163,15 @@ Default is to use the pin category.
|
||||||
#define DYNAMIC_GUID(data) {data}
|
#define DYNAMIC_GUID(data) {data}
|
||||||
//#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */
|
//#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */
|
||||||
//#undef DEFINE_GUID
|
//#undef DEFINE_GUID
|
||||||
//#define DEFINE_GUID(n,data) EXTERN_C const GUID n = {data}
|
//#ifdef __clang__ /* clang-cl: avoid too many arguments error */
|
||||||
//#define DEFINE_GUID_THUNK(n,data) DEFINE_GUID(n,data)
|
// #define DEFINE_GUID(n, ...) EXTERN_C const GUID n = {__VA_ARGS__}
|
||||||
//#define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK(n, STATIC_##n)
|
// #define DEFINE_GUID_THUNK(n, ...) DEFINE_GUID(n, __VA_ARGS__)
|
||||||
|
// #define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK(n, STATIC_##n)
|
||||||
|
//#else
|
||||||
|
// #define DEFINE_GUID(n, data) EXTERN_C const GUID n = {data}
|
||||||
|
// #define DEFINE_GUID_THUNK(n, data) DEFINE_GUID(n, data)
|
||||||
|
// #define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK(n, STATIC_##n)
|
||||||
|
//#endif /* __clang__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
|
@ -1055,8 +1063,9 @@ static const KSTOPOLOGY_CONNECTION* FindStartConnectionFrom(ULONG startPin, PaWi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Some devices may report topologies that leave pins unconnected. This may be by design or driver installation
|
||||||
|
issues. Pass the error condition back to caller. */
|
||||||
PA_DEBUG(("FindStartConnectionFrom: returning NULL\n"));
|
PA_DEBUG(("FindStartConnectionFrom: returning NULL\n"));
|
||||||
assert(FALSE);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1075,8 +1084,8 @@ static const KSTOPOLOGY_CONNECTION* FindStartConnectionTo(ULONG startPin, PaWinW
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Unconnected pin. Inform caller. */
|
||||||
PA_DEBUG(("FindStartConnectionTo: returning NULL\n"));
|
PA_DEBUG(("FindStartConnectionTo: returning NULL\n"));
|
||||||
assert(FALSE);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1968,8 +1977,8 @@ static PaWinWdmPin* PinNew(PaWinWdmFilter* parentFilter, unsigned long pinId, Pa
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Should never come here! */
|
/* Unconnected pin */
|
||||||
assert(FALSE);
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2842,6 +2851,10 @@ PaError FilterInitializePins( PaWinWdmFilter* filter )
|
||||||
filter->pins[pinId] = newPin;
|
filter->pins[pinId] = newPin;
|
||||||
++filter->validPinCount;
|
++filter->validPinCount;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filter->pins[pinId] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter->validPinCount == 0)
|
if (filter->validPinCount == 0)
|
||||||
|
@ -4367,7 +4380,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
userInputChannels = 0;
|
userInputChannels = 0;
|
||||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Supress 'uninitialised var' warnings. */
|
inputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if( outputParameters )
|
if( outputParameters )
|
||||||
|
@ -4402,7 +4415,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
userOutputChannels = 0;
|
userOutputChannels = 0;
|
||||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Supress 'uninitialized var' warnings. */
|
outputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* validate platform specific flags */
|
/* validate platform specific flags */
|
||||||
|
@ -4587,6 +4600,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
hostInputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */
|
||||||
|
|
||||||
stream->capture.pPin = NULL;
|
stream->capture.pPin = NULL;
|
||||||
stream->capture.bytesPerFrame = 0;
|
stream->capture.bytesPerFrame = 0;
|
||||||
}
|
}
|
||||||
|
@ -4711,6 +4726,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
hostOutputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */
|
||||||
|
|
||||||
stream->render.pPin = NULL;
|
stream->render.pPin = NULL;
|
||||||
stream->render.bytesPerFrame = 0;
|
stream->render.bytesPerFrame = 0;
|
||||||
}
|
}
|
||||||
|
@ -6535,6 +6552,7 @@ static PaError PaPinCaptureSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo,
|
||||||
assert(packet != 0);
|
assert(packet != 0);
|
||||||
PA_HP_TRACE((pInfo->stream->hLog, "Capture submit: %u", eventIndex));
|
PA_HP_TRACE((pInfo->stream->hLog, "Capture submit: %u", eventIndex));
|
||||||
packet->Header.DataUsed = 0; /* Reset for reuse */
|
packet->Header.DataUsed = 0; /* Reset for reuse */
|
||||||
|
packet->Header.OptionsFlags = 0; /* Reset for reuse. Required for e.g. Focusrite Scarlett 2i4 (1st Gen) see #310 */
|
||||||
ResetEvent(packet->Signal.hEvent);
|
ResetEvent(packet->Signal.hEvent);
|
||||||
result = PinRead(pInfo->stream->capture.pPin->handle, packet);
|
result = PinRead(pInfo->stream->capture.pPin->handle, packet);
|
||||||
++pInfo->pending;
|
++pInfo->pending;
|
||||||
|
|
|
@ -52,7 +52,7 @@ by the user, and can be limited in functionality or difficult to use.
|
||||||
|
|
||||||
This is where the PortAudio "WDM-KS" host implementation comes in.
|
This is where the PortAudio "WDM-KS" host implementation comes in.
|
||||||
It directly connects PortAudio to the same Kernel Streaming API which
|
It directly connects PortAudio to the same Kernel Streaming API which
|
||||||
those ASIO bridges use. This avoids the mixing penatly of DirectX,
|
those ASIO bridges use. This avoids the mixing penalty of DirectX,
|
||||||
giving at least as good latency as any ASIO driver, but it has the
|
giving at least as good latency as any ASIO driver, but it has the
|
||||||
advantage of working with ANY Windows audio hardware which is available
|
advantage of working with ANY Windows audio hardware which is available
|
||||||
through the normal MME/DirectX routes without the user requiring
|
through the normal MME/DirectX routes without the user requiring
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_wmme.c 1948 2015-01-21 06:52:11Z rbencina $
|
* $Id$
|
||||||
* pa_win_wmme.c
|
* pa_win_wmme.c
|
||||||
* Implementation of PortAudio for Windows MultiMedia Extensions (WMME)
|
* Implementation of PortAudio for Windows MultiMedia Extensions (WMME)
|
||||||
*
|
*
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices
|
RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices
|
||||||
refactoring, renaming and fixed a few edge case bugs
|
refactoring, renaming and fixed a few edge case bugs
|
||||||
RDB20020531 - converted to V19 framework
|
RDB20020531 - converted to V19 framework
|
||||||
** NOTE maintanance history is now stored in CVS **
|
** NOTE maintenance history is now stored in CVS **
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
/* When client suggestedLatency could result in many host buffers, we aim to have around 8,
|
/* When client suggestedLatency could result in many host buffers, we aim to have around 8,
|
||||||
based off Windows documentation that suggests that the kmixer uses 8 buffers. This choice
|
based off Windows documentation that suggests that the kmixer uses 8 buffers. This choice
|
||||||
is somewhat arbitrary here, since we havn't observed significant stability degredation
|
is somewhat arbitrary here, since we haven't observed significant stability degredation
|
||||||
with using either more, or less buffers.
|
with using either more, or less buffers.
|
||||||
*/
|
*/
|
||||||
#define PA_MME_TARGET_HOST_BUFFER_COUNT_ 8
|
#define PA_MME_TARGET_HOST_BUFFER_COUNT_ 8
|
||||||
|
@ -204,12 +204,9 @@ static const char constOutputMapperSuffix_[] = " - Output";
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
|
||||||
/* Copy null-terminated TCHAR string to explicit char string using UTF8 encoding */
|
/* Copy null-terminated WCHAR string to explicit char string using UTF8 encoding */
|
||||||
static char *CopyTCharStringToUtf8CString(char *destination, size_t destLengthBytes, const TCHAR *source)
|
static char *CopyWCharStringToUtf8CString(char *destination, size_t destLengthBytes, const WCHAR *source)
|
||||||
{
|
{
|
||||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
|
||||||
return strcpy(destination, source);
|
|
||||||
#else
|
|
||||||
/* The cbMultiByte parameter ["destLengthBytes" below] is:
|
/* The cbMultiByte parameter ["destLengthBytes" below] is:
|
||||||
"""
|
"""
|
||||||
Size, in bytes, of the buffer indicated by lpMultiByteStr ["destination" below].
|
Size, in bytes, of the buffer indicated by lpMultiByteStr ["destination" below].
|
||||||
|
@ -237,18 +234,13 @@ static char *CopyTCharStringToUtf8CString(char *destination, size_t destLengthBy
|
||||||
if (WideCharToMultiByte(CP_UTF8, 0, source, -1, destination, /*cbMultiByte=*/intDestLengthBytes, NULL, NULL) == 0)
|
if (WideCharToMultiByte(CP_UTF8, 0, source, -1, destination, /*cbMultiByte=*/intDestLengthBytes, NULL, NULL) == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
return destination;
|
return destination;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns required length (in bytes) of destination buffer when
|
/* returns required length (in bytes) of destination buffer when
|
||||||
converting TCHAR string to UTF8 bytes, not including the terminating null. */
|
converting WCHAR string to UTF8 bytes, not including the terminating null. */
|
||||||
static size_t TCharStringLen(const TCHAR *str)
|
static size_t WCharStringLen(const WCHAR *str)
|
||||||
{
|
{
|
||||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
|
||||||
return strlen(str);
|
|
||||||
#else
|
|
||||||
return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
@ -298,45 +290,25 @@ static signed long GetStreamWriteAvailable( PaStream* stream );
|
||||||
|
|
||||||
/* macros for setting last host error information */
|
/* macros for setting last host error information */
|
||||||
|
|
||||||
#ifdef UNICODE
|
#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
|
||||||
|
{ \
|
||||||
#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
|
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||||
{ \
|
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
waveInGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1, \
|
||||||
waveInGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||||
WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
|
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
||||||
mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
|
||||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
|
#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
|
||||||
{ \
|
{ \
|
||||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||||
waveOutGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
waveOutGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||||
WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
|
WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1, \
|
||||||
mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !UNICODE */
|
|
||||||
|
|
||||||
#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
|
|
||||||
{ \
|
|
||||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
|
||||||
waveInGetErrorText( mmresult, mmeErrorText, MAXERRORLENGTH ); \
|
|
||||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
|
|
||||||
{ \
|
|
||||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
|
||||||
waveOutGetErrorText( mmresult, mmeErrorText, MAXERRORLENGTH ); \
|
|
||||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* UNICODE */
|
|
||||||
|
|
||||||
|
|
||||||
static void PaMme_SetLastSystemError( DWORD errorCode )
|
static void PaMme_SetLastSystemError( DWORD errorCode )
|
||||||
|
@ -667,13 +639,16 @@ static void DetectDefaultSampleRate( PaWinMmeDeviceInfo *winMmeDeviceInfo, int w
|
||||||
|
|
||||||
|
|
||||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||||
static int QueryWaveInKSFilterMaxChannels( int waveInDeviceId, int *maxChannels )
|
static int QueryWaveInKSFilterMaxChannels( UINT waveInDeviceId, int *maxChannels )
|
||||||
{
|
{
|
||||||
void *devicePath;
|
void *devicePath;
|
||||||
DWORD devicePathSize;
|
DWORD devicePathSize;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
if( waveInMessage((HWAVEIN)waveInDeviceId, DRV_QUERYDEVICEINTERFACESIZE,
|
/* pass UINT ID via punned HWAVEIN, as per DRV_QUERYDEVICEINTERFACESIZE documentation */
|
||||||
|
HWAVEIN hDeviceId = (HWAVEIN)((UINT_PTR)waveInDeviceId);
|
||||||
|
|
||||||
|
if( waveInMessage(hDeviceId, DRV_QUERYDEVICEINTERFACESIZE,
|
||||||
(DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )
|
(DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -682,7 +657,7 @@ static int QueryWaveInKSFilterMaxChannels( int waveInDeviceId, int *maxChannels
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */
|
/* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */
|
||||||
if( waveInMessage((HWAVEIN)waveInDeviceId, DRV_QUERYDEVICEINTERFACE,
|
if( waveInMessage(hDeviceId, DRV_QUERYDEVICEINTERFACE,
|
||||||
(DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )
|
(DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )
|
||||||
{
|
{
|
||||||
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 1 );
|
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 1 );
|
||||||
|
@ -706,13 +681,13 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
||||||
PaError result = paNoError;
|
PaError result = paNoError;
|
||||||
char *deviceName; /* non-const ptr */
|
char *deviceName; /* non-const ptr */
|
||||||
MMRESULT mmresult;
|
MMRESULT mmresult;
|
||||||
WAVEINCAPS wic;
|
WAVEINCAPSW wic;
|
||||||
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
*success = 0;
|
*success = 0;
|
||||||
|
|
||||||
mmresult = waveInGetDevCaps( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPS ) );
|
mmresult = waveInGetDevCapsW( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPSW ) );
|
||||||
if( mmresult == MMSYSERR_NOMEM )
|
if( mmresult == MMSYSERR_NOMEM )
|
||||||
{
|
{
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
|
@ -732,7 +707,7 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
||||||
so we are limited to displaying only the first 31 characters of the device name. */
|
so we are limited to displaying only the first 31 characters of the device name. */
|
||||||
if( winMmeInputDeviceId == WAVE_MAPPER )
|
if( winMmeInputDeviceId == WAVE_MAPPER )
|
||||||
{
|
{
|
||||||
len = TCharStringLen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_);
|
len = WCharStringLen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_);
|
||||||
/* Append I/O suffix to WAVE_MAPPER device. */
|
/* Append I/O suffix to WAVE_MAPPER device. */
|
||||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||||
winMmeHostApi->allocations,
|
winMmeHostApi->allocations,
|
||||||
|
@ -742,12 +717,12 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
CopyTCharStringToUtf8CString( deviceName, len, wic.szPname );
|
CopyWCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||||
strcat( deviceName, constInputMapperSuffix_ );
|
strcat( deviceName, constInputMapperSuffix_ );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
len = TCharStringLen( wic.szPname ) + 1;
|
len = WCharStringLen( wic.szPname ) + 1;
|
||||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||||
winMmeHostApi->allocations,
|
winMmeHostApi->allocations,
|
||||||
(long)len );
|
(long)len );
|
||||||
|
@ -756,7 +731,7 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
CopyTCharStringToUtf8CString( deviceName, len, wic.szPname );
|
CopyWCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||||
}
|
}
|
||||||
deviceInfo->name = deviceName;
|
deviceInfo->name = deviceName;
|
||||||
|
|
||||||
|
@ -797,13 +772,16 @@ error:
|
||||||
|
|
||||||
|
|
||||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||||
static int QueryWaveOutKSFilterMaxChannels( int waveOutDeviceId, int *maxChannels )
|
static int QueryWaveOutKSFilterMaxChannels( UINT waveOutDeviceId, int *maxChannels )
|
||||||
{
|
{
|
||||||
void *devicePath;
|
void *devicePath;
|
||||||
DWORD devicePathSize;
|
DWORD devicePathSize;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
if( waveOutMessage((HWAVEOUT)waveOutDeviceId, DRV_QUERYDEVICEINTERFACESIZE,
|
/* pass UINT ID via punned HWAVEOUT, as per DRV_QUERYDEVICEINTERFACESIZE documentation */
|
||||||
|
HWAVEOUT hDeviceId = (HWAVEOUT)((UINT_PTR)waveOutDeviceId);
|
||||||
|
|
||||||
|
if( waveOutMessage(hDeviceId, DRV_QUERYDEVICEINTERFACESIZE,
|
||||||
(DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )
|
(DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -812,7 +790,7 @@ static int QueryWaveOutKSFilterMaxChannels( int waveOutDeviceId, int *maxChannel
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */
|
/* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */
|
||||||
if( waveOutMessage((HWAVEOUT)waveOutDeviceId, DRV_QUERYDEVICEINTERFACE,
|
if( waveOutMessage(hDeviceId, DRV_QUERYDEVICEINTERFACE,
|
||||||
(DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )
|
(DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )
|
||||||
{
|
{
|
||||||
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 0 );
|
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 0 );
|
||||||
|
@ -836,7 +814,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
||||||
PaError result = paNoError;
|
PaError result = paNoError;
|
||||||
char *deviceName; /* non-const ptr */
|
char *deviceName; /* non-const ptr */
|
||||||
MMRESULT mmresult;
|
MMRESULT mmresult;
|
||||||
WAVEOUTCAPS woc;
|
WAVEOUTCAPSW woc;
|
||||||
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
||||||
size_t len;
|
size_t len;
|
||||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||||
|
@ -845,7 +823,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
||||||
|
|
||||||
*success = 0;
|
*success = 0;
|
||||||
|
|
||||||
mmresult = waveOutGetDevCaps( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPS ) );
|
mmresult = waveOutGetDevCapsW( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPSW ) );
|
||||||
if( mmresult == MMSYSERR_NOMEM )
|
if( mmresult == MMSYSERR_NOMEM )
|
||||||
{
|
{
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
|
@ -866,7 +844,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
||||||
if( winMmeOutputDeviceId == WAVE_MAPPER )
|
if( winMmeOutputDeviceId == WAVE_MAPPER )
|
||||||
{
|
{
|
||||||
/* Append I/O suffix to WAVE_MAPPER device. */
|
/* Append I/O suffix to WAVE_MAPPER device. */
|
||||||
len = TCharStringLen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_);
|
len = WCharStringLen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_);
|
||||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||||
winMmeHostApi->allocations,
|
winMmeHostApi->allocations,
|
||||||
(long)len );
|
(long)len );
|
||||||
|
@ -875,12 +853,12 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
|
CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||||
strcat( deviceName, constOutputMapperSuffix_ );
|
strcat( deviceName, constOutputMapperSuffix_ );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
len = TCharStringLen( woc.szPname ) + 1;
|
len = WCharStringLen( woc.szPname ) + 1;
|
||||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||||
winMmeHostApi->allocations,
|
winMmeHostApi->allocations,
|
||||||
(long)len );
|
(long)len );
|
||||||
|
@ -889,7 +867,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
||||||
result = paInsufficientMemory;
|
result = paInsufficientMemory;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
|
CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||||
}
|
}
|
||||||
deviceInfo->name = deviceName;
|
deviceInfo->name = deviceName;
|
||||||
|
|
||||||
|
@ -1017,11 +995,11 @@ PaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
|
||||||
/* the following calls assume that if wave*Message fails the preferred device parameter won't be modified */
|
/* the following calls assume that if wave*Message fails the preferred device parameter won't be modified */
|
||||||
preferredDeviceStatusFlags = 0;
|
preferredDeviceStatusFlags = 0;
|
||||||
waveInPreferredDevice = -1;
|
waveInPreferredDevice = -1;
|
||||||
waveInMessage( (HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveInPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );
|
waveInMessage( (HWAVEIN)((UINT_PTR)WAVE_MAPPER), DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveInPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );
|
||||||
|
|
||||||
preferredDeviceStatusFlags = 0;
|
preferredDeviceStatusFlags = 0;
|
||||||
waveOutPreferredDevice = -1;
|
waveOutPreferredDevice = -1;
|
||||||
waveOutMessage( (HWAVEOUT)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveOutPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );
|
waveOutMessage( (HWAVEOUT)((UINT_PTR)WAVE_MAPPER), DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveOutPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );
|
||||||
|
|
||||||
maximumPossibleDeviceCount = 0;
|
maximumPossibleDeviceCount = 0;
|
||||||
|
|
||||||
|
@ -2563,7 +2541,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;
|
stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;
|
||||||
|
|
||||||
/* time to sleep when throttling due to >100% cpu usage.
|
/* time to sleep when throttling due to >100% cpu usage.
|
||||||
-a quater of a buffer's duration */
|
-a quarter of a buffer's duration */
|
||||||
stream->throttledSleepMsecs =
|
stream->throttledSleepMsecs =
|
||||||
(unsigned long)(stream->bufferProcessor.framesPerHostBuffer *
|
(unsigned long)(stream->bufferProcessor.framesPerHostBuffer *
|
||||||
stream->bufferProcessor.samplePeriod * .25 * 1000);
|
stream->bufferProcessor.samplePeriod * .25 * 1000);
|
||||||
|
@ -2886,7 +2864,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
||||||
if( waitResult == WAIT_FAILED )
|
if( waitResult == WAIT_FAILED )
|
||||||
{
|
{
|
||||||
result = paUnanticipatedHostError;
|
result = paUnanticipatedHostError;
|
||||||
/** @todo FIXME/REVIEW: can't return host error info from an asyncronous thread. see http://www.portaudio.com/trac/ticket/143 */
|
/** @todo FIXME/REVIEW: can't return host error info from an asynchronous thread. see http://www.portaudio.com/trac/ticket/143 */
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
else if( waitResult == WAIT_TIMEOUT )
|
else if( waitResult == WAIT_TIMEOUT )
|
||||||
|
@ -3161,7 +3139,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
||||||
if( outputUnderflow && !done && !stream->stopProcessing )
|
if( outputUnderflow && !done && !stream->stopProcessing )
|
||||||
{
|
{
|
||||||
/* Recover from underflow in the case where the
|
/* Recover from underflow in the case where the
|
||||||
underflow occured while processing the buffer
|
underflow occurred while processing the buffer
|
||||||
we just finished */
|
we just finished */
|
||||||
|
|
||||||
result = CatchUpOutputBuffers( stream );
|
result = CatchUpOutputBuffers( stream );
|
||||||
|
@ -3359,7 +3337,7 @@ static PaError StartStream( PaStream *s )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we queue all channels of a single buffer frame (accross all
|
/* we queue all channels of a single buffer frame (across all
|
||||||
devices, because some multidevice multichannel drivers work
|
devices, because some multidevice multichannel drivers work
|
||||||
better this way */
|
better this way */
|
||||||
for( j=0; j<stream->output.deviceCount; ++j )
|
for( j=0; j<stream->output.deviceCount; ++j )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_unix_hostapis.c 1740 2011-08-25 07:17:48Z philburk $
|
* $Id$
|
||||||
* Portable Audio I/O Library UNIX initialization table
|
* Portable Audio I/O Library UNIX initialization table
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_unix_util.c 1510 2010-06-10 08:05:29Z dmitrykos $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* UNIX platform-specific support functions
|
* UNIX platform-specific support functions
|
||||||
*
|
*
|
||||||
|
@ -236,7 +236,7 @@ pthread_t paUnixMainThread = 0;
|
||||||
pthread_t paUnixMainThread = 0;
|
pthread_t paUnixMainThread = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PaError PaUnixThreading_Initialize()
|
PaError PaUnixThreading_Initialize( void )
|
||||||
{
|
{
|
||||||
paUnixMainThread = pthread_self();
|
paUnixMainThread = pthread_self();
|
||||||
return paNoError;
|
return paNoError;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_unix_util.h 1241 2007-07-23 20:08:31Z aknudsen $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* UNIX platform-specific support functions
|
* UNIX platform-specific support functions
|
||||||
*
|
*
|
||||||
|
@ -157,7 +157,7 @@ typedef struct
|
||||||
|
|
||||||
/** Initialize global threading state.
|
/** Initialize global threading state.
|
||||||
*/
|
*/
|
||||||
PaError PaUnixThreading_Initialize();
|
PaError PaUnixThreading_Initialize( void );
|
||||||
|
|
||||||
/** Perish, passing on eventual error code.
|
/** Perish, passing on eventual error code.
|
||||||
*
|
*
|
||||||
|
@ -182,7 +182,7 @@ PaError PaUnixThreading_Initialize();
|
||||||
/** Spawn a thread.
|
/** Spawn a thread.
|
||||||
*
|
*
|
||||||
* Intended for spawning the callback thread from the main thread. This function can even block (for a certain
|
* Intended for spawning the callback thread from the main thread. This function can even block (for a certain
|
||||||
* time or indefinitely) untill notified by the callback thread (using PaUnixThread_NotifyParent), which can be
|
* time or indefinitely) until notified by the callback thread (using PaUnixThread_NotifyParent), which can be
|
||||||
* useful in order to make sure that callback has commenced before returning from Pa_StartStream.
|
* useful in order to make sure that callback has commenced before returning from Pa_StartStream.
|
||||||
* @param threadFunc: The function to be executed in the child thread.
|
* @param threadFunc: The function to be executed in the child thread.
|
||||||
* @param waitForChild: If not 0, wait for child thread to call PaUnixThread_NotifyParent. Less than 0 means
|
* @param waitForChild: If not 0, wait for child thread to call PaUnixThread_NotifyParent. Less than 0 means
|
||||||
|
@ -195,7 +195,7 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*threadFunc)( void* ), void
|
||||||
|
|
||||||
/** Terminate thread.
|
/** Terminate thread.
|
||||||
*
|
*
|
||||||
* @param wait: If true, request that background thread stop and wait untill it does, else cancel it.
|
* @param wait: If true, request that background thread stop and wait until it does, else cancel it.
|
||||||
* @param exitResult: If non-null this will upon return contain the exit status of the thread.
|
* @param exitResult: If non-null this will upon return contain the exit status of the thread.
|
||||||
*/
|
*/
|
||||||
PaError PaUnixThread_Terminate( PaUnixThread* self, int wait, PaError* exitResult );
|
PaError PaUnixThread_Terminate( PaUnixThread* self, int wait, PaError* exitResult );
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#include "pa_win_coinitialize.h"
|
#include "pa_win_coinitialize.h"
|
||||||
|
|
||||||
|
|
||||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
|
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) /* MSC version 6 and above */
|
||||||
#pragma comment( lib, "ole32.lib" )
|
#pragma comment( lib, "ole32.lib" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -76,7 +76,11 @@ PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitial
|
||||||
RPC_E_CHANGED_MODE was returned.
|
RPC_E_CHANGED_MODE was returned.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP)
|
||||||
hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */
|
hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */
|
||||||
|
#else
|
||||||
|
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||||
|
#endif
|
||||||
if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
|
if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
|
||||||
{
|
{
|
||||||
PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
|
PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
|
||||||
|
@ -131,7 +135,7 @@ void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitiali
|
||||||
DWORD currentThreadId = GetCurrentThreadId();
|
DWORD currentThreadId = GetCurrentThreadId();
|
||||||
if( comInitializationResult->initializingThreadId != currentThreadId )
|
if( comInitializationResult->initializingThreadId != currentThreadId )
|
||||||
{
|
{
|
||||||
PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%d] does not match initializing thread[%d]\n",
|
PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%lu] does not match initializing thread[%lu]\n",
|
||||||
currentThreadId, comInitializationResult->initializingThreadId));
|
currentThreadId, comInitializationResult->initializingThreadId));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -55,7 +55,7 @@ extern "C"
|
||||||
*/
|
*/
|
||||||
typedef struct PaWinUtilComInitializationResult{
|
typedef struct PaWinUtilComInitializationResult{
|
||||||
int state;
|
int state;
|
||||||
int initializingThreadId;
|
DWORD initializingThreadId;
|
||||||
} PaWinUtilComInitializationResult;
|
} PaWinUtilComInitializationResult;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_hostapis.c 1728 2011-08-18 03:31:51Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library Windows initialization table
|
* Portable Audio I/O Library Windows initialization table
|
||||||
*
|
*
|
||||||
* Based on the Open Source API proposed by Ross Bencina
|
* Based on the Open Source API proposed by Ross Bencina
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: pa_win_util.c 1584 2011-02-02 18:58:17Z rossb $
|
* $Id$
|
||||||
* Portable Audio I/O Library
|
* Portable Audio I/O Library
|
||||||
* Win32 platform-specific support functions
|
* Win32 platform-specific support functions
|
||||||
*
|
*
|
||||||
|
@ -44,14 +44,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mmsystem.h> /* for timeGetTime() */
|
|
||||||
|
|
||||||
#include "pa_util.h"
|
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||||
|
#include <sys/timeb.h> /* for _ftime_s() */
|
||||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
|
#else
|
||||||
#pragma comment( lib, "winmm.lib" )
|
#include <mmsystem.h> /* for timeGetTime() */
|
||||||
|
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
|
||||||
|
#pragma comment( lib, "winmm.lib" )
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "pa_util.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Track memory allocations to avoid leaks.
|
Track memory allocations to avoid leaks.
|
||||||
|
@ -144,8 +147,12 @@ double PaUtil_GetTime( void )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifndef UNDER_CE
|
#ifndef UNDER_CE
|
||||||
|
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||||
|
return GetTickCount64() * .001;
|
||||||
|
#else
|
||||||
return timeGetTime() * .001;
|
return timeGetTime() * .001;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
return GetTickCount() * .001;
|
return GetTickCount() * .001;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||||
|
#include <mmreg.h> /* for WAVEFORMATEX */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "portaudio.h"
|
#include "portaudio.h"
|
||||||
#include "pa_win_waveformat.h"
|
#include "pa_win_waveformat.h"
|
||||||
|
@ -47,6 +50,7 @@
|
||||||
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
|
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static GUID pawin_ksDataFormatSubtypeGuidBase =
|
static GUID pawin_ksDataFormatSubtypeGuidBase =
|
||||||
{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
|
{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
|
||||||
|
|
||||||
|
@ -94,14 +98,15 @@ void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,
|
||||||
waveFormatEx->wBitsPerSample = bytesPerSample * 8;
|
waveFormatEx->wBitsPerSample = bytesPerSample * 8;
|
||||||
waveFormatEx->cbSize = 22;
|
waveFormatEx->cbSize = 22;
|
||||||
|
|
||||||
*((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =
|
memcpy(&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE],
|
||||||
waveFormatEx->wBitsPerSample;
|
&waveFormatEx->wBitsPerSample, sizeof(WORD));
|
||||||
|
|
||||||
|
memcpy(&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK],
|
||||||
|
&channelMask, sizeof(DWORD));
|
||||||
|
|
||||||
*((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;
|
|
||||||
|
|
||||||
guid = pawin_ksDataFormatSubtypeGuidBase;
|
guid = pawin_ksDataFormatSubtypeGuidBase;
|
||||||
guid.Data1 = (USHORT)waveFormatTag;
|
guid.Data1 = (USHORT)waveFormatTag;
|
||||||
*((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;
|
memcpy(&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT], &guid, sizeof(GUID));
|
||||||
}
|
}
|
||||||
|
|
||||||
PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
|
PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
|
||||||
|
@ -129,7 +134,7 @@ PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
|
||||||
/* case 7: */
|
/* case 7: */
|
||||||
case 8:
|
case 8:
|
||||||
/* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio
|
/* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio
|
||||||
output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Micrsoft HD Audio driver using PAWIN_SPEAKER_7POINT1.
|
output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Microsoft HD Audio driver using PAWIN_SPEAKER_7POINT1.
|
||||||
With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */
|
With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */
|
||||||
return PAWIN_SPEAKER_7POINT1_SURROUND;
|
return PAWIN_SPEAKER_7POINT1_SURROUND;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +149,7 @@ PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
|
||||||
/* Note that Alec Rogers proposed the following as an alternate method to
|
/* Note that Alec Rogers proposed the following as an alternate method to
|
||||||
generate the default channel mask, however it doesn't seem to be an improvement
|
generate the default channel mask, however it doesn't seem to be an improvement
|
||||||
over the above, since some drivers will matrix outputs mapping to non-present
|
over the above, since some drivers will matrix outputs mapping to non-present
|
||||||
speakers accross multiple physical speakers.
|
speakers across multiple physical speakers.
|
||||||
|
|
||||||
if(nChannels==1) {
|
if(nChannels==1) {
|
||||||
pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
|
pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
|
||||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
||||||
specified device. Returns 0 if the query fails for any reason.
|
specified device. Returns 0 if the query fails for any reason.
|
||||||
|
|
||||||
@param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.
|
@param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.
|
||||||
Declard as void* to avoid introducing a dependency on wchar_t here.
|
Declared as void* to avoid introducing a dependency on wchar_t here.
|
||||||
|
|
||||||
@param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.
|
@param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -55,7 +55,7 @@ TODO:
|
||||||
o- inline dither code
|
o- inline dither code
|
||||||
o- implement Dither only (no-clip) versions
|
o- implement Dither only (no-clip) versions
|
||||||
o- implement int8 and uint8 versions
|
o- implement int8 and uint8 versions
|
||||||
o- test thouroughly
|
o- test thoroughly
|
||||||
|
|
||||||
o- the packed 24 bit functions could benefit from unrolling and avoiding
|
o- the packed 24 bit functions could benefit from unrolling and avoiding
|
||||||
byte and word sized register access.
|
byte and word sized register access.
|
||||||
|
@ -116,7 +116,7 @@ TODO:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-EMT64/AMD64 uses different asm
|
-EMT64/AMD64 uses different asm
|
||||||
-VC2005 doesnt allow _WIN64 with inline assembly either!
|
-VC2005 doesn't allow _WIN64 with inline assembly either!
|
||||||
*/
|
*/
|
||||||
void PaUtil_InitializeX86PlainConverters( void )
|
void PaUtil_InitializeX86PlainConverters( void )
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Write the Git commit SHA to an include file.
|
||||||
|
# This should be run before compiling code on Linux or Macintosh.
|
||||||
|
#
|
||||||
|
revision_filename=src/common/pa_gitrevision.h
|
||||||
|
|
||||||
|
# Run git first to make sure it is installed before corrupting the
|
||||||
|
# include file.
|
||||||
|
git rev-parse HEAD
|
||||||
|
|
||||||
|
# Update the include file with the current Git revision.
|
||||||
|
echo -n "#define PA_GIT_REVISION " > ${revision_filename}
|
||||||
|
git rev-parse HEAD >> ${revision_filename}
|
||||||
|
|
||||||
|
echo ${revision_filename} now contains
|
||||||
|
cat ${revision_filename}
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Write the SVN revision to an include file.
|
|
||||||
# This should be run before compiling code on Linux or Macintosh.
|
|
||||||
#
|
|
||||||
revision_filename=src/common/pa_svnrevision.h
|
|
||||||
|
|
||||||
# Run svnversion first to make sure it is installed before corrupting the
|
|
||||||
# include file.
|
|
||||||
svnversion .
|
|
||||||
|
|
||||||
# Update the include file with the current SVN revision.
|
|
||||||
echo -n "#define PA_SVN_REVISION " > ${revision_filename}
|
|
||||||
svnversion . >> ${revision_filename}
|
|
||||||
|
|
||||||
echo ${revision_filename} now contains
|
|
||||||
cat ${revision_filename}
|
|
Loading…
Reference in New Issue