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 \
|
||||
include \
|
||||
bindings/java \
|
||||
examples
|
||||
FILE_PATTERNS = *.h \
|
||||
*.c \
|
||||
|
|
|
@ -84,7 +84,6 @@ WARN_LOGFILE =
|
|||
#---------------------------------------------------------------------------
|
||||
INPUT = doc/src \
|
||||
include \
|
||||
bindings/java \
|
||||
examples \
|
||||
src \
|
||||
test \
|
||||
|
|
|
@ -1,16 +1,26 @@
|
|||
PortAudio uses "autoconf" tools to generate Makefiles for Linux and Mac platforms.
|
||||
The source for these are configure.in and Makefile.in
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
./configure
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
|
||||
then check in the related files that are modified.
|
||||
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
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# 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
|
||||
# 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-*-
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
@ -24,8 +25,8 @@
|
|||
|
||||
m4_define([_LT_COPYING], [dnl
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# 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_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], [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])
|
||||
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
|
||||
gives unlimited permision to copy, distribute and modify it."
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
while test $[#] != 0
|
||||
do
|
||||
|
@ -808,6 +811,7 @@ AC_DEFUN([LT_LANG],
|
|||
m4_case([$1],
|
||||
[C], [_LT_LANG(C)],
|
||||
[C++], [_LT_LANG(CXX)],
|
||||
[Go], [_LT_LANG(GO)],
|
||||
[Java], [_LT_LANG(GCJ)],
|
||||
[Fortran 77], [_LT_LANG(F77)],
|
||||
[Fortran], [_LT_LANG(FC)],
|
||||
|
@ -829,6 +833,29 @@ m4_defun([_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
|
||||
# -----------------------
|
||||
m4_defun([_LT_LANG_DEFAULT_CONFIG],
|
||||
|
@ -859,6 +886,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
|||
m4_ifdef([LT_PROG_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],
|
||||
[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 \
|
||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||
_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
|
||||
else
|
||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||
|
@ -969,6 +1006,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
|||
rm -rf libconftest.dylib*
|
||||
rm -f conftest.*
|
||||
fi])
|
||||
|
||||
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
||||
[lt_cv_ld_exported_symbols_list],
|
||||
[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])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
|
||||
[lt_cv_ld_force_load=no
|
||||
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
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||
_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
|
||||
else
|
||||
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
|
||||
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||
[
|
||||
|
@ -1054,6 +1095,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
|||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
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\"`'
|
||||
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
|
||||
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
|
||||
else
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
||||
fi
|
||||
|
@ -1275,7 +1318,7 @@ ia64-*-hpux*)
|
|||
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*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
|
@ -1287,9 +1330,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
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"
|
||||
;;
|
||||
s390x-*linux*)
|
||||
|
@ -1308,7 +1361,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpcle-*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc-*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
|
@ -1337,14 +1393,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
sparc*-*solaris*)
|
||||
*-*solaris*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*64-bit*)
|
||||
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
|
||||
LD="${LD-ld} -64"
|
||||
|
@ -1421,13 +1490,13 @@ old_postuninstall_cmds=
|
|||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
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
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
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
|
||||
;;
|
||||
|
||||
os2*)
|
||||
# The test takes a long time on OS/2.
|
||||
lt_cv_sys_max_cmd_len=8192
|
||||
;;
|
||||
|
||||
osf*)
|
||||
# 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
|
||||
|
@ -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`
|
||||
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 \* 3`
|
||||
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
|
||||
# maximum length that is only half of the actual maximum length, but
|
||||
# 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 &&
|
||||
test $i != 17 # 1/2 MB should be enough
|
||||
do
|
||||
|
@ -2192,7 +2267,7 @@ need_version=unknown
|
|||
|
||||
case $host_os in
|
||||
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'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
|
@ -2201,7 +2276,7 @@ aix3*)
|
|||
;;
|
||||
|
||||
aix[[4-9]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
|
@ -2266,7 +2341,7 @@ beos*)
|
|||
;;
|
||||
|
||||
bsdi[[45]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
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'
|
||||
|
@ -2405,7 +2480,7 @@ m4_if([$1], [],[
|
|||
;;
|
||||
|
||||
dgux*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
|
@ -2424,7 +2495,7 @@ freebsd* | dragonfly*)
|
|||
objformat=`/usr/bin/objformat`
|
||||
else
|
||||
case $host_os in
|
||||
freebsd[[123]]*) objformat=aout ;;
|
||||
freebsd[[23]].*) objformat=aout ;;
|
||||
*) objformat=elf ;;
|
||||
esac
|
||||
fi
|
||||
|
@ -2442,7 +2513,7 @@ freebsd* | dragonfly*)
|
|||
esac
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case $host_os in
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
|
||||
|
@ -2461,19 +2532,8 @@ freebsd* | dragonfly*)
|
|||
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*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
dynamic_linker="$host_os runtime_loader"
|
||||
|
@ -2534,7 +2594,7 @@ hpux9* | hpux10* | hpux11*)
|
|||
;;
|
||||
|
||||
interix[[3-9]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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 ;;
|
||||
*)
|
||||
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
|
||||
version_type=irix
|
||||
fi ;;
|
||||
|
@ -2587,9 +2647,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
|||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
version_type=linux
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -2664,7 +2724,7 @@ netbsd*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=yes
|
||||
|
@ -2733,7 +2793,7 @@ rdos*)
|
|||
;;
|
||||
|
||||
solaris*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -2758,7 +2818,7 @@ sunos4*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -2782,7 +2842,7 @@ sysv4 | sysv4.3*)
|
|||
|
||||
sysv4*MP*)
|
||||
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}'
|
||||
soname_spec='$libname${shared_ext}.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -2813,7 +2873,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
|||
|
||||
tpf*)
|
||||
# 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_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -2823,7 +2883,7 @@ tpf*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -3204,10 +3264,6 @@ freebsd* | dragonfly*)
|
|||
fi
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
@ -3245,8 +3301,8 @@ irix5* | irix6* | nonstopux*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
|
@ -3665,6 +3721,7 @@ for ac_symprfx in "" "_"; do
|
|||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||
" \$ 0!~/External *\|/{next};"\
|
||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||
|
@ -3997,7 +4054,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# KAI C++ Compiler
|
||||
|
@ -4249,7 +4306,9 @@ m4_if([$1], [CXX], [
|
|||
case $cc_basename in
|
||||
nvcc*) # Cuda Compiler Driver 2.2
|
||||
_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
|
||||
else
|
||||
|
@ -4294,7 +4353,7 @@ m4_if([$1], [CXX], [
|
|||
_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
|
||||
# old Intel for x86_64 which still supported -KPIC.
|
||||
ecc*)
|
||||
|
@ -4341,18 +4400,33 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
*)
|
||||
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
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_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 5.9
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_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
|
||||
|
@ -4512,7 +4586,9 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
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(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_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
|
@ -4794,8 +4869,7 @@ _LT_EOF
|
|||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
# 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(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test "x$supports_anon_versioning" = xyes; then
|
||||
_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.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||
_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'
|
||||
# Don't use ranlib
|
||||
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
|
||||
|
@ -5137,10 +5212,6 @@ _LT_EOF
|
|||
_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
|
||||
# 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
|
||||
|
@ -5153,7 +5224,7 @@ _LT_EOF
|
|||
;;
|
||||
|
||||
# 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(hardcode_direct, $1)=yes
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||
|
@ -5192,7 +5263,6 @@ _LT_EOF
|
|||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
_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_direct, $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],
|
||||
[Flag to hardcode $libdir into a binary during linking.
|
||||
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],
|
||||
[Whether we need a single "-rpath" flag with a separated argument])
|
||||
_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_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
|
@ -6160,7 +6226,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
|||
esac
|
||||
;;
|
||||
|
||||
freebsd[[12]]*)
|
||||
freebsd2.*)
|
||||
# C++ shared libraries reported to be fairly broken before
|
||||
# switch to ELF
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
|
@ -6176,9 +6242,6 @@ if test "$_lt_caught_CXX_error" != yes; then
|
|||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_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
|
||||
;;
|
||||
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
@ -6921,12 +6984,18 @@ public class foo {
|
|||
}
|
||||
};
|
||||
_LT_EOF
|
||||
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
|
||||
package foo
|
||||
func foo() {
|
||||
}
|
||||
_LT_EOF
|
||||
])
|
||||
|
||||
_lt_libdeps_save_CFLAGS=$CFLAGS
|
||||
case "$CC $CFLAGS " in #(
|
||||
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
|
||||
esac
|
||||
|
||||
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_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $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_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_automatic, $1)=no
|
||||
|
@ -7439,6 +7506,73 @@ CFLAGS=$lt_save_CFLAGS
|
|||
])# _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])
|
||||
# -------------------------
|
||||
# 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], [])
|
||||
|
||||
|
||||
# LT_PROG_GO
|
||||
# ----------
|
||||
AC_DEFUN([LT_PROG_GO],
|
||||
[AC_CHECK_TOOL(GOC, gccgo,)
|
||||
])
|
||||
|
||||
|
||||
# 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'.
|
||||
m4_define([_LT_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@:>@])],
|
||||
[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])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
@ -8346,15 +8502,15 @@ m4_define([lt_dict_filter],
|
|||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3293 ltversion.m4
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3293])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4'
|
||||
macro_revision='1.3293'
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
@ -8513,7 +8669,7 @@ fi[]dnl
|
|||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
# 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
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
|
|
|
@ -41,10 +41,17 @@ PaUtil_InitializeX86PlainConverters @52
|
|||
PaAsio_GetInputChannelName @53
|
||||
PaAsio_GetOutputChannelName @54
|
||||
PaUtil_SetDebugPrintFunction @55
|
||||
PaWasapi_GetDeviceDefaultFormat @56
|
||||
PaWasapi_GetDeviceRole @57
|
||||
PaWasapi_ThreadPriorityBoost @58
|
||||
PaWasapi_ThreadPriorityRevert @59
|
||||
PaWasapi_GetFramesPerHostBuffer @60
|
||||
PaWasapi_GetJackDescription @61
|
||||
PaWasapi_GetJackCount @62
|
||||
PaWasapi_GetAudioClient @56
|
||||
PaWasapi_UpdateDeviceList @57
|
||||
PaWasapi_GetDeviceCurrentFormat @58
|
||||
PaWasapi_GetDeviceDefaultFormat @59
|
||||
PaWasapi_GetDeviceMixFormat @60
|
||||
PaWasapi_GetDeviceRole @61
|
||||
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:
|
||||
Latest known URL:
|
||||
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)
|
||||
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
|
||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50
|
||||
@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_GetOutputChannelName @54
|
||||
PaUtil_SetDebugPrintFunction @55
|
||||
|
|
|
@ -723,6 +723,7 @@ infodir
|
|||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
|
@ -821,6 +822,7 @@ datadir='${datarootdir}'
|
|||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||
|
@ -1073,6 +1075,15 @@ do
|
|||
| -silent | --silent | --silen | --sile | --sil)
|
||||
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)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
|
@ -1210,7 +1221,7 @@ fi
|
|||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
|
@ -1363,6 +1374,7 @@ Fine tuning of the installation directories:
|
|||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/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-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]
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-sysroot=DIR Search for dependent libraries within DIR
|
||||
|
@ -4145,8 +4157,8 @@ esac
|
|||
|
||||
|
||||
|
||||
macro_version='2.4'
|
||||
macro_revision='1.3293'
|
||||
macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
|
||||
|
||||
|
||||
|
@ -4920,6 +4932,11 @@ else
|
|||
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*)
|
||||
# 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
|
||||
|
@ -4946,7 +4963,8 @@ else
|
|||
;;
|
||||
*)
|
||||
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 \* 3`
|
||||
else
|
||||
|
@ -4959,7 +4977,7 @@ else
|
|||
# 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
|
||||
# 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 &&
|
||||
test $i != 17 # 1/2 MB should be enough
|
||||
do
|
||||
|
@ -5344,10 +5362,6 @@ freebsd* | dragonfly*)
|
|||
fi
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
@ -5385,8 +5399,8 @@ irix5* | irix6* | nonstopux*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
|
@ -6023,13 +6037,13 @@ old_postuninstall_cmds=
|
|||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
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
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
|
@ -6218,6 +6232,7 @@ for ac_symprfx in "" "_"; do
|
|||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||
" \$ 0!~/External *\|/{next};"\
|
||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||
|
@ -6506,7 +6521,7 @@ ia64-*-hpux*)
|
|||
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*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
|
@ -6522,9 +6537,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
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"
|
||||
;;
|
||||
s390x-*linux*)
|
||||
|
@ -6543,7 +6568,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpcle-*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc-*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
|
@ -6606,7 +6634,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
|
|||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
sparc*-*solaris*)
|
||||
*-*solaris*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
|
@ -6617,7 +6645,20 @@ sparc*-*solaris*)
|
|||
case `/usr/bin/file conftest.o` in
|
||||
*64-bit*)
|
||||
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
|
||||
LD="${LD-ld} -64"
|
||||
|
@ -7257,7 +7298,13 @@ else
|
|||
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||
_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
|
||||
else
|
||||
cat conftest.err >&5
|
||||
|
@ -7268,6 +7315,7 @@ else
|
|||
fi
|
||||
{ $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 "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
|
||||
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
|
||||
if ${lt_cv_ld_exported_symbols_list+:} false; then :
|
||||
|
@ -7300,6 +7348,7 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||
fi
|
||||
{ $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 "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
|
||||
$as_echo_n "checking for -force_load linker flag... " >&6; }
|
||||
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
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||
_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
|
||||
else
|
||||
cat conftest.err >&5
|
||||
|
@ -7735,7 +7786,22 @@ fi
|
|||
|
||||
# Check whether --with-pic was given.
|
||||
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
|
||||
pic_mode=default
|
||||
fi
|
||||
|
@ -7808,6 +7874,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8268,7 +8338,9 @@ lt_prog_compiler_static=
|
|||
case $cc_basename in
|
||||
nvcc*) # Cuda Compiler Driver 2.2
|
||||
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
|
||||
else
|
||||
|
@ -8312,7 +8384,7 @@ lt_prog_compiler_static=
|
|||
lt_prog_compiler_static='-non_shared'
|
||||
;;
|
||||
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
# old Intel for x86_64 which still supported -KPIC.
|
||||
ecc*)
|
||||
|
@ -8359,18 +8431,33 @@ lt_prog_compiler_static=
|
|||
;;
|
||||
*)
|
||||
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
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
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 5.9
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
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
|
||||
|
@ -8732,7 +8819,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
|||
hardcode_direct=no
|
||||
hardcode_direct_absolute=no
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_flag_spec_ld=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_minus_L=no
|
||||
hardcode_shlibpath_var=unsupported
|
||||
|
@ -8985,8 +9071,7 @@ _LT_EOF
|
|||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
||||
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_flag_spec_ld='-rpath $libdir'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test "x$supports_anon_versioning" = xyes; then
|
||||
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.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
||||
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'
|
||||
# Don't use ranlib
|
||||
old_postinstall_cmds='chmod 644 $oldlib'
|
||||
|
@ -9411,6 +9497,7 @@ fi
|
|||
hardcode_shlibpath_var=unsupported
|
||||
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\"`'
|
||||
|
||||
else
|
||||
whole_archive_flag_spec=''
|
||||
fi
|
||||
|
@ -9439,10 +9526,6 @@ fi
|
|||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
|
@ -9494,7 +9577,6 @@ fi
|
|||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_flag_spec_ld='+b $libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_direct_absolute=yes
|
||||
|
@ -10112,11 +10194,6 @@ esac
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -10212,7 +10289,7 @@ need_version=unknown
|
|||
|
||||
case $host_os in
|
||||
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'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
|
@ -10221,7 +10298,7 @@ aix3*)
|
|||
;;
|
||||
|
||||
aix[4-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
|
@ -10286,7 +10363,7 @@ beos*)
|
|||
;;
|
||||
|
||||
bsdi[45]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
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'
|
||||
|
@ -10425,7 +10502,7 @@ darwin* | rhapsody*)
|
|||
;;
|
||||
|
||||
dgux*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
|
@ -10444,7 +10517,7 @@ freebsd* | dragonfly*)
|
|||
objformat=`/usr/bin/objformat`
|
||||
else
|
||||
case $host_os in
|
||||
freebsd[123]*) objformat=aout ;;
|
||||
freebsd[23].*) objformat=aout ;;
|
||||
*) objformat=elf ;;
|
||||
esac
|
||||
fi
|
||||
|
@ -10462,7 +10535,7 @@ freebsd* | dragonfly*)
|
|||
esac
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case $host_os in
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
freebsd3.[01]* | freebsdelf3.[01]*)
|
||||
|
@ -10481,19 +10554,8 @@ freebsd* | dragonfly*)
|
|||
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*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
dynamic_linker="$host_os runtime_loader"
|
||||
|
@ -10554,7 +10616,7 @@ hpux9* | hpux10* | hpux11*)
|
|||
;;
|
||||
|
||||
interix[3-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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 ;;
|
||||
*)
|
||||
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
|
||||
version_type=irix
|
||||
fi ;;
|
||||
|
@ -10607,9 +10669,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
|||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
version_type=linux
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -10703,7 +10765,7 @@ netbsd*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=yes
|
||||
|
@ -10772,7 +10834,7 @@ rdos*)
|
|||
;;
|
||||
|
||||
solaris*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -10797,7 +10859,7 @@ sunos4*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -10821,7 +10883,7 @@ sysv4 | sysv4.3*)
|
|||
|
||||
sysv4*MP*)
|
||||
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}'
|
||||
soname_spec='$libname${shared_ext}.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -10852,7 +10914,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
|||
|
||||
tpf*)
|
||||
# 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_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -10862,7 +10924,7 @@ tpf*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -11787,7 +11849,6 @@ export_dynamic_flag_spec_CXX=
|
|||
hardcode_direct_CXX=no
|
||||
hardcode_direct_absolute_CXX=no
|
||||
hardcode_libdir_flag_spec_CXX=
|
||||
hardcode_libdir_flag_spec_ld_CXX=
|
||||
hardcode_libdir_separator_CXX=
|
||||
hardcode_minus_L_CXX=no
|
||||
hardcode_shlibpath_var_CXX=unsupported
|
||||
|
@ -12371,6 +12432,7 @@ fi
|
|||
hardcode_shlibpath_var_CXX=unsupported
|
||||
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\"`'
|
||||
|
||||
else
|
||||
whole_archive_flag_spec_CXX=''
|
||||
fi
|
||||
|
@ -12415,7 +12477,7 @@ fi
|
|||
esac
|
||||
;;
|
||||
|
||||
freebsd[12]*)
|
||||
freebsd2.*)
|
||||
# C++ shared libraries reported to be fairly broken before
|
||||
# switch to ELF
|
||||
ld_shlibs_CXX=no
|
||||
|
@ -12431,9 +12493,6 @@ fi
|
|||
ld_shlibs_CXX=yes
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
link_all_deplibs_CXX=yes
|
||||
|
@ -12595,7 +12654,7 @@ fi
|
|||
inherit_rpath_CXX=yes
|
||||
;;
|
||||
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
@ -13091,6 +13150,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
|
|||
case "$CC $CFLAGS " in #(
|
||||
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
|
||||
esac
|
||||
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
|
@ -13454,7 +13514,7 @@ lt_prog_compiler_static_CXX=
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# KAI C++ Compiler
|
||||
|
@ -13880,7 +13940,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
|||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
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'
|
||||
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
|
||||
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'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
|
@ -14072,7 +14132,7 @@ aix3*)
|
|||
;;
|
||||
|
||||
aix[4-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
|
@ -14137,7 +14197,7 @@ beos*)
|
|||
;;
|
||||
|
||||
bsdi[45]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
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'
|
||||
|
@ -14274,7 +14334,7 @@ darwin* | rhapsody*)
|
|||
;;
|
||||
|
||||
dgux*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
|
@ -14293,7 +14349,7 @@ freebsd* | dragonfly*)
|
|||
objformat=`/usr/bin/objformat`
|
||||
else
|
||||
case $host_os in
|
||||
freebsd[123]*) objformat=aout ;;
|
||||
freebsd[23].*) objformat=aout ;;
|
||||
*) objformat=elf ;;
|
||||
esac
|
||||
fi
|
||||
|
@ -14311,7 +14367,7 @@ freebsd* | dragonfly*)
|
|||
esac
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case $host_os in
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
freebsd3.[01]* | freebsdelf3.[01]*)
|
||||
|
@ -14330,19 +14386,8 @@ freebsd* | dragonfly*)
|
|||
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*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
dynamic_linker="$host_os runtime_loader"
|
||||
|
@ -14403,7 +14448,7 @@ hpux9* | hpux10* | hpux11*)
|
|||
;;
|
||||
|
||||
interix[3-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
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 ;;
|
||||
*)
|
||||
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
|
||||
version_type=irix
|
||||
fi ;;
|
||||
|
@ -14456,9 +14501,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
|||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
version_type=linux
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -14552,7 +14597,7 @@ netbsd*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=yes
|
||||
|
@ -14621,7 +14666,7 @@ rdos*)
|
|||
;;
|
||||
|
||||
solaris*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -14646,7 +14691,7 @@ sunos4*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -14670,7 +14715,7 @@ sysv4 | sysv4.3*)
|
|||
|
||||
sysv4*MP*)
|
||||
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}'
|
||||
soname_spec='$libname${shared_ext}.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -14701,7 +14746,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
|||
|
||||
tpf*)
|
||||
# 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_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
|
@ -14711,7 +14756,7 @@ tpf*)
|
|||
;;
|
||||
|
||||
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}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
|
@ -14850,6 +14895,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_commands="$ac_config_commands libtool"
|
||||
|
||||
|
||||
|
@ -15787,13 +15834,13 @@ case "${host_os}" in
|
|||
$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"
|
||||
|
||||
if test "x$enable_mac_universal" = "xyes" ; then
|
||||
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
|
||||
mac_version_min="-mmacosx-version-min=10.3"
|
||||
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
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
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
|
||||
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
|
||||
esac
|
||||
|
||||
mac_arches=""
|
||||
for arch in i386 x86_64 ppc ppc64
|
||||
for arch in x86_64
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
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
|
||||
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"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
||||
#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
|
||||
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
||||
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
|
||||
;;
|
||||
|
||||
|
@ -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"`'
|
||||
SHELL='`$ECHO "$SHELL" | $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='`$ECHO "$host" | $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"`'
|
||||
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_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_direct='`$ECHO "$hardcode_direct" | $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"`'
|
||||
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_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_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"`'
|
||||
|
@ -17137,6 +17201,7 @@ DLLTOOL \
|
|||
OBJDUMP \
|
||||
SHELL \
|
||||
ECHO \
|
||||
PATH_SEPARATOR \
|
||||
SED \
|
||||
GREP \
|
||||
EGREP \
|
||||
|
@ -17185,7 +17250,6 @@ with_gnu_ld \
|
|||
allow_undefined_flag \
|
||||
no_undefined_flag \
|
||||
hardcode_libdir_flag_spec \
|
||||
hardcode_libdir_flag_spec_ld \
|
||||
hardcode_libdir_separator \
|
||||
exclude_expsyms \
|
||||
include_expsyms \
|
||||
|
@ -17219,7 +17283,6 @@ with_gnu_ld_CXX \
|
|||
allow_undefined_flag_CXX \
|
||||
no_undefined_flag_CXX \
|
||||
hardcode_libdir_flag_spec_CXX \
|
||||
hardcode_libdir_flag_spec_ld_CXX \
|
||||
hardcode_libdir_separator_CXX \
|
||||
exclude_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.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
|
@ -17822,6 +17885,9 @@ SHELL=$lt_SHELL
|
|||
# An echo program that protects backslashes.
|
||||
ECHO=$lt_ECHO
|
||||
|
||||
# The PATH separator for the build system.
|
||||
PATH_SEPARATOR=$lt_PATH_SEPARATOR
|
||||
|
||||
# The host system.
|
||||
host_alias=$host_alias
|
||||
host=$host
|
||||
|
@ -18117,10 +18183,6 @@ no_undefined_flag=$lt_no_undefined_flag
|
|||
# This must work even if \$libdir does not exist
|
||||
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.
|
||||
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
|
||||
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.
|
||||
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
|
||||
|
||||
|
|
|
@ -204,13 +204,13 @@ case "${host_os}" in
|
|||
|
||||
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"
|
||||
|
||||
if test "x$enable_mac_universal" = "xyes" ; then
|
||||
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 support -sdk, so we can't use that to look for
|
||||
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
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
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
|
||||
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
|
||||
esac
|
||||
|
||||
dnl Pick which architectures to build for based on what
|
||||
dnl the compiler supports.
|
||||
mac_arches=""
|
||||
for arch in i386 x86_64 ppc ppc64
|
||||
for arch in x86_64
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -arch $arch"
|
||||
|
@ -307,18 +325,18 @@ case "${host_os}" in
|
|||
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"
|
||||
|
||||
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 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 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"
|
||||
|
||||
|
||||
CXXFLAGS="$CFLAGS"
|
||||
fi
|
||||
|
||||
if [[ "x$with_wdmks" = "xyes" ]]; then
|
||||
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"
|
||||
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
||||
#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
|
||||
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
||||
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
|
||||
;;
|
||||
|
||||
|
@ -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
|
||||
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"
|
||||
|
||||
dnl SGI books say -lpthread should be the last of the libs mentioned.
|
||||
|
@ -385,7 +403,7 @@ case "${host_os}" in
|
|||
dnl Unix configuration
|
||||
|
||||
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
|
||||
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
|
||||
AC_MSG_ERROR([libpthread not found!]))
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# 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
|
||||
# Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
|
@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
@ -40,11 +39,11 @@ as side-effects.
|
|||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
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).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
|
@ -57,6 +56,66 @@ EOF
|
|||
;;
|
||||
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
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
|
@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# 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
|
||||
|
@ -80,18 +142,32 @@ if test "$depmode" = hp; then
|
|||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp 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=msvisualcpp
|
||||
# This is just like msvisualcpp 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=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
|
||||
|
||||
case "$depmode" in
|
||||
|
@ -114,8 +190,7 @@ gcc3)
|
|||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -123,13 +198,17 @@ gcc3)
|
|||
;;
|
||||
|
||||
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
|
||||
## why we pick this rather obscure method:
|
||||
## - 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.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - 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
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
|
@ -137,31 +216,31 @@ gcc)
|
|||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-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
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## 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
|
||||
## 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
|
||||
## 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"
|
||||
;;
|
||||
|
||||
|
@ -179,8 +258,7 @@ sgi)
|
|||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -188,43 +266,41 @@ sgi)
|
|||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# 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
|
||||
# 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;
|
||||
# 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.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
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)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# 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.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
|
@ -237,9 +313,7 @@ aix)
|
|||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -248,44 +322,100 @@ aix)
|
|||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# 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:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# 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
|
||||
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"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# 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 ... \
|
||||
# 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"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# 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"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -297,8 +427,8 @@ icc)
|
|||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -309,9 +439,8 @@ hp2)
|
|||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
|
@ -322,8 +451,7 @@ hp2)
|
|||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -333,77 +461,107 @@ hp2)
|
|||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# 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
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# 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
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# 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
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# 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
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
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)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
|
@ -422,7 +580,7 @@ dashmstdout)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -442,18 +600,18 @@ dashmstdout)
|
|||
done
|
||||
|
||||
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:
|
||||
# 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 |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -503,12 +661,15 @@ makedepend)
|
|||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# 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 the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
|
@ -525,7 +686,7 @@ cpp)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -544,10 +705,10 @@ cpp)
|
|||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
|
@ -579,23 +740,23 @@ msvisualcpp)
|
|||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
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
|
||||
|
||||
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().
|
||||
|
||||
|
|
|
@ -8,16 +8,16 @@ The library provides functions that allow your software to acquire and output re
|
|||
|
||||
@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
|
||||
|
||||
- @ref tutorial_start<br>
|
||||
- @ref tutorial_start <br>
|
||||
Get started writing code with PortAudio tutorials
|
||||
|
||||
- @ref examples_src "Examples"<br>
|
||||
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.
|
||||
|
||||
|
||||
|
@ -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://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>
|
||||
|
||||
- @ref java_binding<br>
|
||||
Documentation for the Java JNI interface to PortAudio
|
||||
- <a href="https://github.com/PortAudio/portaudio/wiki">The PortAudio wiki</a>
|
||||
|
||||
@section developer_resources Developer Resources
|
||||
|
||||
|
@ -47,16 +44,20 @@ Documentation for the Java JNI interface to PortAudio
|
|||
- @ref srcguide
|
||||
@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
|
||||
|
||||
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
|
||||
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
||||
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:
|
||||
a. The <b>source files</b> directory (<i>"Where is the source code"</i>) is where the portaudio CMakeLists.txt file is located.
|
||||
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
|
||||
source files tree (a so called "out-of-source build")
|
||||
build_path> {portaudio path}/configure --prefix=/install_location
|
||||
build_path> make
|
||||
build_path> make install
|
||||
|
||||
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:
|
||||
|
||||
@code
|
||||
make install
|
||||
sudo make install
|
||||
@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:
|
||||
|
@ -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
|
||||
@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
|
||||
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
|
||||
|
||||
@section comp_linux4 Linux Extensions
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
|
||||
@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 =
|
||||
|
||||
|
@ -50,4 +53,4 @@ To update your copy or check out a fresh copy of the source
|
|||
|
||||
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;
|
||||
@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.
|
||||
|
||||
|
|
|
@ -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_mingw
|
||||
- \ref compile_windows_asio_msvc
|
||||
- \ref compile_cmake
|
||||
- Mac OS X
|
||||
- \ref compile_mac_coreaudio
|
||||
- POSIX
|
||||
- \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.
|
||||
|
||||
@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 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
|
||||
|
||||
|
@ -55,4 +58,4 @@ Once you have a basic understanding of how to use PortAudio, you might be intere
|
|||
|
||||
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.
|
||||
##
|
||||
## 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
|
||||
# extensions. ignore .svn directories. return absolute paths
|
||||
def recursiveFindFiles( top, extensions, includePaths ):
|
||||
def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):
|
||||
result = []
|
||||
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:
|
||||
if os.path.splitext(f)[1] in extensions:
|
||||
if includePaths:
|
||||
|
@ -41,8 +50,9 @@ def doxygenHtmlDocFileName( sourceFile ):
|
|||
return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'
|
||||
|
||||
|
||||
sourceFiles = recursiveFindFiles( paRootDirectory, [ '.c', '.h', '.cpp' ], True );
|
||||
docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], False );
|
||||
sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );
|
||||
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
|
||||
#define PA_ASIO_H
|
||||
/*
|
||||
* $Id: pa_asio.h 1667 2011-05-02 15:49:20Z rossb $
|
||||
* $Id$
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* ASIO specific extensions
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ extern "C"
|
|||
#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 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 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.
|
||||
|
||||
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#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
|
||||
* ALSA-specific extensions
|
||||
*
|
||||
|
|
|
@ -112,20 +112,20 @@ AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s );
|
|||
* Returns a statically allocated string with the device's name
|
||||
* 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 channel The channel number who's name is requested.
|
||||
* @return a statically allocated string with the name of the device.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
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 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. */
|
||||
#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.*/
|
||||
#define paMacCoreConversionQualityMin (0x0100)
|
||||
#define paMacCoreConversionQualityMedium (0x0200)
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
/*
|
||||
* $Id: $
|
||||
* 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
|
||||
* 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:
|
||||
*
|
||||
* Any person wishing to distribute modifications to the Software is
|
||||
* requested to send the modifications to the original developer so that
|
||||
* they can be incorporated into the canonical version. It is also
|
||||
* requested that these non-binding requests be included along with the
|
||||
* they can be incorporated into the canonical version. It is also
|
||||
* requested that these non-binding requests be included along with the
|
||||
* license above.
|
||||
*/
|
||||
|
||||
|
@ -52,26 +54,37 @@ extern "C"
|
|||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* Setup flags */
|
||||
/* Stream setup flags. */
|
||||
typedef enum PaWasapiFlags
|
||||
{
|
||||
/* puts WASAPI into exclusive mode */
|
||||
/* put WASAPI into exclusive mode */
|
||||
paWinWasapiExclusive = (1 << 0),
|
||||
|
||||
/* allows to skip internal PA processing completely */
|
||||
/* allow to skip internal PA processing completely */
|
||||
paWinWasapiRedirectHostProcessor = (1 << 1),
|
||||
|
||||
/* assigns custom channel mask */
|
||||
/* assign custom channel mask */
|
||||
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
|
||||
method can only provide 15-20ms latency. */
|
||||
paWinWasapiPolling = (1 << 3),
|
||||
|
||||
/* forces custom thread priority setting. must be used if PaWasapiStreamInfo::threadPriority
|
||||
is set to custom value. */
|
||||
paWinWasapiThreadPriority = (1 << 4)
|
||||
/* force custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority
|
||||
is set to a custom value */
|
||||
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;
|
||||
#define paWinWasapiExclusive (paWinWasapiExclusive)
|
||||
|
@ -79,19 +92,68 @@ PaWasapiFlags;
|
|||
#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)
|
||||
#define paWinWasapiPolling (paWinWasapiPolling)
|
||||
#define paWinWasapiThreadPriority (paWinWasapiThreadPriority)
|
||||
#define paWinWasapiExplicitSampleFormat (paWinWasapiExplicitSampleFormat)
|
||||
#define paWinWasapiAutoConvert (paWinWasapiAutoConvert)
|
||||
|
||||
|
||||
/* Host processor. Allows to skip internal PA processing completely.
|
||||
You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
|
||||
in order to have host processor redirected to your callback.
|
||||
Use with caution! inputFrames and outputFrames depend solely on final device setup.
|
||||
To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
|
||||
/* Stream state.
|
||||
|
||||
@note Multiple states can be united into a bitmask.
|
||||
@see PaWasapiStreamStateCallback, PaWasapi_SetStreamStateHandler
|
||||
*/
|
||||
typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,
|
||||
void *outputBuffer, long outputFrames,
|
||||
void *userData);
|
||||
typedef enum PaWasapiStreamState
|
||||
{
|
||||
/* 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
|
||||
{
|
||||
eRoleRemoteNetworkDevice = 0,
|
||||
|
@ -109,7 +171,7 @@ typedef enum PaWasapiDeviceRole
|
|||
PaWasapiDeviceRole;
|
||||
|
||||
|
||||
/* Jack connection type */
|
||||
/* Jack connection type. */
|
||||
typedef enum PaWasapiJackConnectionType
|
||||
{
|
||||
eJackConnTypeUnknown,
|
||||
|
@ -124,14 +186,14 @@ typedef enum PaWasapiJackConnectionType
|
|||
eJackConnTypeXlrProfessional,
|
||||
eJackConnTypeRJ11Modem,
|
||||
eJackConnTypeCombination
|
||||
}
|
||||
}
|
||||
PaWasapiJackConnectionType;
|
||||
|
||||
|
||||
/* Jack geometric location */
|
||||
/* Jack geometric location. */
|
||||
typedef enum PaWasapiJackGeoLocation
|
||||
{
|
||||
eJackGeoLocUnk = 0,
|
||||
eJackGeoLocUnk = 0,
|
||||
eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
|
||||
eJackGeoLocFront,
|
||||
eJackGeoLocLeft,
|
||||
|
@ -147,37 +209,37 @@ typedef enum PaWasapiJackGeoLocation
|
|||
eJackGeoLocATAPI,
|
||||
eJackGeoLocReserved5,
|
||||
eJackGeoLocReserved6,
|
||||
}
|
||||
}
|
||||
PaWasapiJackGeoLocation;
|
||||
|
||||
|
||||
/* Jack general location */
|
||||
/* Jack general location. */
|
||||
typedef enum PaWasapiJackGenLocation
|
||||
{
|
||||
eJackGenLocPrimaryBox = 0,
|
||||
eJackGenLocInternal,
|
||||
eJackGenLocSeparate,
|
||||
eJackGenLocOther
|
||||
}
|
||||
}
|
||||
PaWasapiJackGenLocation;
|
||||
|
||||
|
||||
/* Jack's type of port */
|
||||
/* Jack's type of port. */
|
||||
typedef enum PaWasapiJackPortConnection
|
||||
{
|
||||
eJackPortConnJack = 0,
|
||||
eJackPortConnIntegratedDevice,
|
||||
eJackPortConnBothIntegratedAndJack,
|
||||
eJackPortConnUnknown
|
||||
}
|
||||
}
|
||||
PaWasapiJackPortConnection;
|
||||
|
||||
|
||||
/* Thread priority */
|
||||
/* Thread priority. */
|
||||
typedef enum PaWasapiThreadPriority
|
||||
{
|
||||
eThreadPriorityNone = 0,
|
||||
eThreadPriorityAudio, //!< Default for Shared mode.
|
||||
eThreadPriorityAudio, //!< Default for Shared mode.
|
||||
eThreadPriorityCapture,
|
||||
eThreadPriorityDistribution,
|
||||
eThreadPriorityGames,
|
||||
|
@ -189,7 +251,7 @@ PaWasapiThreadPriority;
|
|||
|
||||
|
||||
/* Stream descriptor. */
|
||||
typedef struct PaWasapiJackDescription
|
||||
typedef struct PaWasapiJackDescription
|
||||
{
|
||||
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))) */
|
||||
|
@ -202,8 +264,48 @@ typedef struct 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. */
|
||||
typedef struct PaWasapiStreamInfo
|
||||
typedef struct PaWasapiStreamInfo
|
||||
{
|
||||
unsigned long size; /**< sizeof(PaWasapiStreamInfo) */
|
||||
PaHostApiTypeId hostApiType; /**< paWASAPI */
|
||||
|
@ -211,23 +313,23 @@ typedef struct PaWasapiStreamInfo
|
|||
|
||||
unsigned long flags; /**< collection of PaWasapiFlags */
|
||||
|
||||
/* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
|
||||
paWinWasapiUseChannelMask this allows you to specify which speakers
|
||||
/** Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
|
||||
paWinWasapiUseChannelMask this allows you to specify which speakers
|
||||
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.
|
||||
*/
|
||||
PaWinWaveFormatChannelMask channelMask;
|
||||
|
||||
/* Delivers raw data to callback obtained from GetBuffer() methods skipping
|
||||
internal PortAudio processing inventory completely. userData parameter will
|
||||
be the same that was passed to Pa_OpenStream method. Will be used only if
|
||||
/** Delivers raw data to callback obtained from GetBuffer() methods skipping
|
||||
internal PortAudio processing inventory completely. userData parameter will
|
||||
be the same that was passed to Pa_OpenStream method. Will be used only if
|
||||
paWinWasapiRedirectHostProcessor flag is specified.
|
||||
*/
|
||||
PaWasapiHostProcessorCallback hostProcessorOutput;
|
||||
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.
|
||||
|
||||
Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
|
||||
|
@ -235,103 +337,270 @@ typedef struct PaWasapiStreamInfo
|
|||
to setup thread priority.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
/** Returns default sound format for device. Format is represented by PaWinWaveFormat or
|
||||
WAVEFORMATEXTENSIBLE structure.
|
||||
/** Returns pointer to WASAPI's IAudioClient object of the stream.
|
||||
|
||||
@param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
|
||||
@param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
|
||||
@param nDevice Device index.
|
||||
@param pStream Pointer to PaStream object.
|
||||
@param pAudioClient Pointer to pointer of IAudioClient.
|
||||
@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
|
||||
or, a PaErrorCode (which are always negative) if PortAudio is not initialized
|
||||
@return Error code indicating success or failure.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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
|
||||
which makes calls to Pa_WriteStream/Pa_ReadStream.
|
||||
/** Boost thread priority of calling thread (MMCSS).
|
||||
|
||||
@param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
|
||||
method to revert thread priority to initial state.
|
||||
Use it for Blocking Interface only inside the thread which makes calls to Pa_WriteStream/Pa_ReadStream.
|
||||
|
||||
@param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying
|
||||
eThreadPriorityNone does nothing.
|
||||
@param pTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
|
||||
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.
|
||||
@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
|
||||
which makes calls to Pa_WriteStream/Pa_ReadStream.
|
||||
/** Boost thread priority of calling thread (MMCSS).
|
||||
|
||||
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.
|
||||
@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
|
||||
can be locked for operations. Use this method as helper to findout maximal values of
|
||||
inputFrames/outputFrames of PaWasapiHostProcessorCallback.
|
||||
/** Get number of frames per host buffer.
|
||||
|
||||
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.
|
||||
@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
|
||||
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.
|
||||
@param nDevice device index.
|
||||
@param jcount Number of jacks is returned in this variable
|
||||
@return Error code indicating success or failure
|
||||
@see PaWasapi_GetJackDescription
|
||||
/** Get number of jacks associated with a WASAPI device.
|
||||
|
||||
Use this method to determine if 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.
|
||||
|
||||
@note Not available on UWP platform.
|
||||
|
||||
@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
|
||||
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
|
||||
description.
|
||||
@param nDevice device index.
|
||||
@param jindex Which jack to return information
|
||||
@param KSJACK_DESCRIPTION This structure filled in on success.
|
||||
@return Error code indicating success or failure
|
||||
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
|
||||
description.
|
||||
|
||||
@note Not available on UWP platform.
|
||||
|
||||
@param device Device index.
|
||||
@param jackIndex Jack index.
|
||||
@param pJackDescription Pointer to PaWasapiJackDescription.
|
||||
|
||||
@return Error code indicating success or failure.
|
||||
@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:
|
||||
|
||||
WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
|
||||
share modes.
|
||||
|
||||
share modes.
|
||||
|
||||
Exclusive Mode:
|
||||
|
||||
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:
|
||||
|
||||
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:
|
||||
|
||||
1) Event-Driven:
|
||||
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
|
||||
3 ms for HD Audio class audio chips. For the Shared mode latency can not be
|
||||
lower than 20 ms.
|
||||
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
|
||||
lower than 20 ms.
|
||||
|
||||
2) Poll-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
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
Thread priority:
|
||||
|
||||
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'
|
||||
flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority
|
||||
flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority
|
||||
enum.
|
||||
|
||||
Blocking Interface:
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
To check format with correct Share Mode (Exclusive/Shared) you must supply
|
||||
PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
|
||||
PaStreamParameters::hostApiSpecificStreamInfo structure.
|
||||
To check format with correct Share Mode (Exclusive/Shared) you must supply PaWasapiStreamInfo
|
||||
with flags paWinWasapiExclusive set through member of PaStreamParameters::hostApiSpecificStreamInfo
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* PA_WIN_WASAPI_H */
|
||||
#endif /* PA_WIN_WASAPI_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* WDM/KS specific extensions
|
||||
*
|
||||
|
@ -53,14 +53,20 @@ extern "C"
|
|||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Setup flags */
|
||||
/** Flags to indicate valid fields in PaWinWDMKSInfo.
|
||||
@see PaWinWDMKSInfo
|
||||
@version Available as of 19.5.0.
|
||||
*/
|
||||
typedef enum PaWinWDMKSFlags
|
||||
{
|
||||
/* Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
|
||||
by the WaveCyclic device. Use at own risk! */
|
||||
/** Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
|
||||
by the WaveCyclic device. Use at own risk!
|
||||
*/
|
||||
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),
|
||||
|
||||
} PaWinWDMKSFlags;
|
||||
|
@ -69,11 +75,20 @@ extern "C"
|
|||
unsigned long size; /**< sizeof(PaWinWDMKSInfo) */
|
||||
PaHostApiTypeId hostApiType; /**< paWDMKS */
|
||||
unsigned long version; /**< 1 */
|
||||
|
||||
/** Flags indicate which fields are valid.
|
||||
@see PaWinWDMKSFlags
|
||||
@version Available as of 19.5.0.
|
||||
*/
|
||||
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;
|
||||
/* 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;
|
||||
} PaWinWDMKSInfo;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* MME specific extensions
|
||||
*
|
||||
|
@ -109,7 +109,7 @@ typedef struct PaWinMmeStreamInfo{
|
|||
If devices are specified here, the corresponding device parameter
|
||||
to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,
|
||||
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
|
||||
Pa_OpenStream() otherwise a paInvalidChannelCount error will result.
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PORTAUDIO_H
|
||||
#define PORTAUDIO_H
|
||||
/*
|
||||
* $Id: portaudio.h 1953 2015-04-10 04:00:09Z philburk $
|
||||
* $Id$
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* PortAudio API Header File
|
||||
* Latest version available at: http://www.portaudio.com/
|
||||
|
@ -51,51 +51,68 @@ extern "C"
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/** 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 );
|
||||
|
||||
/** Retrieve a textual description of the current PortAudio build,
|
||||
* eg "PortAudio V19.5.0-devel, revision 1952M".
|
||||
* The format of the text may change so do not try to parse the returned string.
|
||||
* @deprecated use PaVersionInfo() instead
|
||||
*/
|
||||
e.g. "PortAudio V19.5.0-devel, revision 1952M".
|
||||
The format of the text may change in the future. Do not try to parse the
|
||||
returned string.
|
||||
|
||||
@deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.
|
||||
*/
|
||||
const char* Pa_GetVersionText( void );
|
||||
|
||||
/**
|
||||
* Generate a packed integer version number in the same format used
|
||||
* by Pa_GetVersion(). Use this to compare a specified version number with
|
||||
* the currently running version. For example:
|
||||
*
|
||||
* if (Pa_GetVersion() < paMakeVersionNumber(19,5,1)) {}
|
||||
*/
|
||||
Generate a packed integer version number in the same format used
|
||||
by Pa_GetVersion(). Use this to compare a specified version number with
|
||||
the currently running version. For example:
|
||||
|
||||
@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) \
|
||||
(((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 {
|
||||
int versionMajor;
|
||||
int versionMinor;
|
||||
int versionSubMinor;
|
||||
/**
|
||||
* This is currently the SVN revision but may change in the future.
|
||||
* The versionControlRevision is updated by running a script before compiling code.
|
||||
* If the update does not occur then this value may be less
|
||||
* than the actual SVN revision number.
|
||||
*/
|
||||
This is currently the Git revision hash but may change in the future.
|
||||
The versionControlRevision is updated by running a script before compiling the library.
|
||||
If the update does not occur, this value may refer to an earlier revision.
|
||||
*/
|
||||
const char *versionControlRevision;
|
||||
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
|
||||
const char *versionText;
|
||||
} PaVersionInfo;
|
||||
|
||||
/**
|
||||
* The structure that this points to is statically allocated.
|
||||
* Do not attempt to free it or modify it.
|
||||
*/
|
||||
const PaVersionInfo* Pa_GetVersionInfo();
|
||||
/** Retrieve version information for the currently running PortAudio build.
|
||||
@return A pointer to an immutable PaVersionInfo structure.
|
||||
|
||||
@note This function can be called at any time. It does not require PortAudio
|
||||
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.
|
||||
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).
|
||||
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
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
@param stream A pointer to an open stream previously created with Pa_OpenStream.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
|
@ -156,6 +156,10 @@ while test $# -ne 0; do
|
|||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -194,13 +202,17 @@ if test $# -eq 0; then
|
|||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
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.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
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.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
|
@ -228,9 +240,9 @@ fi
|
|||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
|
@ -252,12 +264,7 @@ do
|
|||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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 double slashes aren't ignored.
|
||||
|
@ -347,7 +354,7 @@ do
|
|||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# 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.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
|
@ -385,7 +392,7 @@ do
|
|||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
|
@ -403,7 +410,7 @@ do
|
|||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
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
|
||||
|
||||
# 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
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
|||
# --quiet, --silent don't print informational messages
|
||||
# --no-quiet, --no-silent
|
||||
# print informational messages (default)
|
||||
# --no-warn don't display warning messages
|
||||
# --tag=TAG use configuration variables from tag TAG
|
||||
# -v, --verbose print more informational messages than default
|
||||
# --no-verbose don't print the extra informational messages
|
||||
|
@ -69,7 +70,7 @@
|
|||
# compiler: $LTCC
|
||||
# compiler flags: $LTCFLAGS
|
||||
# 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
|
||||
# autoconf: $autoconf_version
|
||||
#
|
||||
|
@ -79,9 +80,9 @@
|
|||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION="2.4 Debian-2.4-2ubuntu1"
|
||||
VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
|
||||
TIMESTAMP=""
|
||||
package_revision=1.3293
|
||||
package_revision=1.3337
|
||||
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
|
@ -136,15 +137,10 @@ progpath="$0"
|
|||
|
||||
: ${CP="cp -f"}
|
||||
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"}
|
||||
: ${MKDIR="mkdir"}
|
||||
: ${MV="mv -f"}
|
||||
: ${RM="rm -f"}
|
||||
: ${SED="/bin/sed"}
|
||||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
|
||||
: ${Xsed="$SED -e 1s/^X//"}
|
||||
|
||||
|
@ -193,7 +189,7 @@ func_basename ()
|
|||
# to NONDIR_REPLACEMENT.
|
||||
# value returned in "$func_dirname_result"
|
||||
# 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
|
||||
# and func_basename. For efficiency, we do not delegate to
|
||||
# those functions but instead duplicate the functionality here.
|
||||
|
@ -387,7 +383,7 @@ case $progpath in
|
|||
;;
|
||||
*)
|
||||
save_IFS="$IFS"
|
||||
IFS=:
|
||||
IFS=${PATH_SEPARATOR-:}
|
||||
for progdir in $PATH; do
|
||||
IFS="$save_IFS"
|
||||
test -x "$progdir/$progname" && break
|
||||
|
@ -771,8 +767,8 @@ func_help ()
|
|||
s*\$LTCFLAGS*'"$LTCFLAGS"'*
|
||||
s*\$LD*'"$LD"'*
|
||||
s/\$with_gnu_ld/'"$with_gnu_ld"'/
|
||||
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
|
||||
p
|
||||
d
|
||||
}
|
||||
|
@ -1052,6 +1048,7 @@ opt_finish=false
|
|||
opt_help=false
|
||||
opt_help_all=false
|
||||
opt_silent=:
|
||||
opt_warning=:
|
||||
opt_verbose=:
|
||||
opt_silent=false
|
||||
opt_verbose=false
|
||||
|
@ -1118,6 +1115,10 @@ esac
|
|||
;;
|
||||
--no-silent|--no-quiet)
|
||||
opt_silent=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-warning|--no-warn)
|
||||
opt_warning=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-verbose)
|
||||
|
@ -2059,7 +2060,7 @@ func_mode_compile ()
|
|||
*.[cCFSifmso] | \
|
||||
*.ada | *.adb | *.ads | *.asm | \
|
||||
*.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"
|
||||
libobj=$func_xform_result
|
||||
;;
|
||||
|
@ -3201,11 +3202,13 @@ func_mode_install ()
|
|||
|
||||
# Set up the ranlib parameters.
|
||||
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 $?'
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
# pic_flag when linking with -static. The problem exists in
|
||||
# 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" ;;
|
||||
*-*-hpux*)
|
||||
pic_flag_for_symtable=" $pic_flag" ;;
|
||||
|
@ -3982,14 +3985,17 @@ func_exec_program_core ()
|
|||
# launches target application with the remaining arguments.
|
||||
func_exec_program ()
|
||||
{
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
case \" \$* \" in
|
||||
*\\ --lt-*)
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done ;;
|
||||
esac
|
||||
func_exec_program_core \${1+\"\$@\"}
|
||||
}
|
||||
|
||||
|
@ -4388,7 +4394,7 @@ EOF
|
|||
{
|
||||
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
|
||||
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
|
||||
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
|
||||
namespace. The first time any user complains about this, we'll
|
||||
|
@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
|
|||
{
|
||||
EOF
|
||||
func_emit_wrapper yes |
|
||||
$SED -e 's/\([\\"]\)/\\\1/g' \
|
||||
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
|
||||
|
||||
$SED -n -e '
|
||||
s/^\(.\{79\}\)\(..*\)/\1\
|
||||
\2/
|
||||
h
|
||||
s/\([\\"]\)/\\\1/g
|
||||
s/$/\\n/
|
||||
s/\([^\n]*\).*/ fputs ("\1", f);/p
|
||||
g
|
||||
D'
|
||||
cat <<"EOF"
|
||||
}
|
||||
EOF
|
||||
|
@ -5643,7 +5655,8 @@ func_mode_link ()
|
|||
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 compile_command " $arg"
|
||||
func_append finalize_command " $arg"
|
||||
|
@ -6150,7 +6163,8 @@ func_mode_link ()
|
|||
lib=
|
||||
found=no
|
||||
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
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
|
@ -6834,7 +6848,7 @@ func_mode_link ()
|
|||
test "$hardcode_direct_absolute" = no; then
|
||||
add="$dir/$linklib"
|
||||
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.
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
case $libdir in
|
||||
|
@ -7319,6 +7333,7 @@ func_mode_link ()
|
|||
# which has an extra 1 added just for fun
|
||||
#
|
||||
case $version_type in
|
||||
# correct linux to gnu/linux during the next big refactor
|
||||
darwin|linux|osf|windows|none)
|
||||
func_arith $number_major + $number_minor
|
||||
current=$func_arith_result
|
||||
|
@ -7438,7 +7453,7 @@ func_mode_link ()
|
|||
versuffix="$major.$revision"
|
||||
;;
|
||||
|
||||
linux)
|
||||
linux) # correct to gnu/linux during the next big refactor
|
||||
func_arith $current - $age
|
||||
major=.$func_arith_result
|
||||
versuffix="$major.$age.$revision"
|
||||
|
@ -8026,6 +8041,11 @@ EOF
|
|||
|
||||
# Test again, we may have decided not to build it any more
|
||||
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
|
||||
# Hardcode the library paths
|
||||
hardcode_libdirs=
|
||||
|
@ -8056,7 +8076,7 @@ EOF
|
|||
elif test -n "$runpath_var"; then
|
||||
case "$perm_rpath " in
|
||||
*" $libdir "*) ;;
|
||||
*) func_apped perm_rpath " $libdir" ;;
|
||||
*) func_append perm_rpath " $libdir" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
@ -8064,11 +8084,7 @@ EOF
|
|||
if test -n "$hardcode_libdir_separator" &&
|
||||
test -n "$hardcode_libdirs"; then
|
||||
libdir="$hardcode_libdirs"
|
||||
if test -n "$hardcode_libdir_flag_spec_ld"; then
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
|
||||
else
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
||||
fi
|
||||
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
|
||||
fi
|
||||
if test -n "$runpath_var" && test -n "$perm_rpath"; then
|
||||
# We should set the runpath_var.
|
||||
|
@ -9158,6 +9174,8 @@ EOF
|
|||
esac
|
||||
done
|
||||
fi
|
||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||
tool_oldlib=$func_to_tool_file_result
|
||||
eval cmds=\"$old_archive_cmds\"
|
||||
|
||||
func_len " $cmds"
|
||||
|
@ -9267,7 +9285,8 @@ EOF
|
|||
*.la)
|
||||
func_basename "$deplib"
|
||||
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" && \
|
||||
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
||||
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#! /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,
|
||||
# 2008, 2009 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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
|
||||
|
@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
|
|||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
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
|
||||
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
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && 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
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help 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:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
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]
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
|
@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
|
|||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
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*)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
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
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# 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
|
||||
* Portable Audio Blocking Input/Output utility.
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@ extern "C"
|
|||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* $Id: pablio.h 1854 2012-07-09 15:53:00Z philburk $
|
||||
* $Id$
|
||||
* PABLIO.h
|
||||
* 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
|
||||
* Read input from one stream and write it to another.
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ int main(void)
|
|||
|
||||
error:
|
||||
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 message: %s\n", Pa_GetErrorText( err ) );
|
||||
return -1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: test_rw_echo.c 1083 2006-08-23 07:30:49Z rossb $
|
||||
* $Id$
|
||||
* test_rw_echo.c
|
||||
* Echo delayed input to output.
|
||||
*
|
||||
|
@ -122,7 +122,7 @@ int main(void)
|
|||
return 0;
|
||||
|
||||
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 message: %s\n", Pa_GetErrorText( err ) );
|
||||
return -1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: test_w_saw.c 1083 2006-08-23 07:30:49Z rossb $
|
||||
* $Id$
|
||||
* test_w_saw.c
|
||||
* Generate stereo sawtooth waveforms.
|
||||
*
|
||||
|
@ -107,7 +107,7 @@ int main(void)
|
|||
return 0;
|
||||
|
||||
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 message: %s\n", Pa_GetErrorText( err ) );
|
||||
return -1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: test_w_saw8.c 1083 2006-08-23 07:30:49Z rossb $
|
||||
* $Id$
|
||||
* test_w_saw8.c
|
||||
* Generate stereo 8 bit sawtooth waveforms.
|
||||
*
|
||||
|
@ -105,7 +105,7 @@ int main(void)
|
|||
return 0;
|
||||
|
||||
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 message: %s\n", Pa_GetErrorText( err ) );
|
||||
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
|
||||
* memory allocation group for tracking allocation groups
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* memory allocation context for tracking allocation groups
|
||||
*
|
||||
|
@ -49,7 +49,7 @@
|
|||
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
|
||||
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
|
||||
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
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
@ -1325,7 +1325,7 @@ static void Int16_To_Float32(
|
|||
|
||||
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;
|
||||
|
||||
src += sourceStride;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
*
|
||||
* 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
|
||||
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
|
||||
formats.
|
||||
@param format The desired format.
|
||||
|
@ -211,7 +211,7 @@ typedef struct{
|
|||
PaUtil_SelectConverter() uses this table to lookup the appropriate
|
||||
conversion functions. The fields of this structure are initialized
|
||||
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
|
||||
these fields.
|
||||
|
||||
|
@ -242,7 +242,7 @@ typedef struct{
|
|||
/** A table of pointers to all required zeroer functions.
|
||||
PaUtil_SelectZeroer() uses this table to lookup the appropriate
|
||||
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
|
||||
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 CPU load measurement facility.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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 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)
|
||||
*/
|
||||
#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
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
*
|
||||
* Based on the Open Source API proposed by Ross Bencina
|
||||
|
@ -54,7 +54,7 @@
|
|||
example.
|
||||
|
||||
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 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( PA_LITTLE_ENDIAN )
|
||||
#define PA_LITTLE_ENDIAN
|
||||
|
@ -83,7 +83,7 @@ extern "C"
|
|||
#endif
|
||||
#else
|
||||
/* 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)
|
||||
/* 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
|
||||
* 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:
|
||||
*
|
||||
* Any person wishing to distribute modifications to the Software is
|
||||
* requested to send the modifications to the original developer so that
|
||||
* they can be incorporated into the canonical version. It is also
|
||||
* requested that these non-binding requests be included along with the
|
||||
* they can be incorporated into the canonical version. It is also
|
||||
* requested that these non-binding requests be included along with the
|
||||
* license above.
|
||||
*/
|
||||
|
||||
/** @file
|
||||
@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.
|
||||
|
||||
Implements the functions defined in the PortAudio API (portaudio.h),
|
||||
validates some parameters and checks for state inconsistencies before
|
||||
forwarding API requests to specific Host API implementations (via the
|
||||
interface declared in pa_hostapi.h), and Streams (via the interface
|
||||
|
||||
Implements the functions defined in the PortAudio API (portaudio.h),
|
||||
validates some parameters and checks for state inconsistencies before
|
||||
forwarding API requests to specific Host API implementations (via the
|
||||
interface declared in pa_hostapi.h), and Streams (via the interface
|
||||
declared in pa_stream.h).
|
||||
|
||||
This file manages initialization and termination of Host API
|
||||
|
@ -74,11 +74,11 @@
|
|||
#include "pa_types.h"
|
||||
#include "pa_hostapi.h"
|
||||
#include "pa_stream.h"
|
||||
#include "pa_trace.h" /* still usefull?*/
|
||||
#include "pa_trace.h" /* still useful?*/
|
||||
#include "pa_debugprint.h"
|
||||
|
||||
#ifndef PA_SVN_REVISION
|
||||
#include "pa_svnrevision.h"
|
||||
#ifndef PA_GIT_REVISION
|
||||
#include "pa_gitrevision.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -91,7 +91,7 @@
|
|||
* This is incremented when we add functionality in a backwards-compatible manner.
|
||||
* 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.
|
||||
|
@ -101,7 +101,7 @@
|
|||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
#define paVersion paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor)
|
||||
|
@ -110,7 +110,7 @@
|
|||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
||||
#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 )
|
||||
{
|
||||
|
@ -123,14 +123,14 @@ const char* Pa_GetVersionText( void )
|
|||
}
|
||||
|
||||
static PaVersionInfo versionInfo_ = {
|
||||
.versionMajor = paVersionMajor,
|
||||
.versionMinor = paVersionMinor,
|
||||
.versionSubMinor = paVersionSubMinor,
|
||||
.versionControlRevision = TOSTRING(PA_SVN_REVISION),
|
||||
.versionText = PA_VERSION_TEXT_
|
||||
/*.versionMajor =*/ paVersionMajor,
|
||||
/*.versionMinor =*/ paVersionMinor,
|
||||
/*.versionSubMinor =*/ paVersionSubMinor,
|
||||
/*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),
|
||||
/*.versionText =*/ PA_VERSION_TEXT_
|
||||
};
|
||||
|
||||
const PaVersionInfo* Pa_GetVersionInfo()
|
||||
const PaVersionInfo* Pa_GetVersionInfo( void )
|
||||
{
|
||||
return &versionInfo_;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ static PaError InitializeHostApis( void )
|
|||
if( !hostApis_ )
|
||||
{
|
||||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
goto error;
|
||||
}
|
||||
|
||||
hostApisCount_ = 0;
|
||||
|
@ -235,11 +235,11 @@ static PaError InitializeHostApis( void )
|
|||
assert( hostApi->info.defaultInputDevice < 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.
|
||||
*/
|
||||
if( (defaultHostApiIndex_ == -1) &&
|
||||
( hostApi->info.defaultInputDevice != paNoDevice
|
||||
( hostApi->info.defaultInputDevice != paNoDevice
|
||||
|| hostApi->info.defaultOutputDevice != paNoDevice ) )
|
||||
{
|
||||
defaultHostApiIndex_ = hostApisCount_;
|
||||
|
@ -277,7 +277,7 @@ error:
|
|||
<device> belongs and returns it. if <hostSpecificDeviceIndex> is
|
||||
non-null, the host specific device index is returned in it.
|
||||
returns -1 if <device> is out of range.
|
||||
|
||||
|
||||
*/
|
||||
static int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )
|
||||
{
|
||||
|
@ -367,7 +367,7 @@ PaError Pa_Initialize( void )
|
|||
{
|
||||
PA_VALIDATE_TYPE_SIZES;
|
||||
PA_VALIDATE_ENDIANNESS;
|
||||
|
||||
|
||||
PaUtil_InitializeClock();
|
||||
PaUtil_ResetTraceMessages();
|
||||
|
||||
|
@ -390,7 +390,8 @@ PaError Pa_Terminate( void )
|
|||
|
||||
if( PA_IS_INITIALISED_ )
|
||||
{
|
||||
if( --initializationCount_ == 0 )
|
||||
// leave initializationCount_>0 so that Pa_CloseStream() can execute
|
||||
if( initializationCount_ == 1 )
|
||||
{
|
||||
CloseOpenStreams();
|
||||
|
||||
|
@ -398,6 +399,7 @@ PaError Pa_Terminate( void )
|
|||
|
||||
PaUtil_DumpTraceMessages();
|
||||
}
|
||||
--initializationCount_;
|
||||
result = paNoError;
|
||||
}
|
||||
else
|
||||
|
@ -454,11 +456,11 @@ const char *Pa_GetErrorText( PaError errorCode )
|
|||
case paCanNotWriteToAnInputOnlyStream: result = "Can't write to an input only stream"; break;
|
||||
case paIncompatibleStreamHostApi: result = "Incompatible stream host API"; break;
|
||||
case paBadBufferPtr: result = "Bad buffer pointer"; break;
|
||||
default:
|
||||
default:
|
||||
if( errorCode > 0 )
|
||||
result = "Invalid error code (value greater than zero)";
|
||||
result = "Invalid error code (value greater than zero)";
|
||||
else
|
||||
result = "Invalid error code";
|
||||
result = "Invalid error code";
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
@ -469,7 +471,7 @@ PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )
|
|||
{
|
||||
PaHostApiIndex result;
|
||||
int i;
|
||||
|
||||
|
||||
PA_LOGAPI_ENTER_PARAMS( "Pa_HostApiTypeIdToHostApiIndex" );
|
||||
PA_LOGAPI(("\tPaHostApiTypeId type: %d\n", type ));
|
||||
|
||||
|
@ -480,14 +482,14 @@ PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )
|
|||
else
|
||||
{
|
||||
result = paHostApiNotFound;
|
||||
|
||||
|
||||
for( i=0; i < hostApisCount_; ++i )
|
||||
{
|
||||
if( hostApis_[i]->info.type == type )
|
||||
{
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -502,7 +504,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
|
|||
{
|
||||
PaError result;
|
||||
int i;
|
||||
|
||||
|
||||
if( !PA_IS_INITIALISED_ )
|
||||
{
|
||||
result = paNotInitialized;
|
||||
|
@ -510,7 +512,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
|
|||
else
|
||||
{
|
||||
result = paHostApiNotFound;
|
||||
|
||||
|
||||
for( i=0; i < hostApisCount_; ++i )
|
||||
{
|
||||
if( hostApis_[i]->info.type == type )
|
||||
|
@ -531,7 +533,7 @@ PaError PaUtil_DeviceIndexToHostApiDeviceIndex(
|
|||
{
|
||||
PaError result;
|
||||
PaDeviceIndex x;
|
||||
|
||||
|
||||
x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;
|
||||
|
||||
if( x < 0 || x >= hostApi->info.deviceCount )
|
||||
|
@ -616,7 +618,7 @@ const PaHostApiInfo* Pa_GetHostApiInfo( PaHostApiIndex hostApi )
|
|||
else if( hostApi < 0 || hostApi >= hostApisCount_ )
|
||||
{
|
||||
info = NULL;
|
||||
|
||||
|
||||
PA_LOGAPI(("Pa_GetHostApiInfo returned:\n" ));
|
||||
PA_LOGAPI(("\tPaHostApiInfo*: NULL [ hostApi out of range ]\n" ));
|
||||
|
||||
|
@ -725,7 +727,7 @@ PaDeviceIndex Pa_GetDefaultOutputDevice( void )
|
|||
{
|
||||
PaHostApiIndex hostApi;
|
||||
PaDeviceIndex result;
|
||||
|
||||
|
||||
PA_LOGAPI_ENTER( "Pa_GetDefaultOutputDevice" );
|
||||
|
||||
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
|
||||
|
||||
ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()
|
||||
conform to the expected values as described below. This function is
|
||||
also designed to be used with the proposed Pa_IsFormatSupported() function.
|
||||
|
||||
|
||||
There are basically two types of validation that could be performed:
|
||||
Generic conformance validation, and device capability mismatch
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
On success the function returns PaNoError and fills in hostApi,
|
||||
hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure
|
||||
the function returns an error code indicating the first encountered
|
||||
parameter error.
|
||||
|
||||
|
||||
|
||||
|
||||
If ValidateOpenStreamParameters() returns paNoError, the following
|
||||
assertions are guaranteed to be true.
|
||||
|
||||
|
||||
- at least one of inputParameters & outputParmeters is valid (not NULL)
|
||||
|
||||
- if inputParameters & outputParameters are both valid, that
|
||||
inputParameters->device & outputParameters->device both use the same host api
|
||||
|
||||
|
||||
PaDeviceIndex inputParameters->device
|
||||
- is within range (0 to Pa_GetDeviceCount-1) Or:
|
||||
- is paUseHostApiSpecificDeviceSpecification and
|
||||
|
@ -842,30 +844,30 @@ static int SampleFormatIsValid( PaSampleFormat format )
|
|||
int inputParameters->channelCount
|
||||
- if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0
|
||||
- upper bound is NOT validated against device capabilities
|
||||
|
||||
|
||||
PaSampleFormat inputParameters->sampleFormat
|
||||
- is one of the sample formats defined in portaudio.h
|
||||
|
||||
void *inputParameters->hostApiSpecificStreamInfo
|
||||
- if supplied its hostApi field matches the input device's host Api
|
||||
|
||||
|
||||
PaDeviceIndex outputParmeters->device
|
||||
- is within range (0 to Pa_GetDeviceCount-1)
|
||||
|
||||
|
||||
int outputParmeters->channelCount
|
||||
- if inputDevice is valid, channelCount is > 0
|
||||
- upper bound is NOT validated against device capabilities
|
||||
|
||||
|
||||
PaSampleFormat outputParmeters->sampleFormat
|
||||
- is one of the sample formats defined in portaudio.h
|
||||
|
||||
|
||||
void *outputParmeters->hostApiSpecificStreamInfo
|
||||
- if supplied its hostApi field matches the output device's host Api
|
||||
|
||||
|
||||
double sampleRate
|
||||
- is not an 'absurd' rate (less than 1000. or greater than 384000.)
|
||||
- sampleRate is NOT validated against device capabilities
|
||||
|
||||
|
||||
PaStreamFlags streamFlags
|
||||
- unused platform neutral flags are zero
|
||||
- paNeverDropInput is only used for full-duplex callback streams with
|
||||
|
@ -882,7 +884,7 @@ static PaError ValidateOpenStreamParameters(
|
|||
PaDeviceIndex *hostApiInputDevice,
|
||||
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- */
|
||||
/* ters are both nonzero, these indices are set. */
|
||||
|
||||
|
@ -992,7 +994,7 @@ static PaError ValidateOpenStreamParameters(
|
|||
!= (*hostApi)->info.type )
|
||||
return paIncompatibleHostApiSpecificStreamInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( (inputParameters != NULL) && (outputParameters != NULL) )
|
||||
{
|
||||
|
@ -1001,8 +1003,8 @@ static PaError ValidateOpenStreamParameters(
|
|||
return paBadIODeviceCombination;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Check for absurd sample rates. */
|
||||
if( (sampleRate < 1000.0) || (sampleRate > 384000.0) )
|
||||
return paInvalidSampleRate;
|
||||
|
@ -1024,7 +1026,7 @@ static PaError ValidateOpenStreamParameters(
|
|||
if( framesPerBuffer != paFramesPerBufferUnspecified )
|
||||
return paInvalidFlag;
|
||||
}
|
||||
|
||||
|
||||
return paNoError;
|
||||
}
|
||||
|
||||
|
@ -1064,7 +1066,7 @@ PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
|
|||
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
||||
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
||||
}
|
||||
|
||||
|
||||
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
||||
#endif
|
||||
|
||||
|
@ -1087,7 +1089,7 @@ PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
|
|||
PA_LOGAPI_EXIT_PAERROR( "Pa_IsFormatSupported", result );
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( inputParameters )
|
||||
{
|
||||
|
@ -1174,7 +1176,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
|||
PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
|
||||
PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
|
||||
}
|
||||
|
||||
|
||||
PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
|
||||
PA_LOGAPI(("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer ));
|
||||
PA_LOGAPI(("\tPaStreamFlags streamFlags: 0x%x\n", streamFlags ));
|
||||
|
@ -1193,7 +1195,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
|||
}
|
||||
|
||||
/* 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
|
||||
*/
|
||||
|
||||
|
@ -1221,7 +1223,7 @@ PaError Pa_OpenStream( PaStream** stream,
|
|||
PA_LOGAPI(("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) ));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( inputParameters )
|
||||
{
|
||||
|
@ -1295,8 +1297,8 @@ PaError Pa_OpenDefaultStream( PaStream** stream,
|
|||
{
|
||||
hostApiInputParameters.device = Pa_GetDefaultInputDevice();
|
||||
if( hostApiInputParameters.device == paNoDevice )
|
||||
return paDeviceUnavailable;
|
||||
|
||||
return paDeviceUnavailable;
|
||||
|
||||
hostApiInputParameters.channelCount = inputChannelCount;
|
||||
hostApiInputParameters.sampleFormat = sampleFormat;
|
||||
/* 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
|
||||
latency.
|
||||
*/
|
||||
hostApiInputParameters.suggestedLatency =
|
||||
hostApiInputParameters.suggestedLatency =
|
||||
Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;
|
||||
hostApiInputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
hostApiInputParametersPtr = &hostApiInputParameters;
|
||||
|
@ -1318,7 +1320,7 @@ PaError Pa_OpenDefaultStream( PaStream** stream,
|
|||
{
|
||||
hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();
|
||||
if( hostApiOutputParameters.device == paNoDevice )
|
||||
return paDeviceUnavailable;
|
||||
return paDeviceUnavailable;
|
||||
|
||||
hostApiOutputParameters.channelCount = outputChannelCount;
|
||||
hostApiOutputParameters.sampleFormat = sampleFormat;
|
||||
|
@ -1702,7 +1704,7 @@ PaError Pa_WriteStream( PaStream* stream,
|
|||
else if( result == 1 )
|
||||
{
|
||||
result = paStreamIsStopped;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#define PA_GIT_REVISION unknown
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* 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
|
||||
* streamCallback <-> host buffer processing adapter
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
*
|
||||
* 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
|
||||
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
|
||||
by the user in their call to Pa_OpenStream(), others reflect the requirements
|
||||
of the host API implementation - they indicate host buffer sizes, formats,
|
||||
|
@ -119,7 +119,7 @@
|
|||
PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.
|
||||
Which function you call will depend on whether the host buffer(s) are
|
||||
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
|
||||
beginning of the circular buffer), also call
|
||||
PaUtil_Set2ndInputFrameCount, PaUtil_Set2ndInputChannel,
|
||||
|
@ -134,7 +134,7 @@
|
|||
PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.
|
||||
Which function you call will depend on whether the host buffer(s) are
|
||||
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
|
||||
range at the beginning of the circular buffer), call
|
||||
PaUtil_Set2ndOutputFrameCount, PaUtil_Set2ndOutputChannel,
|
||||
|
@ -237,7 +237,7 @@ typedef enum {
|
|||
}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. */
|
||||
typedef struct PaUtilChannelDescriptor{
|
||||
void *data;
|
||||
|
@ -452,10 +452,10 @@ void PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bufferProcessor,
|
|||
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
|
||||
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.
|
||||
*/
|
||||
|
@ -648,11 +648,11 @@ void PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bufferProcessor,
|
|||
|
||||
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
|
||||
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.
|
||||
|
||||
@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
|
||||
smaller value may be returned.
|
||||
*/
|
||||
|
@ -660,7 +660,7 @@ unsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bufferProcessor
|
|||
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
|
||||
continue calling PaUtil_EndBufferProcessing() after the callback has returned
|
||||
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
|
||||
* Ring Buffer utility.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* 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
|
||||
* stream interface
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* 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
|
||||
* Store trace information in real-time for later printing.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* Store trace information in real-time for later printing.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* common implementation utilities and interfaces
|
||||
*
|
||||
|
@ -65,7 +65,7 @@ struct PaUtilHostApiRepresentation;
|
|||
host api specific extension functions which aren't passed a rep pointer
|
||||
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.
|
||||
|
||||
@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.
|
||||
@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.
|
||||
@param device The PortAudio device index to convert.
|
||||
@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 );
|
||||
|
||||
|
||||
/** Realease block if non-NULL. block may be NULL */
|
||||
/** Release block if non-NULL. block may be NULL */
|
||||
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
|
||||
* Latest Version at: http://www.portaudio.com
|
||||
* 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;
|
||||
unsigned int pcnt = 0;
|
||||
|
||||
dir = 0;
|
||||
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_max)(params, &pmax, &dir) ) < 0 )
|
||||
return ret;
|
||||
dir = 0;
|
||||
if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_max)(params, &pcnt, &dir) ) < 0 )
|
||||
return ret;
|
||||
|
||||
|
@ -842,7 +844,6 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
|||
double * defaultLowLatency, * defaultHighLatency, * defaultSampleRate =
|
||||
&devInfo->baseDeviceInfo.defaultSampleRate;
|
||||
double defaultSr = *defaultSampleRate;
|
||||
int dir;
|
||||
|
||||
assert( pcm );
|
||||
|
||||
|
@ -920,7 +921,7 @@ static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, in
|
|||
alsaBufferFrames = 512;
|
||||
alsaPeriodFrames = 128;
|
||||
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;
|
||||
|
||||
/* 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_( 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_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;
|
||||
|
||||
*minChannels = (int)minChans;
|
||||
|
@ -1066,6 +1067,10 @@ static int IgnorePlugin( const char *pluginId )
|
|||
static const char *ignoredPlugins[] = {"hw", "plughw", "plug", "dsnoop", "tee",
|
||||
"file", "null", "shm", "cards", "rate_convert", NULL};
|
||||
int i = 0;
|
||||
|
||||
if( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS" ) && atoi( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS") ) )
|
||||
return 1;
|
||||
|
||||
while( ignoredPlugins[i] )
|
||||
{
|
||||
if( !strcmp( pluginId, ignoredPlugins[i] ) )
|
||||
|
@ -1327,6 +1332,8 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
|||
paInsufficientMemory );
|
||||
snprintf( deviceName, len, "%s: %s (%s)", cardName, infoName, buf );
|
||||
|
||||
PA_DEBUG(( "%s: Found device [%d]: %s\n", __FUNCTION__, numDeviceNames, deviceName ));
|
||||
|
||||
++numDeviceNames;
|
||||
if( !hwDevInfos || numDeviceNames > maxDeviceNames )
|
||||
{
|
||||
|
@ -1450,7 +1457,7 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
|||
|
||||
PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );
|
||||
}
|
||||
assert( devIdx < numDeviceNames );
|
||||
assert( devIdx <= numDeviceNames );
|
||||
/* Now inspect 'dmix' and 'default' plugins */
|
||||
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.
|
||||
* 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
|
||||
* affect the way ALSA interacts with me, the user-level client.
|
||||
*/
|
||||
|
@ -1969,7 +1976,7 @@ static PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *se
|
|||
|
||||
/* 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 */
|
||||
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->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 )
|
||||
self->primeBuffers = 1;
|
||||
|
@ -2324,6 +2331,7 @@ static PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamCompo
|
|||
/* It may be that the device only supports 2 periods for instance */
|
||||
dir = 0;
|
||||
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 );
|
||||
assert( maxPeriods > 1 );
|
||||
|
||||
|
@ -2381,7 +2389,7 @@ static PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamCompo
|
|||
{
|
||||
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 )
|
||||
{
|
||||
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 );
|
||||
/* 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) */
|
||||
deviation = abs( setRate - reqRate );
|
||||
deviation = abs( (int)setRate - (int)reqRate );
|
||||
if( deviation > 0 && deviation * RATE_MAX_DEVIATE_RATIO > reqRate )
|
||||
result = paInvalidSampleRate;
|
||||
|
||||
|
@ -3209,6 +3217,7 @@ error:
|
|||
unsigned int _min = 0, _max = 0;
|
||||
int _dir = 0;
|
||||
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 );
|
||||
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 )
|
||||
{
|
||||
PaError result = paNoError;
|
||||
int ret = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
|
||||
(void)ret; /* Prevent unused variable warning if asserts are turned off */
|
||||
assert( ret == self->nfds );
|
||||
|
||||
int nfds = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
|
||||
/* If alsa returns anything else, like -EPIPE return */
|
||||
if( nfds != self->nfds )
|
||||
{
|
||||
return paUnanticipatedHostError;
|
||||
}
|
||||
self->ready = 0;
|
||||
|
||||
return result;
|
||||
return paNoError;
|
||||
}
|
||||
|
||||
/** Examine results from poll().
|
||||
|
@ -3794,19 +3804,44 @@ static PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *fr
|
|||
if( pollCapture )
|
||||
{
|
||||
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;
|
||||
}
|
||||
if( pollPlayback )
|
||||
{
|
||||
/* self->pfds is in effect an array of fds; if necessary, index past the capture fds */
|
||||
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;
|
||||
}
|
||||
|
||||
#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 );
|
||||
|
||||
#ifdef PTHREAD_CANCELED
|
||||
if( self->callbackMode )
|
||||
{
|
||||
pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
|
||||
}
|
||||
#endif
|
||||
|
||||
if( pollResults < 0 )
|
||||
{
|
||||
/* 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
|
||||
* 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
|
||||
* 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 )
|
||||
{
|
||||
|
@ -4175,12 +4210,18 @@ static void *CallbackThreadFunc( void *userData )
|
|||
int streamStarted = 0;
|
||||
|
||||
assert( stream );
|
||||
/* Not implemented */
|
||||
assert( !stream->primeBuffers );
|
||||
|
||||
/* Execute OnExit when exiting */
|
||||
pthread_cleanup_push( &OnExit, stream );
|
||||
|
||||
/* Not implemented */
|
||||
assert( !stream->primeBuffers );
|
||||
#ifdef PTHREAD_CANCELED
|
||||
/* 'Abort' will use thread cancellation to terminate the callback thread, but the Alsa-lib functions
|
||||
* 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
|
||||
* 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 */
|
||||
}
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
|
||||
|
@ -4265,10 +4306,6 @@ static void *CallbackThreadFunc( void *userData )
|
|||
{
|
||||
xrun = 0;
|
||||
|
||||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#endif
|
||||
|
||||
/** @concern Xruns Under/overflows are to be reported to the callback */
|
||||
if( stream->underrun > 0.0 )
|
||||
{
|
||||
|
@ -4299,11 +4336,12 @@ static void *CallbackThreadFunc( void *userData )
|
|||
#if 0
|
||||
CallbackUpdate( &stream->threading );
|
||||
#endif
|
||||
|
||||
CalculateTimeInfo( stream, &timeInfo );
|
||||
PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
|
||||
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 );
|
||||
|
||||
framesGot = framesAvail;
|
||||
|
@ -4334,7 +4372,6 @@ static void *CallbackThreadFunc( void *userData )
|
|||
{
|
||||
/* Go back to polling for more frames */
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
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
|
||||
*
|
||||
* Author: Stephane Letz
|
||||
|
@ -46,7 +46,7 @@
|
|||
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-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
|
||||
08-28-01 Check the stream pointer for null in bufferSwitchTimeInfo, correct bug in bufferSwitchTimeInfo when
|
||||
the stream is stopped : Stephane Letz
|
||||
|
@ -55,11 +55,11 @@
|
|||
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-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-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
|
||||
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
|
||||
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
|
||||
|
@ -69,7 +69,7 @@
|
|||
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.
|
||||
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
|
||||
|
@ -103,7 +103,7 @@
|
|||
|
||||
#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.
|
||||
To make configuration easier, we define WIN32 here to make sure
|
||||
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.
|
||||
|
||||
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.
|
||||
3) Divide the number of frames by the desired block size 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) );
|
||||
lBlockingBufferSize = lBlockingBufferSizePow2;
|
||||
|
||||
/* Compute total intput latency in seconds */
|
||||
/* Compute total input latency in seconds */
|
||||
stream->streamRepresentation.streamInfo.inputLatency =
|
||||
(double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->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.
|
||||
|
||||
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.
|
||||
3) Divide the number of frames by the desired block size 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
|
||||
|
||||
// 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
|
||||
// simplicity.
|
||||
|
||||
|
@ -2904,7 +2904,7 @@ static void bufferSwitch(long index, ASIOBool directProcess)
|
|||
static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )
|
||||
{
|
||||
// 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.
|
||||
|
||||
|
||||
|
@ -3269,7 +3269,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
|||
break;
|
||||
|
||||
case kAsioSupportsTimeInfo:
|
||||
// informs the driver wether the asioCallbacks.bufferSwitchTimeInfo() callback
|
||||
// informs the driver whether the asioCallbacks.bufferSwitchTimeInfo() callback
|
||||
// is supported.
|
||||
// For compatibility with ASIO 1.0 drivers the host application should always support
|
||||
// the "old" bufferSwitch method, too.
|
||||
|
@ -3277,7 +3277,7 @@ static long asioMessages(long selector, long value, void* message, double* opt)
|
|||
break;
|
||||
|
||||
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
|
||||
// to do.
|
||||
ret = 0;
|
||||
|
@ -3423,7 +3423,7 @@ static PaError StopStream( PaStream *s )
|
|||
blockingState->stopFlag = TRUE;
|
||||
|
||||
/* 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. */
|
||||
DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000
|
||||
/ stream->streamRepresentation.streamInfo.sampleRate );
|
||||
|
@ -3762,7 +3762,7 @@ static PaError WriteStream( PaStream *s ,
|
|||
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 )
|
||||
{
|
||||
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
|
||||
hint for buffer size in paHostFramesPerBufferUnspecified, or the value may
|
||||
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
|
||||
an issue.
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ static bool ensureChannelNameSize( int size )
|
|||
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 )
|
||||
{
|
||||
|
@ -1173,8 +1173,13 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
const double sampleRate,
|
||||
void *refCon )
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
AudioComponentDescription desc;
|
||||
AudioComponent comp;
|
||||
#else
|
||||
ComponentDescription desc;
|
||||
Component comp;
|
||||
#endif
|
||||
/*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/
|
||||
AudioStreamBasicDescription desiredFormat;
|
||||
OSStatus result = noErr;
|
||||
|
@ -1245,7 +1250,11 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
desc.componentFlags = 0;
|
||||
desc.componentFlagsMask = 0;
|
||||
/* -- 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 );
|
||||
#endif
|
||||
if( !comp )
|
||||
{
|
||||
DBUG( ( "AUHAL component not found." ) );
|
||||
|
@ -1254,7 +1263,11 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
return paUnanticipatedHostError;
|
||||
}
|
||||
/* -- open it -- */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
result = AudioComponentInstanceNew( comp, audioUnit );
|
||||
#else
|
||||
result = OpenAComponent( comp, audioUnit );
|
||||
#endif
|
||||
if( result )
|
||||
{
|
||||
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 */
|
||||
if( inStreamParams ) {
|
||||
/*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.*/
|
||||
paResult = setBestFramesPerBuffer( *audioDevice, FALSE,
|
||||
requestedFramesPerBuffer,
|
||||
|
@ -1363,7 +1376,7 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
}
|
||||
if( outStreamParams && !inStreamParams ) {
|
||||
/*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.*/
|
||||
paResult = setBestFramesPerBuffer( *audioDevice, TRUE,
|
||||
requestedFramesPerBuffer,
|
||||
|
@ -1607,7 +1620,12 @@ static PaError OpenAndSetupOneAudioUnit(
|
|||
#undef ERR_WRAP
|
||||
|
||||
error:
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
AudioComponentInstanceDispose( *audioUnit );
|
||||
#else
|
||||
CloseComponent( *audioUnit );
|
||||
#endif
|
||||
*audioUnit = NULL;
|
||||
if( result )
|
||||
return PaMacCore_SetError( result, line, 1 );
|
||||
|
@ -1740,7 +1758,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
inputChannelCount = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Surpress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paFloat32; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
@ -1770,7 +1788,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
outputChannelCount = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Surpress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
/* 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,
|
||||
* we also need a
|
||||
* ring buffer to store inpt data while waiting for output
|
||||
* data.
|
||||
* we also need a ring buffer to store input data while waiting for
|
||||
* output data.
|
||||
*/
|
||||
if( (stream->outputUnit && (stream->inputUnit != stream->outputUnit))
|
||||
|| 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 */
|
||||
|
||||
void *data;
|
||||
|
@ -1951,7 +1968,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
}
|
||||
|
||||
/* 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
|
||||
middle of the buffer */
|
||||
if( stream->outputUnit )
|
||||
|
@ -1973,12 +1998,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
stream->outputFramesPerBuffer,
|
||||
sampleRate );
|
||||
result = initializeBlioRingBuffers( &stream->blio,
|
||||
inputParameters?inputParameters->sampleFormat:0 ,
|
||||
outputParameters?outputParameters->sampleFormat:0 ,
|
||||
MAX(stream->inputFramesPerBuffer,stream->outputFramesPerBuffer),
|
||||
inputParameters ? inputParameters->sampleFormat : 0,
|
||||
outputParameters ? outputParameters->sampleFormat : 0,
|
||||
ringSize,
|
||||
inputParameters?inputChannelCount:0 ,
|
||||
outputParameters?outputChannelCount:0 ) ;
|
||||
inputParameters ? inputChannelCount : 0,
|
||||
outputParameters ? outputChannelCount : 0 ) ;
|
||||
if( result != paNoError )
|
||||
goto error;
|
||||
|
||||
|
@ -2158,8 +2182,8 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
|
||||
/* -----------------------------------------------------------------*\
|
||||
This output may be useful for debugging,
|
||||
But printing durring the callback is a bad enough idea that
|
||||
this is not enabled by enableing the usual debugging calls.
|
||||
But printing during the callback is a bad enough idea that
|
||||
this is not enabled by enabling the usual debugging calls.
|
||||
\* -----------------------------------------------------------------*/
|
||||
/*
|
||||
static int renderCount = 0;
|
||||
|
@ -2277,9 +2301,10 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
INPUT_ELEMENT,
|
||||
inNumberFrames,
|
||||
&stream->inputAudioBufferList );
|
||||
/* FEEDBACK: I'm not sure what to do when this call fails. There's nothing in the PA API to
|
||||
* do about failures in the callback system. */
|
||||
assert( !err );
|
||||
if(err != noErr)
|
||||
{
|
||||
goto stop_stream;
|
||||
}
|
||||
|
||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
||||
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
||||
|
@ -2359,7 +2384,7 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
&size,
|
||||
(void *)&data );
|
||||
if( err == RING_BUFFER_EMPTY )
|
||||
{ /*the ring buffer callback underflowed */
|
||||
{ /* the ring buffer callback underflowed */
|
||||
err = 0;
|
||||
bzero( ((char *)data) + size, sizeof(data)-size );
|
||||
/* The ring buffer can underflow normally when the stream is stopping.
|
||||
|
@ -2370,8 +2395,11 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
}
|
||||
}
|
||||
ERR( err );
|
||||
assert( !err );
|
||||
|
||||
if(err != noErr)
|
||||
{
|
||||
goto stop_stream;
|
||||
}
|
||||
|
||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
|
||||
PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
|
||||
0,
|
||||
|
@ -2477,9 +2505,12 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
if( err == -10874 )
|
||||
inNumberFrames /= 2;
|
||||
} while( err == -10874 && inNumberFrames > 1 );
|
||||
/* FEEDBACK: I'm not sure what to do when this call fails */
|
||||
ERR( err );
|
||||
assert( !err );
|
||||
if(err != noErr)
|
||||
{
|
||||
goto stop_stream;
|
||||
}
|
||||
|
||||
if( stream->inputSRConverter || stream->outputUnit )
|
||||
{
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
/*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 ];
|
||||
OSStatus err;
|
||||
do
|
||||
{ /*Run the buffer processor until we are out of data*/
|
||||
{ /* Run the buffer processor until we are out of data. */
|
||||
UInt32 size;
|
||||
long f;
|
||||
|
||||
|
@ -2539,7 +2570,11 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
(void *)data );
|
||||
if( err != RING_BUFFER_EMPTY )
|
||||
ERR( err );
|
||||
assert( err == 0 || err == RING_BUFFER_EMPTY );
|
||||
if( err != noErr && err != RING_BUFFER_EMPTY )
|
||||
{
|
||||
goto stop_stream;
|
||||
}
|
||||
|
||||
|
||||
f = size / ( chan * sizeof(float) );
|
||||
PaUtil_SetInputFrameCount( &(stream->bufferProcessor), f );
|
||||
|
@ -2562,24 +2597,24 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
}
|
||||
}
|
||||
|
||||
switch( callbackResult )
|
||||
{
|
||||
case paContinue: break;
|
||||
case paComplete:
|
||||
case paAbort:
|
||||
stream->state = CALLBACK_STOPPED ;
|
||||
if( stream->outputUnit )
|
||||
AudioOutputUnitStop(stream->outputUnit);
|
||||
if( stream->inputUnit )
|
||||
AudioOutputUnitStop(stream->inputUnit);
|
||||
break;
|
||||
}
|
||||
// Should we return successfully or fall through to stopping the stream?
|
||||
if( callbackResult == paContinue )
|
||||
{
|
||||
PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
|
||||
return noErr;
|
||||
}
|
||||
|
||||
PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
|
||||
return noErr;
|
||||
stop_stream:
|
||||
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
|
||||
the stream has already been stopped or aborted.
|
||||
|
@ -2587,7 +2622,7 @@ static OSStatus AudioIOProc( void *inRefCon,
|
|||
static PaError CloseStream( PaStream* s )
|
||||
{
|
||||
/* 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;
|
||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||
|
||||
|
@ -2628,13 +2663,21 @@ static PaError CloseStream( PaStream* s )
|
|||
}
|
||||
if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {
|
||||
AudioUnitUninitialize( stream->outputUnit );
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
AudioComponentInstanceDispose( stream->outputUnit );
|
||||
#else
|
||||
CloseComponent( stream->outputUnit );
|
||||
#endif
|
||||
}
|
||||
stream->outputUnit = NULL;
|
||||
if( 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 );
|
||||
#endif
|
||||
stream->inputUnit = NULL;
|
||||
}
|
||||
if( stream->inputRingBuffer.buffer )
|
||||
|
@ -2707,18 +2750,10 @@ static ComponentResult BlockWhileAudioUnitIsRunning( AudioUnit audioUnit, AudioU
|
|||
return noErr;
|
||||
}
|
||||
|
||||
static PaError StopStream( PaStream *s )
|
||||
static PaError FinishStoppingStream( PaMacCoreStream *stream )
|
||||
{
|
||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||
OSStatus result = noErr;
|
||||
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)
|
||||
/* -- stop and reset -- */
|
||||
|
@ -2770,12 +2805,34 @@ static PaError StopStream( PaStream *s )
|
|||
#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 )
|
||||
{
|
||||
VVDBUG(("AbortStream()->StopStream()\n"));
|
||||
VDBUG( ( "Aborting stream.\n" ) );
|
||||
/* We have nothing faster than StopStream. */
|
||||
return StopStream(s);
|
||||
PaMacCoreStream *stream = (PaMacCoreStream*)s;
|
||||
VDBUG( ( "AbortStream()\n" ) );
|
||||
stream->state = STOPPING;
|
||||
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(
|
||||
PaMacBlio *blio,
|
||||
PaSampleFormat inputSampleFormat,
|
||||
PaSampleFormat outputSampleFormat,
|
||||
size_t framesPerBuffer,
|
||||
long ringBufferSize,
|
||||
long ringBufferSizeInFrames,
|
||||
int inChan,
|
||||
int outChan )
|
||||
{
|
||||
|
@ -126,20 +128,19 @@ PaError initializeBlioRingBuffers(
|
|||
/* zeroify things */
|
||||
bzero( blio, sizeof( PaMacBlio ) );
|
||||
/* 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->outputRingBuffer.buffer = NULL;
|
||||
|
||||
/* initialize simple data */
|
||||
blio->ringBufferFrames = ringBufferSize;
|
||||
blio->ringBufferFrames = ringBufferSizeInFrames;
|
||||
blio->inputSampleFormat = inputSampleFormat;
|
||||
blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);
|
||||
blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat);
|
||||
blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat); // FIXME: WHY?
|
||||
blio->outputSampleFormat = outputSampleFormat;
|
||||
blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);
|
||||
blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);
|
||||
|
||||
blio->framesPerBuffer = framesPerBuffer;
|
||||
blio->inChan = inChan;
|
||||
blio->outChan = outChan;
|
||||
blio->statusFlags = 0;
|
||||
|
@ -163,7 +164,7 @@ PaError initializeBlioRingBuffers(
|
|||
result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );
|
||||
#endif
|
||||
if( inChan ) {
|
||||
data = calloc( ringBufferSize, blio->inputSampleSizePow2*inChan );
|
||||
data = calloc( ringBufferSizeInFrames, blio->inputSampleSizePow2 * inChan );
|
||||
if( !data )
|
||||
{
|
||||
result = paInsufficientMemory;
|
||||
|
@ -172,12 +173,13 @@ PaError initializeBlioRingBuffers(
|
|||
|
||||
err = PaUtil_InitializeRingBuffer(
|
||||
&blio->inputRingBuffer,
|
||||
1, ringBufferSize*blio->inputSampleSizePow2*inChan,
|
||||
blio->inputSampleSizePow2 * inChan,
|
||||
ringBufferSizeInFrames,
|
||||
data );
|
||||
assert( !err );
|
||||
}
|
||||
if( outChan ) {
|
||||
data = calloc( ringBufferSize, blio->outputSampleSizePow2*outChan );
|
||||
data = calloc( ringBufferSizeInFrames, blio->outputSampleSizePow2 * outChan );
|
||||
if( !data )
|
||||
{
|
||||
result = paInsufficientMemory;
|
||||
|
@ -186,7 +188,8 @@ PaError initializeBlioRingBuffers(
|
|||
|
||||
err = PaUtil_InitializeRingBuffer(
|
||||
&blio->outputRingBuffer,
|
||||
1, ringBufferSize*blio->outputSampleSizePow2*outChan,
|
||||
blio->outputSampleSizePow2 * outChan,
|
||||
ringBufferSizeInFrames,
|
||||
data );
|
||||
assert( !err );
|
||||
}
|
||||
|
@ -210,7 +213,7 @@ PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )
|
|||
goto done;
|
||||
|
||||
/* 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.
|
||||
* - unlock.
|
||||
* - broadcast to all listeners.
|
||||
|
@ -236,7 +239,7 @@ PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )
|
|||
goto done;
|
||||
|
||||
/* 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.
|
||||
* - unlock.
|
||||
* - broadcast to all listeners.
|
||||
|
@ -266,12 +269,11 @@ PaError resetBlioRingBuffers( PaMacBlio *blio )
|
|||
#endif
|
||||
blio->statusFlags = 0;
|
||||
if( blio->outputRingBuffer.buffer ) {
|
||||
PaUtil_FlushRingBuffer( &blio->outputRingBuffer );
|
||||
bzero( blio->outputRingBuffer.buffer,
|
||||
blio->outputRingBuffer.bufferSize );
|
||||
/* Advance buffer */
|
||||
PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames*blio->outputSampleSizeActual*blio->outChan );
|
||||
//PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->outputRingBuffer.bufferSize );
|
||||
PaUtil_FlushRingBuffer( &blio->outputRingBuffer );
|
||||
/* Fill the buffer with zeros. */
|
||||
bzero( blio->outputRingBuffer.buffer,
|
||||
blio->outputRingBuffer.bufferSize * blio->outputRingBuffer.elementSizeBytes );
|
||||
PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames );
|
||||
|
||||
/* Update isOutputFull. */
|
||||
#ifdef PA_MAC__BLIO_MUTEX
|
||||
|
@ -280,16 +282,14 @@ PaError resetBlioRingBuffers( PaMacBlio *blio )
|
|||
goto error;
|
||||
#endif
|
||||
/*
|
||||
printf( "------%d\n" , blio->framesPerBuffer );
|
||||
printf( "------%d\n" , blio->outChan );
|
||||
printf( "------%d\n" , blio->outputSampleSize );
|
||||
printf( "------%d\n" , blio->framesPerBuffer*blio->outChan*blio->outputSampleSize );
|
||||
*/
|
||||
}
|
||||
if( blio->inputRingBuffer.buffer ) {
|
||||
PaUtil_FlushRingBuffer( &blio->inputRingBuffer );
|
||||
bzero( blio->inputRingBuffer.buffer,
|
||||
blio->inputRingBuffer.bufferSize );
|
||||
blio->inputRingBuffer.bufferSize * blio->inputRingBuffer.elementSizeBytes );
|
||||
/* Update isInputEmpty. */
|
||||
#ifdef PA_MAC__BLIO_MUTEX
|
||||
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.
|
||||
*
|
||||
*/
|
||||
|
@ -344,30 +344,32 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
|||
void *userData )
|
||||
{
|
||||
PaMacBlio *blio = (PaMacBlio*)userData;
|
||||
long avail;
|
||||
long toRead;
|
||||
long toWrite;
|
||||
long read;
|
||||
long written;
|
||||
ring_buffer_size_t framesAvailable;
|
||||
ring_buffer_size_t framesToTransfer;
|
||||
ring_buffer_size_t framesTransferred;
|
||||
|
||||
/* set flags returned by OS: */
|
||||
OSAtomicOr32( statusFlags, &blio->statusFlags ) ;
|
||||
|
||||
/* --- Handle Input Buffer --- */
|
||||
if( blio->inChan ) {
|
||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );
|
||||
framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );
|
||||
|
||||
/* 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 );*/
|
||||
read = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead );
|
||||
assert( toRead == read );
|
||||
framesTransferred = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, framesToTransfer );
|
||||
assert( framesToTransfer == framesTransferred );
|
||||
#ifdef PA_MAC__BLIO_MUTEX
|
||||
/* Priority inversion. See notes below. */
|
||||
blioSetIsInputEmpty( blio, false );
|
||||
|
@ -377,21 +379,31 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
|||
|
||||
/* --- Handle Output Buffer --- */
|
||||
if( blio->outChan ) {
|
||||
avail = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
||||
framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
|
||||
|
||||
/* check for underflow */
|
||||
if( avail < frameCount * blio->outputSampleSizeActual * blio->outChan )
|
||||
OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );
|
||||
if( framesAvailable < frameCount )
|
||||
{
|
||||
/* 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 */
|
||||
/*printf( "writing %d\n", toWrite );*/
|
||||
written = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite );
|
||||
assert( toWrite == written );
|
||||
framesTransferred = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, framesToTransfer );
|
||||
assert( framesToTransfer == framesTransferred );
|
||||
#ifdef PA_MAC__BLIO_MUTEX
|
||||
/* 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
|
||||
|
@ -406,24 +418,25 @@ int BlioCallback( const void *input, void *output, unsigned long frameCount,
|
|||
|
||||
PaError ReadStream( PaStream* stream,
|
||||
void *buffer,
|
||||
unsigned long frames )
|
||||
unsigned long framesRequested )
|
||||
{
|
||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||
char *cbuf = (char *) buffer;
|
||||
PaError ret = paNoError;
|
||||
VVDBUG(("ReadStream()\n"));
|
||||
|
||||
while( frames > 0 ) {
|
||||
long avail;
|
||||
long toRead;
|
||||
while( framesRequested > 0 ) {
|
||||
ring_buffer_size_t framesAvailable;
|
||||
ring_buffer_size_t framesToTransfer;
|
||||
ring_buffer_size_t framesTransferred;
|
||||
do {
|
||||
avail = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
||||
framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
||||
/*
|
||||
printf( "Read Buffer is %%%g full: %ld of %ld.\n",
|
||||
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
|
||||
/**block when empty*/
|
||||
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 );
|
||||
#endif
|
||||
}
|
||||
} while( avail == 0 );
|
||||
toRead = MIN( avail, frames * blio->inputSampleSizeActual * blio->inChan );
|
||||
toRead -= toRead % blio->inputSampleSizeActual * blio->inChan ;
|
||||
PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, toRead );
|
||||
cbuf += toRead;
|
||||
frames -= toRead / ( blio->inputSampleSizeActual * blio->inChan );
|
||||
} while( framesAvailable == 0 );
|
||||
framesToTransfer = (ring_buffer_size_t) MIN( framesAvailable, framesRequested );
|
||||
framesTransferred = PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, framesToTransfer );
|
||||
cbuf += framesTransferred * blio->inputSampleSizeActual * blio->inChan;
|
||||
framesRequested -= framesTransferred;
|
||||
|
||||
if( toRead == avail ) {
|
||||
if( framesToTransfer == framesAvailable ) {
|
||||
#ifdef PA_MAC_BLIO_MUTEX
|
||||
/* we just emptied the buffer, so we need to mark it as empty. */
|
||||
ret = blioSetIsInputEmpty( blio, true );
|
||||
|
@ -457,8 +469,10 @@ PaError ReadStream( PaStream* stream,
|
|||
/* of course, in the meantime, the callback may have put some sats
|
||||
in, so
|
||||
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 ) ) {
|
||||
blioSetIsInputEmpty( blio, false );
|
||||
/* FIXME - why check? ret has not been set? */
|
||||
if( ret )
|
||||
return ret;
|
||||
}
|
||||
|
@ -468,6 +482,7 @@ PaError ReadStream( PaStream* stream,
|
|||
|
||||
/* Report either paNoError or paInputOverflowed. */
|
||||
/* 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;
|
||||
|
||||
/* report underflow only once: */
|
||||
|
@ -482,25 +497,27 @@ PaError ReadStream( PaStream* stream,
|
|||
|
||||
PaError WriteStream( PaStream* stream,
|
||||
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;
|
||||
PaError ret = paNoError;
|
||||
VVDBUG(("WriteStream()\n"));
|
||||
|
||||
while( frames > 0 ) {
|
||||
long avail = 0;
|
||||
long toWrite;
|
||||
while( framesRequested > 0 && macStream->state != STOPPING ) {
|
||||
ring_buffer_size_t framesAvailable;
|
||||
ring_buffer_size_t framesToTransfer;
|
||||
ring_buffer_size_t framesTransferred;
|
||||
|
||||
do {
|
||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||
framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||
/*
|
||||
printf( "Write Buffer is %%%g full: %ld of %ld.\n",
|
||||
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
|
||||
/*block while full*/
|
||||
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 );
|
||||
#endif
|
||||
}
|
||||
} while( avail == 0 );
|
||||
} while( framesAvailable == 0 && macStream->state != STOPPING );
|
||||
|
||||
toWrite = MIN( avail, frames * blio->outputSampleSizeActual * blio->outChan );
|
||||
toWrite -= toWrite % blio->outputSampleSizeActual * blio->outChan ;
|
||||
PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, toWrite );
|
||||
cbuf += toWrite;
|
||||
frames -= toWrite / ( blio->outputSampleSizeActual * blio->outChan );
|
||||
if( macStream->state == STOPPING )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
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
|
||||
if( toWrite == avail ) {
|
||||
if( framesToTransfer == framesAvailable ) {
|
||||
/* we just filled up the buffer, so we need to mark it as filled. */
|
||||
ret = blioSetIsOutputFull( blio, true );
|
||||
if( ret )
|
||||
|
@ -536,6 +557,7 @@ PaError WriteStream( PaStream* stream,
|
|||
so check for that, too, to avoid a race condition. */
|
||||
if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {
|
||||
blioSetIsOutputFull( blio, false );
|
||||
/* FIXME remove or review this code, does not fix race, ret not set! */
|
||||
if( ret )
|
||||
return ret;
|
||||
}
|
||||
|
@ -543,42 +565,65 @@ PaError WriteStream( PaStream* stream,
|
|||
#endif
|
||||
}
|
||||
|
||||
/* Report either paNoError or paOutputUnderflowed. */
|
||||
/* may also want to report other errors, but this is non-standard. */
|
||||
ret = blio->statusFlags & paOutputUnderflow;
|
||||
if ( macStream->state == STOPPING )
|
||||
{
|
||||
ret = paInternalError;
|
||||
}
|
||||
else if (ret == paNoError )
|
||||
{
|
||||
/* Test for underflow. */
|
||||
ret = blio->statusFlags & paOutputUnderflow;
|
||||
|
||||
/* report underflow only once: */
|
||||
if( ret ) {
|
||||
OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );
|
||||
ret = paOutputUnderflowed;
|
||||
/* report underflow only once: */
|
||||
if( ret )
|
||||
{
|
||||
OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );
|
||||
ret = paOutputUnderflowed;
|
||||
}
|
||||
}
|
||||
|
||||
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 ) {
|
||||
long avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||
while( avail != blio->outputRingBuffer.bufferSize ) {
|
||||
if( avail == 0 )
|
||||
Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
|
||||
avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||
}
|
||||
}
|
||||
}
|
||||
ring_buffer_size_t framesLeft = PaUtil_GetRingBufferReadAvailable( &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 )
|
||||
{
|
||||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||
VVDBUG(("GetStreamReadAvailable()\n"));
|
||||
|
||||
return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer )
|
||||
/ ( blio->inputSampleSizeActual * blio->inChan );
|
||||
return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
|
||||
}
|
||||
|
||||
|
||||
|
@ -587,7 +632,6 @@ signed long GetStreamWriteAvailable( PaStream* stream )
|
|||
PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
|
||||
VVDBUG(("GetStreamWriteAvailable()\n"));
|
||||
|
||||
return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer )
|
||||
/ ( blio->outputSampleSizeActual * blio->outChan );
|
||||
return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
#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)
|
||||
/*
|
||||
|
@ -79,7 +79,7 @@
|
|||
typedef struct {
|
||||
PaUtilRingBuffer inputRingBuffer;
|
||||
PaUtilRingBuffer outputRingBuffer;
|
||||
size_t ringBufferFrames;
|
||||
ring_buffer_size_t ringBufferFrames;
|
||||
PaSampleFormat inputSampleFormat;
|
||||
size_t inputSampleSizeActual;
|
||||
size_t inputSampleSizePow2;
|
||||
|
@ -87,8 +87,6 @@ typedef struct {
|
|||
size_t outputSampleSizeActual;
|
||||
size_t outputSampleSizePow2;
|
||||
|
||||
size_t framesPerBuffer;
|
||||
|
||||
int inChan;
|
||||
int outChan;
|
||||
|
||||
|
@ -117,8 +115,7 @@ PaError initializeBlioRingBuffers(
|
|||
PaMacBlio *blio,
|
||||
PaSampleFormat inputSampleFormat,
|
||||
PaSampleFormat outputSampleFormat,
|
||||
size_t framesPerBuffer,
|
||||
long ringBufferSize,
|
||||
long ringBufferSizeInFrames,
|
||||
int inChan,
|
||||
int outChan );
|
||||
PaError destroyBlioRingBuffers( PaMacBlio *blio );
|
||||
|
@ -131,6 +128,7 @@ int BlioCallback(
|
|||
PaStreamCallbackFlags statusFlags,
|
||||
void *userData );
|
||||
|
||||
void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio );
|
||||
PaError waitUntilBlioWriteBufferIsEmpty( PaMacBlio *blio, double sampleRate,
|
||||
size_t framesPerBuffer );
|
||||
|
||||
#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
|
||||
* 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";
|
||||
result = paInternalError; break;
|
||||
case kAudioUnitErr_Uninitialized:
|
||||
errorText = "Audio Unit: Unitialized";
|
||||
errorText = "Audio Unit: Uninitialized";
|
||||
result = paInternalError; break;
|
||||
case kAudioUnitErr_InvalidScope:
|
||||
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
|
||||
* succession. The function below could be used to with a condition variable.
|
||||
* to prevent propertychanges from happening until the last property
|
||||
* 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.
|
||||
* therefore, this function is not used, but it is aluded to in commented code below,
|
||||
* since it represents a theoretically better implementation.
|
||||
|
@ -505,7 +505,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
if( 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;
|
||||
}
|
||||
|
||||
|
@ -516,7 +516,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
is available, it uses the smallest available size.
|
||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||
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.
|
||||
*/
|
||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||
|
@ -641,13 +641,13 @@ OSStatus xrunCallback(
|
|||
return 0;
|
||||
}
|
||||
|
||||
int initializeXRunListenerList()
|
||||
int initializeXRunListenerList( void )
|
||||
{
|
||||
xRunListSize = 0;
|
||||
bzero( (void *) &firstXRunListNode, sizeof(firstXRunListNode) );
|
||||
return pthread_mutex_init( &xrunMutex, NULL );
|
||||
}
|
||||
int destroyXRunListenerList()
|
||||
int destroyXRunListenerList( void )
|
||||
{
|
||||
PaMacXRunListNode *node;
|
||||
node = firstXRunListNode.next;
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
#define INPUT_ELEMENT (1)
|
||||
#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
|
||||
|
@ -91,7 +91,7 @@
|
|||
# define DBUG(MSG)
|
||||
#endif
|
||||
|
||||
/* Verbose Debugging: useful for developement */
|
||||
/* Verbose Debugging: useful for development */
|
||||
/*
|
||||
#define MAC_CORE_VERBOSE_DEBUG
|
||||
*/
|
||||
|
@ -183,7 +183,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device,
|
|||
is available, it uses the smallest available size.
|
||||
actualFramesPerBuffer will be set to the actual value on successful return.
|
||||
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.
|
||||
*/
|
||||
PaError setBestFramesPerBuffer( const AudioDeviceID device,
|
||||
|
@ -206,9 +206,9 @@ OSStatus xrunCallback(
|
|||
void* inClientData ) ;
|
||||
|
||||
/** 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. */
|
||||
int destroyXRunListenerList();
|
||||
int destroyXRunListenerList( void );
|
||||
|
||||
/**Returns the list, so that it can be passed to CorAudio.*/
|
||||
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
|
||||
*
|
||||
* 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
|
||||
#define DIRECTSOUND_VERSION 0x0800
|
||||
|
@ -408,16 +408,6 @@ static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, cons
|
|||
|
||||
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);
|
||||
|
||||
result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
|
||||
|
@ -426,7 +416,6 @@ static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, cons
|
|||
result = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -667,7 +656,7 @@ static GUID pawin_IID_IKsPropertySet =
|
|||
property, and the other is using DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE.
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
** 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.
|
||||
*/
|
||||
|
@ -904,6 +893,9 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
|||
case DSSPEAKER_STEREO: count = 2; break;
|
||||
case DSSPEAKER_SURROUND: count = 4; break;
|
||||
case DSSPEAKER_5POINT1: count = 6; break;
|
||||
#ifndef DSSPEAKER_7POINT1
|
||||
#define DSSPEAKER_7POINT1 0x00000007
|
||||
#endif
|
||||
case DSSPEAKER_7POINT1: count = 8; break;
|
||||
#ifndef DSSPEAKER_7POINT1_SURROUND
|
||||
#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
|
||||
** 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.
|
||||
*/
|
||||
|
@ -2136,7 +2128,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
}
|
||||
else
|
||||
{
|
||||
CalculateBufferSettings( &stream->hostBufferSizeFrames, &pollingPeriodFrames,
|
||||
CalculateBufferSettings( (unsigned long*)&stream->hostBufferSizeFrames, &pollingPeriodFrames,
|
||||
/* isFullDuplex = */ (inputParameters && outputParameters),
|
||||
suggestedInputLatencyFrames,
|
||||
suggestedOutputLatencyFrames,
|
||||
|
@ -2252,7 +2244,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
|
||||
/* create half duplex buffers. also used for full-duplex streams which didn't
|
||||
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.
|
||||
*/
|
||||
|
||||
|
@ -2795,7 +2787,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
|
||||
#else
|
||||
|
||||
/* tick using WaitForSingleObject timout */
|
||||
/* tick using WaitForSingleObject timeout */
|
||||
while ( WaitForSingleObject( stream->processingCompleted, timerPeriodMs ) == WAIT_TIMEOUT )
|
||||
{
|
||||
TimerCallback( 0, 0, (DWORD_PTR)pArg, 0, 0 );
|
||||
|
|
|
@ -210,7 +210,7 @@ void PaWinDs_TerminateDSoundEntryPoints(void)
|
|||
{
|
||||
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.DirectSoundEnumerateW = 0;
|
||||
paWinDsDSoundEntryPoints.DirectSoundEnumerateA = 0;
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#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
|
||||
#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
|
||||
* Latest Version at: http://www.portaudio.com
|
||||
* JACK Implementation by Joshua Haberman
|
||||
|
@ -71,6 +71,8 @@
|
|||
#include "pa_ringbuffer.h"
|
||||
#include "pa_debugprint.h"
|
||||
|
||||
#include "pa_jack.h"
|
||||
|
||||
static pthread_t mainThread_;
|
||||
static char *jackErr_ = NULL;
|
||||
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
|
||||
* Latest Version at: http://www.portaudio.com
|
||||
* OSS implementation by:
|
||||
|
@ -466,7 +466,7 @@ static PaError QueryDevice( char *deviceName, PaOSSHostApiRepresentation *ossApi
|
|||
|
||||
/* douglas:
|
||||
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.
|
||||
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
|
||||
pthread_testcancel();
|
||||
#else
|
||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
||||
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||
if( stream->callbackStop || stream->callbackAbort )
|
||||
{
|
||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||
|
@ -1369,7 +1369,7 @@ static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *fr
|
|||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#else
|
||||
/* avoid indefinite waiting on thread not supporting cancelation */
|
||||
/* avoid indefinite waiting on thread not supporting cancellation */
|
||||
if( stream->callbackStop || stream->callbackAbort )
|
||||
{
|
||||
PA_DEBUG(( "Cancelling PaOssStream_WaitForFrames\n" ));
|
||||
|
@ -1640,7 +1640,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
|||
#ifdef PTHREAD_CANCELED
|
||||
pthread_testcancel();
|
||||
#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" ));
|
||||
break;
|
||||
|
@ -1681,7 +1681,7 @@ static void *PaOSS_AudioThreadProc( void *userData )
|
|||
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" ));
|
||||
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
|
||||
* 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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
* demonstrates how to use the common functions to implement support
|
||||
* for a host API
|
||||
|
@ -413,7 +413,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
inputChannelCount = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
@ -442,7 +442,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
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 *
|
||||
**************
|
||||
|
||||
----------------------------------------
|
||||
Microsoft Visual Studio 2005SP1/2008/10
|
||||
----------------------------------------
|
||||
No specific actions are needed to compile WASAPI API under Visual Studio.
|
||||
-------------------------------------------
|
||||
Microsoft Visual Studio 2005 SP1 and higher
|
||||
-------------------------------------------
|
||||
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
|
||||
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
|
||||
in order to be compiled by MinGW compiler. These files are taken from
|
||||
Windows Vista SDK (v6.0A). MinGW compilation is tested and proved to be
|
||||
fully working under 32-bit and 64-bit modes.
|
||||
MinGW (32-bit) tested: gcc version 4.4.0 (GCC)
|
||||
MinGW64 (64-bit) tested: gcc version 4.4.4 20100226 (prerelease) (GCC)
|
||||
|
||||
PortAudio
|
||||
/Dmitry Kostjuchenko/
|
||||
04.03.2010
|
||||
for the compatibility with MinGW compiler. These files are taken from
|
||||
the Windows Vista SDK (v6.0A). MinGW compilation is tested and proved to be
|
||||
fully working.
|
||||
MinGW (32-bit) tested min. version: gcc version 4.4.0 (GCC)
|
||||
MinGW64 (64-bit) tested min. version: gcc version 4.4.4 20100226 (prerelease) (GCC)
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: pa_win_wdmks.c 1945 2015-01-21 06:24:32Z rbencina $
|
||||
* $Id$
|
||||
* PortAudio Windows WDM-KS interface
|
||||
*
|
||||
* Author: Andrew Baldwin, Robert Bielik (WaveRT)
|
||||
|
@ -94,7 +94,9 @@ of a device for the duration of active stream using those devices
|
|||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#ifndef __GNUC__ /* Fix for ticket #257: MinGW-w64: Inclusion of <winioctl.h> triggers multiple redefinition errors. */
|
||||
#include <winioctl.h>
|
||||
#endif
|
||||
#include <process.h>
|
||||
|
||||
#include <math.h>
|
||||
|
@ -161,9 +163,15 @@ Default is to use the pin category.
|
|||
#define DYNAMIC_GUID(data) {data}
|
||||
//#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */
|
||||
//#undef DEFINE_GUID
|
||||
//#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)
|
||||
//#ifdef __clang__ /* clang-cl: avoid too many arguments error */
|
||||
// #define DEFINE_GUID(n, ...) EXTERN_C const GUID n = {__VA_ARGS__}
|
||||
// #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
|
||||
|
||||
#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"));
|
||||
assert(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1075,8 +1084,8 @@ static const KSTOPOLOGY_CONNECTION* FindStartConnectionTo(ULONG startPin, PaWinW
|
|||
}
|
||||
}
|
||||
|
||||
/* Unconnected pin. Inform caller. */
|
||||
PA_DEBUG(("FindStartConnectionTo: returning NULL\n"));
|
||||
assert(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1968,8 +1977,8 @@ static PaWinWdmPin* PinNew(PaWinWdmFilter* parentFilter, unsigned long pinId, Pa
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Should never come here! */
|
||||
assert(FALSE);
|
||||
/* Unconnected pin */
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2842,6 +2851,10 @@ PaError FilterInitializePins( PaWinWdmFilter* filter )
|
|||
filter->pins[pinId] = newPin;
|
||||
++filter->validPinCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
filter->pins[pinId] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (filter->validPinCount == 0)
|
||||
|
@ -4367,7 +4380,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
userInputChannels = 0;
|
||||
inputSampleFormat = hostInputSampleFormat = paInt16; /* Supress 'uninitialised var' warnings. */
|
||||
inputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */
|
||||
}
|
||||
|
||||
if( outputParameters )
|
||||
|
@ -4402,7 +4415,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
else
|
||||
{
|
||||
userOutputChannels = 0;
|
||||
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Supress 'uninitialized var' warnings. */
|
||||
outputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */
|
||||
}
|
||||
|
||||
/* validate platform specific flags */
|
||||
|
@ -4587,6 +4600,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
}
|
||||
else
|
||||
{
|
||||
hostInputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */
|
||||
|
||||
stream->capture.pPin = NULL;
|
||||
stream->capture.bytesPerFrame = 0;
|
||||
}
|
||||
|
@ -4711,6 +4726,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
}
|
||||
else
|
||||
{
|
||||
hostOutputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */
|
||||
|
||||
stream->render.pPin = NULL;
|
||||
stream->render.bytesPerFrame = 0;
|
||||
}
|
||||
|
@ -6535,6 +6552,7 @@ static PaError PaPinCaptureSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo,
|
|||
assert(packet != 0);
|
||||
PA_HP_TRACE((pInfo->stream->hLog, "Capture submit: %u", eventIndex));
|
||||
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);
|
||||
result = PinRead(pInfo->stream->capture.pPin->handle, packet);
|
||||
++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.
|
||||
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
|
||||
advantage of working with ANY Windows audio hardware which is available
|
||||
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
|
||||
* Implementation of PortAudio for Windows MultiMedia Extensions (WMME)
|
||||
*
|
||||
|
@ -58,7 +58,7 @@
|
|||
RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices
|
||||
refactoring, renaming and fixed a few edge case bugs
|
||||
RDB20020531 - converted to V19 framework
|
||||
** NOTE maintanance history is now stored in CVS **
|
||||
** NOTE maintenance history is now stored in CVS **
|
||||
*/
|
||||
|
||||
/** @file
|
||||
|
@ -192,7 +192,7 @@
|
|||
|
||||
/* 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
|
||||
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.
|
||||
*/
|
||||
#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 */
|
||||
static char *CopyTCharStringToUtf8CString(char *destination, size_t destLengthBytes, const TCHAR *source)
|
||||
/* Copy null-terminated WCHAR string to explicit char string using UTF8 encoding */
|
||||
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:
|
||||
"""
|
||||
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)
|
||||
return NULL;
|
||||
return destination;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* returns required length (in bytes) of destination buffer when
|
||||
converting TCHAR string to UTF8 bytes, not including the terminating null. */
|
||||
static size_t TCharStringLen(const TCHAR *str)
|
||||
converting WCHAR string to UTF8 bytes, not including the terminating null. */
|
||||
static size_t WCharStringLen(const WCHAR *str)
|
||||
{
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
return strlen(str);
|
||||
#else
|
||||
return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
#endif
|
||||
return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
|
@ -298,45 +290,25 @@ static signed long GetStreamWriteAvailable( PaStream* stream );
|
|||
|
||||
/* macros for setting last host error information */
|
||||
|
||||
#ifdef UNICODE
|
||||
|
||||
#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
|
||||
{ \
|
||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||
waveInGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||
WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
|
||||
mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
||||
#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
|
||||
{ \
|
||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||
waveInGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||
WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1, \
|
||||
mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
||||
}
|
||||
|
||||
#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
|
||||
{ \
|
||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||
waveOutGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||
WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
|
||||
mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||
PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText ); \
|
||||
#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
|
||||
{ \
|
||||
wchar_t mmeErrorTextWide[ MAXERRORLENGTH ]; \
|
||||
char mmeErrorText[ MAXERRORLENGTH ]; \
|
||||
waveOutGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH ); \
|
||||
WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1, \
|
||||
mmeErrorText, MAXERRORLENGTH, NULL, NULL ); \
|
||||
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 )
|
||||
|
@ -667,13 +639,16 @@ static void DetectDefaultSampleRate( PaWinMmeDeviceInfo *winMmeDeviceInfo, int w
|
|||
|
||||
|
||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||
static int QueryWaveInKSFilterMaxChannels( int waveInDeviceId, int *maxChannels )
|
||||
static int QueryWaveInKSFilterMaxChannels( UINT waveInDeviceId, int *maxChannels )
|
||||
{
|
||||
void *devicePath;
|
||||
DWORD devicePathSize;
|
||||
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 )
|
||||
return 0;
|
||||
|
||||
|
@ -682,7 +657,7 @@ static int QueryWaveInKSFilterMaxChannels( int waveInDeviceId, int *maxChannels
|
|||
return 0;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 1 );
|
||||
|
@ -706,13 +681,13 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
|||
PaError result = paNoError;
|
||||
char *deviceName; /* non-const ptr */
|
||||
MMRESULT mmresult;
|
||||
WAVEINCAPS wic;
|
||||
WAVEINCAPSW wic;
|
||||
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
||||
size_t len;
|
||||
|
||||
*success = 0;
|
||||
|
||||
mmresult = waveInGetDevCaps( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPS ) );
|
||||
mmresult = waveInGetDevCapsW( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPSW ) );
|
||||
if( mmresult == MMSYSERR_NOMEM )
|
||||
{
|
||||
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. */
|
||||
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. */
|
||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||
winMmeHostApi->allocations,
|
||||
|
@ -742,12 +717,12 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
|||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
}
|
||||
CopyTCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||
CopyWCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||
strcat( deviceName, constInputMapperSuffix_ );
|
||||
}
|
||||
else
|
||||
{
|
||||
len = TCharStringLen( wic.szPname ) + 1;
|
||||
len = WCharStringLen( wic.szPname ) + 1;
|
||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||
winMmeHostApi->allocations,
|
||||
(long)len );
|
||||
|
@ -756,7 +731,7 @@ static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeH
|
|||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
}
|
||||
CopyTCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||
CopyWCharStringToUtf8CString( deviceName, len, wic.szPname );
|
||||
}
|
||||
deviceInfo->name = deviceName;
|
||||
|
||||
|
@ -797,13 +772,16 @@ error:
|
|||
|
||||
|
||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||
static int QueryWaveOutKSFilterMaxChannels( int waveOutDeviceId, int *maxChannels )
|
||||
static int QueryWaveOutKSFilterMaxChannels( UINT waveOutDeviceId, int *maxChannels )
|
||||
{
|
||||
void *devicePath;
|
||||
DWORD devicePathSize;
|
||||
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 )
|
||||
return 0;
|
||||
|
||||
|
@ -812,7 +790,7 @@ static int QueryWaveOutKSFilterMaxChannels( int waveOutDeviceId, int *maxChannel
|
|||
return 0;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 0 );
|
||||
|
@ -836,7 +814,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
|||
PaError result = paNoError;
|
||||
char *deviceName; /* non-const ptr */
|
||||
MMRESULT mmresult;
|
||||
WAVEOUTCAPS woc;
|
||||
WAVEOUTCAPSW woc;
|
||||
PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
|
||||
size_t len;
|
||||
#ifdef PAWIN_USE_WDMKS_DEVICE_INFO
|
||||
|
@ -845,7 +823,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
|||
|
||||
*success = 0;
|
||||
|
||||
mmresult = waveOutGetDevCaps( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPS ) );
|
||||
mmresult = waveOutGetDevCapsW( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPSW ) );
|
||||
if( mmresult == MMSYSERR_NOMEM )
|
||||
{
|
||||
result = paInsufficientMemory;
|
||||
|
@ -866,7 +844,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
|||
if( winMmeOutputDeviceId == WAVE_MAPPER )
|
||||
{
|
||||
/* 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(
|
||||
winMmeHostApi->allocations,
|
||||
(long)len );
|
||||
|
@ -875,12 +853,12 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
|||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
}
|
||||
CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||
CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||
strcat( deviceName, constOutputMapperSuffix_ );
|
||||
}
|
||||
else
|
||||
{
|
||||
len = TCharStringLen( woc.szPname ) + 1;
|
||||
len = WCharStringLen( woc.szPname ) + 1;
|
||||
deviceName = (char*)PaUtil_GroupAllocateMemory(
|
||||
winMmeHostApi->allocations,
|
||||
(long)len );
|
||||
|
@ -889,7 +867,7 @@ static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMme
|
|||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
}
|
||||
CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||
CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );
|
||||
}
|
||||
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 */
|
||||
preferredDeviceStatusFlags = 0;
|
||||
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;
|
||||
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;
|
||||
|
||||
|
@ -2563,7 +2541,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;
|
||||
|
||||
/* 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 =
|
||||
(unsigned long)(stream->bufferProcessor.framesPerHostBuffer *
|
||||
stream->bufferProcessor.samplePeriod * .25 * 1000);
|
||||
|
@ -2886,7 +2864,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
if( waitResult == WAIT_FAILED )
|
||||
{
|
||||
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;
|
||||
}
|
||||
else if( waitResult == WAIT_TIMEOUT )
|
||||
|
@ -3161,7 +3139,7 @@ PA_THREAD_FUNC ProcessingThreadProc( void *pArg )
|
|||
if( outputUnderflow && !done && !stream->stopProcessing )
|
||||
{
|
||||
/* Recover from underflow in the case where the
|
||||
underflow occured while processing the buffer
|
||||
underflow occurred while processing the buffer
|
||||
we just finished */
|
||||
|
||||
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
|
||||
better this way */
|
||||
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
|
||||
*
|
||||
* 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
|
||||
* UNIX platform-specific support functions
|
||||
*
|
||||
|
@ -236,7 +236,7 @@ pthread_t paUnixMainThread = 0;
|
|||
pthread_t paUnixMainThread = 0;
|
||||
#endif
|
||||
|
||||
PaError PaUnixThreading_Initialize()
|
||||
PaError PaUnixThreading_Initialize( void )
|
||||
{
|
||||
paUnixMainThread = pthread_self();
|
||||
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
|
||||
* UNIX platform-specific support functions
|
||||
*
|
||||
|
@ -157,7 +157,7 @@ typedef struct
|
|||
|
||||
/** Initialize global threading state.
|
||||
*/
|
||||
PaError PaUnixThreading_Initialize();
|
||||
PaError PaUnixThreading_Initialize( void );
|
||||
|
||||
/** Perish, passing on eventual error code.
|
||||
*
|
||||
|
@ -182,7 +182,7 @@ PaError PaUnixThreading_Initialize();
|
|||
/** Spawn a thread.
|
||||
*
|
||||
* 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.
|
||||
* @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
|
||||
|
@ -195,7 +195,7 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*threadFunc)( void* ), void
|
|||
|
||||
/** 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.
|
||||
*/
|
||||
PaError PaUnixThread_Terminate( PaUnixThread* self, int wait, PaError* exitResult );
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#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" )
|
||||
#endif
|
||||
|
||||
|
@ -76,7 +76,11 @@ PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitial
|
|||
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) */
|
||||
#else
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
#endif
|
||||
if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
|
||||
{
|
||||
PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
|
||||
|
@ -131,7 +135,7 @@ void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitiali
|
|||
DWORD currentThreadId = GetCurrentThreadId();
|
||||
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));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -55,7 +55,7 @@ extern "C"
|
|||
*/
|
||||
typedef struct PaWinUtilComInitializationResult{
|
||||
int state;
|
||||
int initializingThreadId;
|
||||
DWORD initializingThreadId;
|
||||
} 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
|
||||
*
|
||||
* 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
|
||||
* Win32 platform-specific support functions
|
||||
*
|
||||
|
@ -44,14 +44,17 @@
|
|||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h> /* for timeGetTime() */
|
||||
|
||||
#include "pa_util.h"
|
||||
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
|
||||
#pragma comment( lib, "winmm.lib" )
|
||||
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||
#include <sys/timeb.h> /* for _ftime_s() */
|
||||
#else
|
||||
#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
|
||||
|
||||
#include "pa_util.h"
|
||||
|
||||
/*
|
||||
Track memory allocations to avoid leaks.
|
||||
|
@ -144,8 +147,12 @@ double PaUtil_GetTime( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef UNDER_CE
|
||||
#ifndef UNDER_CE
|
||||
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||
return GetTickCount64() * .001;
|
||||
#else
|
||||
return timeGetTime() * .001;
|
||||
#endif
|
||||
#else
|
||||
return GetTickCount() * .001;
|
||||
#endif
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||
#include <mmreg.h> /* for WAVEFORMATEX */
|
||||
#endif
|
||||
|
||||
#include "portaudio.h"
|
||||
#include "pa_win_waveformat.h"
|
||||
|
@ -47,6 +50,7 @@
|
|||
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
|
||||
#endif
|
||||
|
||||
|
||||
static GUID pawin_ksDataFormatSubtypeGuidBase =
|
||||
{ (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->cbSize = 22;
|
||||
|
||||
*((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =
|
||||
waveFormatEx->wBitsPerSample;
|
||||
memcpy(&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE],
|
||||
&waveFormatEx->wBitsPerSample, sizeof(WORD));
|
||||
|
||||
memcpy(&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK],
|
||||
&channelMask, sizeof(DWORD));
|
||||
|
||||
*((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;
|
||||
|
||||
guid = pawin_ksDataFormatSubtypeGuidBase;
|
||||
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 )
|
||||
|
@ -129,7 +134,7 @@ PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
|
|||
/* case 7: */
|
||||
case 8:
|
||||
/* 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. */
|
||||
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
|
||||
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
|
||||
speakers accross multiple physical speakers.
|
||||
speakers across multiple physical speakers.
|
||||
|
||||
if(nChannels==1) {
|
||||
pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
|
||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
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.
|
||||
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.
|
||||
*/
|
||||
|
|
|
@ -55,7 +55,7 @@ TODO:
|
|||
o- inline dither code
|
||||
o- implement Dither only (no-clip) 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
|
||||
byte and word sized register access.
|
||||
|
@ -116,7 +116,7 @@ TODO:
|
|||
|
||||
/*
|
||||
-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 )
|
||||
{
|
||||
|
|
|
@ -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