From 2ea2d92e3b4e1e87ffe1df14da877334834a499f Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Fri, 11 Oct 2013 02:06:28 +0200 Subject: [PATCH] Release 4.0.12 tarball --- configure | 4541 +++++++---------- doc/html/RtAudio_8h.html | 136 +- doc/html/RtAudio_8h_source.html | 1368 ++--- doc/html/RtError_8h_source.html | 104 +- doc/html/acknowledge.html | 17 +- doc/html/annotated.html | 27 +- doc/html/apinotes.html | 41 +- doc/html/classRtAudio-members.html | 76 +- doc/html/classRtAudio.html | 539 +- doc/html/classRtError-members.html | 53 +- doc/html/classRtError.html | 119 +- doc/html/classes.html | 31 +- doc/html/compiling.html | 31 +- doc/html/doxygen.css | 920 +++- doc/html/doxygen.png | Bin 1281 -> 3779 bytes doc/html/duplex.html | 147 +- doc/html/errors.html | 17 +- doc/html/files.html | 21 +- doc/html/functions.html | 80 +- doc/html/functions_enum.html | 20 +- doc/html/functions_eval.html | 20 +- doc/html/functions_func.html | 25 +- doc/html/functions_vars.html | 20 +- doc/html/globals.html | 20 +- doc/html/globals_type.html | 20 +- doc/html/index.html | 49 +- doc/html/license.html | 17 +- doc/html/multi.html | 17 +- doc/html/pages.html | 52 +- doc/html/playback.html | 159 +- doc/html/probe.html | 113 +- doc/html/recording.html | 133 +- doc/html/settings.html | 73 +- .../structRtAudio_1_1DeviceInfo-members.html | 39 +- doc/html/structRtAudio_1_1DeviceInfo.html | 129 +- ...tructRtAudio_1_1StreamOptions-members.html | 29 +- doc/html/structRtAudio_1_1StreamOptions.html | 85 +- ...ctRtAudio_1_1StreamParameters-members.html | 27 +- .../structRtAudio_1_1StreamParameters.html | 69 +- doc/html/tabs.css | 133 +- 40 files changed, 4810 insertions(+), 4707 deletions(-) diff --git a/configure b/configure index b71e561..cab5204 100755 --- a/configure +++ b/configure @@ -1,20 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for RtAudio 4.0. +# Generated by GNU Autoconf 2.69 for RtAudio 4.0. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -46,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -96,15 +89,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -116,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -133,330 +131,345 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: gary@music.mcgill.ca about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break fi - fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -fi -fi +} # as_fn_mkdir_p +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -473,9 +486,12 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -484,29 +500,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -521,49 +526,29 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -572,11 +557,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -591,7 +576,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='RtAudio' @@ -599,6 +583,7 @@ PACKAGE_TARNAME='rtaudio' PACKAGE_VERSION='4.0' PACKAGE_STRING='RtAudio 4.0' PACKAGE_BUGREPORT='gary@music.mcgill.ca' +PACKAGE_URL='' ac_unique_file="RtAudio.cpp" # Factoring default headers for most tests. @@ -640,6 +625,9 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS objects +PULSE_LIBS +PULSE_CFLAGS +req api libflags sharedname @@ -670,6 +658,9 @@ CPPFLAGS LDFLAGS CXXFLAGS CXX +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG GXX target_alias host_alias @@ -701,6 +692,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -723,6 +715,9 @@ with_ds ac_precious_vars='build_alias host_alias target_alias +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR CXX CXXFLAGS LDFLAGS @@ -731,7 +726,9 @@ CPPFLAGS CCC CC CFLAGS -CPP' +CPP +PULSE_CFLAGS +PULSE_LIBS' # Initialize some variables set by options. @@ -794,8 +791,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -840,8 +838,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -867,8 +864,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1072,8 +1068,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1089,8 +1084,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1120,17 +1114,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1139,7 +1133,7 @@ Try \`$0 --help' for more information." >&2 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1147,15 +1141,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1178,8 +1170,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1193,8 +1184,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1209,11 +1198,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1252,13 +1239,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1298,7 +1283,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1372,16 +1357,24 @@ Optional Packages: --with-ds = choose DirectSound API support (windoze only) Some influential environment variables: + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor + PULSE_CFLAGS + C compiler flags for PULSE, overriding pkg-config + PULSE_LIBS linker flags for PULSE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1391,80 +1384,473 @@ _ACEOF ac_status=$? fi -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +RtAudio configure 4.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------- ## +## Report this to gary@music.mcgill.ca ## +## ----------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -RtAudio configure 4.0 -generated by GNU Autoconf 2.63 +} # ac_fn_c_try_link -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} _ACEOF - exit +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by RtAudio $as_me 4.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1500,8 +1886,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1538,9 +1924,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1556,13 +1942,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1574,11 +1960,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1587,13 +1971,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1612,11 +1996,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1629,11 +2011,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1647,11 +2027,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1665,46 +2043,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1715,19 +2100,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1735,7 +2124,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1750,11 +2139,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1764,17 +2153,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1786,43 +2175,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1848,9 +2214,7 @@ for ac_dir in config "$srcdir"/config; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -1863,13 +2227,137 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -ac_config_files="$ac_config_files rtaudio-config Makefile tests/Makefile" +ac_config_files="$ac_config_files rtaudio-config librtaudio.pc Makefile tests/Makefile" # Fill GXX with something before test. GXX="no" + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + + + # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -1885,9 +2373,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -1898,24 +2386,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -1929,9 +2417,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -1942,24 +2430,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -1972,7 +2460,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -1983,48 +2471,31 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2040,8 +2511,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 +$as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2057,17 +2528,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2084,7 +2555,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2103,84 +2574,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "C++ compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 +$as_echo_n "checking for C++ compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2195,32 +2623,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2232,17 +2711,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -2255,31 +2734,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2293,37 +2764,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -2332,20 +2782,16 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2356,35 +2802,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2395,36 +2817,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2435,42 +2833,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -2496,9 +2869,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -2509,24 +2882,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2536,9 +2909,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -2549,24 +2922,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2575,7 +2948,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2587,9 +2960,9 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AR+set}" = set; then +if ${ac_cv_path_AR+:} false; then : $as_echo_n "(cached) " >&6 else case $AR in @@ -2602,14 +2975,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_AR" && ac_cv_path_AR="no" @@ -2618,18 +2991,16 @@ esac fi AR=$ac_cv_path_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if [ $AR = "no" ] ; then - { { $as_echo "$as_me:$LINENO: error: \"Could not find ar - needed to create a library\"" >&5 -$as_echo "$as_me: error: \"Could not find ar - needed to create a library\"" >&2;} - { (exit 1); exit 1; }; }; + as_fn_error $? "\"Could not find ar - needed to create a library\"" "$LINENO" 5; fi # Checks for header files. @@ -2641,9 +3012,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2654,24 +3025,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2681,9 +3052,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2694,24 +3065,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2720,7 +3091,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2734,9 +3105,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2747,24 +3118,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2774,9 +3145,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2788,18 +3159,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2818,10 +3189,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2833,9 +3204,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2846,24 +3217,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2877,9 +3248,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2890,24 +3261,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2920,7 +3291,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2931,62 +3302,42 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3000,37 +3351,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3039,20 +3369,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3063,35 +3389,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3102,36 +3404,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3142,42 +3420,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3194,23 +3447,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3262,32 +3510,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3298,17 +3523,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3322,14 +3549,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3344,11 +3571,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3357,78 +3580,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3440,7 +3619,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3451,11 +3630,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3464,87 +3639,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3554,9 +3682,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3567,10 +3695,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3587,7 +3715,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3602,26 +3730,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3635,10 +3761,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3655,7 +3781,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3670,12 +3796,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3683,21 +3807,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3712,48 +3832,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3763,18 +3858,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3784,14 +3875,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3818,118 +3905,33 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -3939,150 +3941,11 @@ fi done - - for ac_header in sys/ioctl.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to gary@music.mcgill.ca ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4093,112 +3956,28 @@ done # Check for debug -{ $as_echo "$as_me:$LINENO: checking whether to compile debug version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile debug version" >&5 $as_echo_n "checking whether to compile debug version... " >&6; } # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; cppflag=-D__RTAUDIO_DEBUG__ cxxflag=-g object_path=Debug - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else cppflag= cxxflag=-O2 object_path=Release - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Checks for functions -{ $as_echo "$as_me:$LINENO: checking for gettimeofday" >&5 -$as_echo_n "checking for gettimeofday... " >&6; } -if test "${ac_cv_func_gettimeofday+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gettimeofday to an innocuous variant, in case declares gettimeofday. - For example, HP-UX 11i declares gettimeofday. */ -#define gettimeofday innocuous_gettimeofday - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gettimeofday (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gettimeofday - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gettimeofday (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday -choke me -#endif - -int -main () -{ -return gettimeofday (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gettimeofday=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gettimeofday=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -$as_echo "$ac_cv_func_gettimeofday" >&6; } -if test "x$ac_cv_func_gettimeofday" = x""yes; then +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes; then : cppflag="$cppflag -DHAVE_GETTIMEOFDAY" fi @@ -4220,35 +3999,27 @@ CXXFLAGS="$CXXFLAGS $cxxflag" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4264,28 +4035,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4321,27 +4088,24 @@ esac # Checks for package options and external software api="" -{ $as_echo "$as_me:$LINENO: checking for audio API" >&5 +req="" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for audio API" >&5 $as_echo_n "checking for audio API... " >&6; } case $host in *-*-netbsd*) - { $as_echo "$as_me:$LINENO: result: using OSS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OSS" >&5 $as_echo "using OSS" >&6; } api="$api -D__LINUX_OSS__" LIBS="$LIBS -lossaudio" - -{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4359,43 +4123,18 @@ return pthread_create (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -4403,9 +4142,7 @@ _ACEOF LIBS="-lpthread $LIBS" else - { { $as_echo "$as_me:$LINENO: error: RtAudio requires the pthread library!" >&5 -$as_echo "$as_me: error: RtAudio requires the pthread library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "RtAudio requires the pthread library!" "$LINENO" 5 fi ;; @@ -4413,24 +4150,19 @@ fi *-*-linux*) # Check whether --with-jack was given. -if test "${with_jack+set}" = set; then +if test "${with_jack+set}" = set; then : withval=$with_jack; api="$api -D__UNIX_JACK__" - { $as_echo "$as_me:$LINENO: result: using JACK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using JACK" >&5 $as_echo "using JACK" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for jack_client_open in -ljack" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jack_client_open in -ljack" >&5 $as_echo_n "checking for jack_client_open in -ljack... " >&6; } -if test "${ac_cv_lib_jack_jack_client_open+set}" = set; then +if ${ac_cv_lib_jack_jack_client_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4446,45 +4178,20 @@ main () return jack_client_open (); ; return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jack_jack_client_open=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_client_open=no + ac_cv_lib_jack_jack_client_open=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_client_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jack_jack_client_open" >&5 $as_echo "$ac_cv_lib_jack_jack_client_open" >&6; } -if test "x$ac_cv_lib_jack_jack_client_open" = x""yes; then +if test "x$ac_cv_lib_jack_jack_client_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBJACK 1 _ACEOF @@ -4492,24 +4199,17 @@ _ACEOF LIBS="-ljack $LIBS" else - { { $as_echo "$as_me:$LINENO: error: JACK support requires the jack library!" >&5 -$as_echo "$as_me: error: JACK support requires the jack library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "JACK support requires the jack library!" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 $as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } -if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lasound $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4527,43 +4227,18 @@ return snd_pcm_open (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_asound_snd_pcm_open=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_asound_snd_pcm_open=no + ac_cv_lib_asound_snd_pcm_open=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5 $as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } -if test "x$ac_cv_lib_asound_snd_pcm_open" = x""yes; then +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBASOUND 1 _ACEOF @@ -4571,9 +4246,7 @@ _ACEOF LIBS="-lasound $LIBS" else - { { $as_echo "$as_me:$LINENO: error: Jack support also requires the asound library!" >&5 -$as_echo "$as_me: error: Jack support also requires the asound library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Jack support also requires the asound library!" "$LINENO" 5 fi fi @@ -4582,24 +4255,20 @@ fi # Look for ALSA flag # Check whether --with-alsa was given. -if test "${with_alsa+set}" = set; then +if test "${with_alsa+set}" = set; then : withval=$with_alsa; api="$api -D__LINUX_ALSA__" - { $as_echo "$as_me:$LINENO: result: using ALSA" >&5 + req="$req alsa" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ALSA" >&5 $as_echo "using ALSA" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 $as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } -if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lasound $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4617,43 +4286,18 @@ return snd_pcm_open (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_asound_snd_pcm_open=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_asound_snd_pcm_open=no + ac_cv_lib_asound_snd_pcm_open=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5 $as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } -if test "x$ac_cv_lib_asound_snd_pcm_open" = x""yes; then +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBASOUND 1 _ACEOF @@ -4661,9 +4305,7 @@ _ACEOF LIBS="-lasound $LIBS" else - { { $as_echo "$as_me:$LINENO: error: ALSA support requires the asound library!" >&5 -$as_echo "$as_me: error: ALSA support requires the asound library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ALSA support requires the asound library!" "$LINENO" 5 fi fi @@ -4672,123 +4314,111 @@ fi # Look for PULSE flag # Check whether --with-pulse was given. -if test "${with_pulse+set}" = set; then +if test "${with_pulse+set}" = set; then : withval=$with_pulse; api="$api -D__LINUX_PULSE__" - { $as_echo "$as_me:$LINENO: result: using PulseAudio" >&5 + req="$req libpulse-simple" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using PulseAudio" >&5 $as_echo "using PulseAudio" >&6; } -{ $as_echo "$as_me:$LINENO: checking for pa_simple_new in -lpulse-simple" >&5 -$as_echo_n "checking for pa_simple_new in -lpulse-simple... " >&6; } -if test "${ac_cv_lib_pulse_simple_pa_simple_new+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpulse-simple $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSE" >&5 +$as_echo_n "checking for PULSE... " >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pa_simple_new (); -int -main () -{ -return pa_simple_new (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if test -n "$PULSE_CFLAGS"; then + pkg_cv_PULSE_CFLAGS="$PULSE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpulse-simple") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pulse_simple_pa_simple_new=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pulse_simple_pa_simple_new=no + pkg_failed=yes fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pulse_simple_pa_simple_new" >&5 -$as_echo "$ac_cv_lib_pulse_simple_pa_simple_new" >&6; } -if test "x$ac_cv_lib_pulse_simple_pa_simple_new" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPULSE_SIMPLE 1 -_ACEOF +if test -n "$PULSE_LIBS"; then + pkg_cv_PULSE_LIBS="$PULSE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpulse-simple") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse-simple" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + - LIBS="-lpulse-simple $LIBS" +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - { { $as_echo "$as_me:$LINENO: error: PulseAudio support requires the pulse-simple library!" >&5 -$as_echo "$as_me: error: PulseAudio support requires the pulse-simple library!" >&2;} - { (exit 1); exit 1; }; } + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple" 2>&1` + else + PULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PULSE_PKG_ERRORS" >&5 + + as_fn_error $? "PulseAudio support requires the pulse-simple library!" "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "PulseAudio support requires the pulse-simple library!" "$LINENO" 5 +else + PULSE_CFLAGS=$pkg_cv_PULSE_CFLAGS + PULSE_LIBS=$pkg_cv_PULSE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi + LIBS="$LIBS `pkg-config --libs libpulse-simple`" fi # Look for OSS flag # Check whether --with-oss was given. -if test "${with_oss+set}" = set; then +if test "${with_oss+set}" = set; then : withval=$with_oss; api="$api -D__LINUX_OSS__" - { $as_echo "$as_me:$LINENO: result: using OSS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using OSS" >&5 $as_echo "using OSS" >&6; } fi # If no audio api flags specified, use ALSA if test "$api" == ""; then - { $as_echo "$as_me:$LINENO: result: using ALSA" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ALSA" >&5 $as_echo "using ALSA" >&6; } api=-D__LINUX_ALSA__ - -{ $as_echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 + req="$req alsa" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 $as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } -if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lasound $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4806,43 +4436,18 @@ return snd_pcm_open (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_asound_snd_pcm_open=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_asound_snd_pcm_open=no + ac_cv_lib_asound_snd_pcm_open=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5 $as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } -if test "x$ac_cv_lib_asound_snd_pcm_open" = x""yes; then +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBASOUND 1 _ACEOF @@ -4850,26 +4455,19 @@ _ACEOF LIBS="-lasound $LIBS" else - { { $as_echo "$as_me:$LINENO: error: ALSA support requires the asound library!" >&5 -$as_echo "$as_me: error: ALSA support requires the asound library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ALSA support requires the asound library!" "$LINENO" 5 fi fi - -{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4887,43 +4485,18 @@ return pthread_create (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -4931,9 +4504,7 @@ _ACEOF LIBS="-lpthread $LIBS" else - { { $as_echo "$as_me:$LINENO: error: RtAudio requires the pthread library!" >&5 -$as_echo "$as_me: error: RtAudio requires the pthread library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "RtAudio requires the pthread library!" "$LINENO" 5 fi ;; @@ -4941,24 +4512,19 @@ fi *-apple*) # Check whether --with-jack was given. -if test "${with_jack+set}" = set; then +if test "${with_jack+set}" = set; then : withval=$with_jack; api="$api -D__UNIX_JACK__" - { $as_echo "$as_me:$LINENO: result: using JACK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using JACK" >&5 $as_echo "using JACK" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for jack_client_open in -ljack" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jack_client_open in -ljack" >&5 $as_echo_n "checking for jack_client_open in -ljack... " >&6; } -if test "${ac_cv_lib_jack_jack_client_open+set}" = set; then +if ${ac_cv_lib_jack_jack_client_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4976,359 +4542,66 @@ return jack_client_open (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jack_jack_client_open=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_client_open=no + ac_cv_lib_jack_jack_client_open=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_client_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jack_jack_client_open" >&5 $as_echo "$ac_cv_lib_jack_jack_client_open" >&6; } -if test "x$ac_cv_lib_jack_jack_client_open" = x""yes; then +if test "x$ac_cv_lib_jack_jack_client_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBJACK 1 _ACEOF - - LIBS="-ljack $LIBS" - -else - { { $as_echo "$as_me:$LINENO: error: JACK support requires the jack library!" >&5 -$as_echo "$as_me: error: JACK support requires the jack library!" >&2;} - { (exit 1); exit 1; }; } -fi - -fi - - -# AC_CHECK_HEADER(jack/jack.h, [], [AC_MSG_ERROR(Jack header file not found!)] ) -# LIBS="$LIBS -framework jackmp" ], ) - - - # Look for Core flag - -# Check whether --with-core was given. -if test "${with_core+set}" = set; then - withval=$with_core; - api="$api -D__MACOSX_CORE__" - { $as_echo "$as_me:$LINENO: result: using CoreAudio" >&5 -$as_echo "using CoreAudio" >&6; } - if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5 -$as_echo_n "checking CoreAudio/CoreAudio.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5 -$as_echo_n "checking CoreAudio/CoreAudio.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to gary@music.mcgill.ca ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } - -fi -if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: CoreAudio header files not found!" >&5 -$as_echo "$as_me: error: CoreAudio header files not found!" >&2;} - { (exit 1); exit 1; }; } -fi - - - LIBS="$LIBS -framework CoreAudio -framework CoreFoundation" -fi - - - # If no audio api flags specified, use CoreAudio - if test "$api" == ""; then - api=-D__MACOSX_CORE__ - - { $as_echo "$as_me:$LINENO: result: using CoreAudio" >&5 -$as_echo "using CoreAudio" >&6; } - if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5 -$as_echo_n "checking CoreAudio/CoreAudio.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5 -$as_echo_n "checking CoreAudio/CoreAudio.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + + LIBS="-ljack $LIBS" + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + as_fn_error $? "JACK support requires the jack library!" "$LINENO" 5 +fi - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to gary@music.mcgill.ca ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - $as_echo_n "(cached) " >&6 +# AC_CHECK_HEADER(jack/jack.h, [], [AC_MSG_ERROR(Jack header file not found!)] ) +# LIBS="$LIBS -framework jackmp" ], ) + + + # Look for Core flag + +# Check whether --with-core was given. +if test "${with_core+set}" = set; then : + withval=$with_core; + api="$api -D__MACOSX_CORE__" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using CoreAudio" >&5 +$as_echo "using CoreAudio" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "CoreAudio/CoreAudio.h" "ac_cv_header_CoreAudio_CoreAudio_h" "$ac_includes_default" +if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = xyes; then : + else - ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc + as_fn_error $? "CoreAudio header files not found!" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } + + LIBS="$LIBS -framework CoreAudio -framework CoreFoundation" fi -if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = x""yes; then - : + + + # If no audio api flags specified, use CoreAudio + if test "$api" == ""; then + api=-D__MACOSX_CORE__ + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using CoreAudio" >&5 +$as_echo "using CoreAudio" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "CoreAudio/CoreAudio.h" "ac_cv_header_CoreAudio_CoreAudio_h" "$ac_includes_default" +if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = xyes; then : + else - { { $as_echo "$as_me:$LINENO: error: CoreAudio header files not found!" >&5 -$as_echo "$as_me: error: CoreAudio header files not found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "CoreAudio header files not found!" "$LINENO" 5 fi @@ -5336,19 +4609,14 @@ fi fi - -{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5366,43 +4634,18 @@ return pthread_create (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -5410,9 +4653,7 @@ _ACEOF LIBS="-lpthread $LIBS" else - { { $as_echo "$as_me:$LINENO: error: RtAudio requires the pthread library!" >&5 -$as_echo "$as_me: error: RtAudio requires the pthread library!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "RtAudio requires the pthread library!" "$LINENO" 5 fi ;; @@ -5420,10 +4661,10 @@ fi *-mingw32*) # Check whether --with-asio was given. -if test "${with_asio+set}" = set; then +if test "${with_asio+set}" = set; then : withval=$with_asio; api="$api -D__WINDOWS_ASIO__" - { $as_echo "$as_me:$LINENO: result: using ASIO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ASIO" >&5 $as_echo "using ASIO" >&6; } objects="asio.o asiodrivers.o asiolist.o iasiothiscallresolver.o" @@ -5433,10 +4674,10 @@ fi # Look for DirectSound flag # Check whether --with-ds was given. -if test "${with_ds+set}" = set; then +if test "${with_ds+set}" = set; then : withval=$with_ds; api="$api -D__WINDOWS_DS__" - { $as_echo "$as_me:$LINENO: result: using DirectSound" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using DirectSound" >&5 $as_echo "using DirectSound" >&6; } LIBS="-ldsound -lwinmm $LIBS" fi @@ -5446,7 +4687,7 @@ fi if test "$api" == ""; then api=-D__WINDOWS_DS__ - { $as_echo "$as_me:$LINENO: result: using DirectSound" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using DirectSound" >&5 $as_echo "using DirectSound" >&6; } LIBS="-ldsound -lwinmm $LIBS" fi @@ -5456,9 +4697,7 @@ $as_echo "using DirectSound" >&6; } *) # Default case for unknown realtime systems. - { { $as_echo "$as_me:$LINENO: error: Unknown system type for realtime support!" >&5 -$as_echo "$as_me: error: Unknown system type for realtime support!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Unknown system type for realtime support!" "$LINENO" 5 ;; esac @@ -5491,13 +4730,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -5505,8 +4744,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -5528,12 +4767,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -5583,14 +4833,15 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -5598,13 +4849,14 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -5614,17 +4866,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -5632,23 +4885,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -5656,7 +4901,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -5667,7 +4918,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -5690,13 +4941,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -5706,15 +4950,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -5726,12 +4971,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -5743,7 +4992,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -5757,8 +5088,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -5778,76 +5113,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -5862,49 +5146,85 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5914,13 +5234,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by RtAudio $as_me 4.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5947,13 +5273,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -5964,16 +5292,17 @@ Usage: $0 [OPTION]... [FILE]... Configuration files: $config_files -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ RtAudio config.status 4.0 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -5988,11 +5317,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -6006,14 +5340,17 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -6022,11 +5359,10 @@ do ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -6043,7 +5379,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -6073,12 +5409,11 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "rtaudio-config") CONFIG_FILES="$CONFIG_FILES rtaudio-config" ;; + "librtaudio.pc") CONFIG_FILES="$CONFIG_FILES librtaudio.pc" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -6099,26 +5434,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -6126,7 +5459,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -6134,7 +5473,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -6143,24 +5482,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6168,7 +5501,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -6182,7 +5515,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -6196,7 +5529,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -6216,7 +5549,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -6248,23 +5581,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -6282,9 +5621,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6303,7 +5640,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6312,12 +5649,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -6328,7 +5663,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -6340,10 +5675,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6371,47 +5704,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -6459,7 +5752,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -6469,12 +5761,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -6484,7 +5775,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -6510,27 +5801,24 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -6540,15 +5828,12 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -6569,10 +5854,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/doc/html/RtAudio_8h.html b/doc/html/RtAudio_8h.html index 601e574..9196f77 100644 --- a/doc/html/RtAudio_8h.html +++ b/doc/html/RtAudio_8h.html @@ -8,37 +8,58 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+ +
+
RtAudio.h File Reference
+
-

RtAudio.h File Reference

#include <string>
+
#include <string>
#include <vector>
#include "RtError.h"
#include <sstream>
- +

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - +

Classes

class  RtAudio
 Realtime audio i/o C++ classes. More...
struct  RtAudio::DeviceInfo
 The public device information structure for returning queried values. More...
struct  RtAudio::StreamParameters
 The structure for specifying input or ouput stream parameters. More...
struct  RtAudio::StreamOptions
 The structure for specifying stream options. More...

Typedefs

typedef unsigned long RtAudioFormat
 RtAudio data format type.
typedef unsigned int RtAudioStreamFlags
 RtAudio stream option flags.
typedef unsigned int RtAudioStreamStatus
 RtAudio stream status (over- or underflow) flags.
typedef int(* RtAudioCallback )(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData)
 RtAudio callback function prototype.
+ + + + + + + + + + + + + +

+Classes

class  RtAudio
 Realtime audio i/o C++ classes. More...
 
struct  RtAudio::DeviceInfo
 The public device information structure for returning queried values. More...
 
struct  RtAudio::StreamParameters
 The structure for specifying input or ouput stream parameters. More...
 
struct  RtAudio::StreamOptions
 The structure for specifying stream options. More...
 
+ + + + + + + + + + + + + + + +

+Typedefs

typedef unsigned long RtAudioFormat
 RtAudio data format type.
 
typedef unsigned int RtAudioStreamFlags
 RtAudio stream option flags.
 
typedef unsigned int RtAudioStreamStatus
 RtAudio stream status (over- or underflow) flags.
 
typedef int(* RtAudioCallback )(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData)
 RtAudio callback function prototype.
 
typedef void(* RtAudioErrorCallback )(RtError::Type type, const std::string &errorText)
 RtAudio error callback function prototype.
 
-

Detailed Description

-

Typedef Documentation

- +

Typedef Documentation

+
@@ -46,15 +67,14 @@
typedef unsigned long RtAudioFormat
-
-
+

RtAudio data format type.

-

Support for signed integers and floats. Audio data fed to/from an RtAudio stream is assumed to ALWAYS be in host byte order. The internal routines will automatically take care of any necessary byte-swapping between the host format and the soundcard. Thus, endian-ness is not a concern in the following format definitions. Note that 24-bit data is expected to be encapsulated in a 32-bit format.

+

Support for signed integers and floats. Audio data fed to/from an RtAudio stream is assumed to ALWAYS be in host byte order. The internal routines will automatically take care of any necessary byte-swapping between the host format and the soundcard. Thus, endian-ness is not a concern in the following format definitions.

  • RTAUDIO_SINT8: 8-bit signed integer.
  • RTAUDIO_SINT16: 16-bit signed integer.
  • -
  • RTAUDIO_SINT24: Lower 3 bytes of 32-bit signed integer.
  • +
  • RTAUDIO_SINT24: 24-bit signed integer.
  • RTAUDIO_SINT32: 32-bit signed integer.
  • RTAUDIO_FLOAT32: Normalized between plus/minus 1.0.
  • RTAUDIO_FLOAT64: Normalized between plus/minus 1.0.
  • @@ -62,7 +82,7 @@
- +
@@ -70,8 +90,7 @@
typedef unsigned long RtAudioStreamFlags
-
-
+

RtAudio stream option flags.

The following flags can be OR'ed together to allow a client to make changes to the default stream behavior:

@@ -89,7 +108,7 @@
- +
@@ -97,8 +116,7 @@
typedef unsigned long RtAudioStreamStatus
-
-
+

RtAudio stream status (over- or underflow) flags.

Notification of a stream over- or underflow is indicated by a non-zero stream status argument in the RtAudioCallback function. The stream status can be one of the following two options, depending on whether the stream is open for output and/or input:

@@ -109,40 +127,58 @@
- +
- +
typedef int(* RtAudioCallback)(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData)typedef int(* RtAudioCallback)(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData)
-
-
+

RtAudio callback function prototype.

All RtAudio clients must create a function of type RtAudioCallback to read and/or write data from/to the audio stream. When the underlying audio system is ready for new input or output data, this function will be invoked.

-
Parameters:
- - - - - - - +
Parameters
+
outputBuffer For output (or duplex) streams, the client should write nFrames of audio sample frames into this buffer. This argument should be recast to the datatype specified when the stream was opened. For input-only streams, this argument will be NULL.
inputBuffer For input (or duplex) streams, this buffer will hold nFrames of input audio sample frames. This argument should be recast to the datatype specified when the stream was opened. For output-only streams, this argument will be NULL.
nFrames The number of sample frames of input or output data in the buffers. The actual buffer size in bytes is dependent on the data type and number of channels in use.
streamTime The number of seconds that have elapsed since the stream was started.
status If non-zero, this argument indicates a data overflow or underflow condition for the stream. The particular condition can be determined by comparison with the RtAudioStreamStatus flags.
userData A pointer to optional data provided by the client when opening the stream (default = NULL).
+ + + + + +
outputBufferFor output (or duplex) streams, the client should write nFrames of audio sample frames into this buffer. This argument should be recast to the datatype specified when the stream was opened. For input-only streams, this argument will be NULL.
inputBufferFor input (or duplex) streams, this buffer will hold nFrames of input audio sample frames. This argument should be recast to the datatype specified when the stream was opened. For output-only streams, this argument will be NULL.
nFramesThe number of sample frames of input or output data in the buffers. The actual buffer size in bytes is dependent on the data type and number of channels in use.
streamTimeThe number of seconds that have elapsed since the stream was started.
statusIf non-zero, this argument indicates a data overflow or underflow condition for the stream. The particular condition can be determined by comparison with the RtAudioStreamStatus flags.
userDataA pointer to optional data provided by the client when opening the stream (default = NULL).

To continue normal stream operation, the RtAudioCallback function should return a value of zero. To stop the stream and drain the output buffer, the function should return a value of one. To abort the stream immediately, the client should return a value of two.

+
+ +
+
+ + + + +
typedef void(* RtAudioErrorCallback)(RtError::Type type, const std::string &errorText)
+
+ +

RtAudio error callback function prototype.

+
Parameters
+ + + +
typeType of error.
errorTextError description.
+
+
+
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/RtAudio_8h_source.html b/doc/html/RtAudio_8h_source.html index a5f0026..36b07f5 100644 --- a/doc/html/RtAudio_8h_source.html +++ b/doc/html/RtAudio_8h_source.html @@ -8,670 +8,714 @@
Home   Class/Enum List   File List   Compound Members  

- -

RtAudio.h

Go to the documentation of this file.
00001 /************************************************************************/
-00039 /************************************************************************/
-00040 
-00045 // RtAudio: Version 4.0.11
-00046 
-00047 #ifndef __RTAUDIO_H
-00048 #define __RTAUDIO_H
-00049 
-00050 #include <string>
-00051 #include <vector>
-00052 #include "RtError.h"
-00053 
-00072 typedef unsigned long RtAudioFormat;
-00073 static const RtAudioFormat RTAUDIO_SINT8 = 0x1;    // 8-bit signed integer.
-00074 static const RtAudioFormat RTAUDIO_SINT16 = 0x2;   // 16-bit signed integer.
-00075 static const RtAudioFormat RTAUDIO_SINT24 = 0x4;   // Lower 3 bytes of 32-bit signed integer.
-00076 static const RtAudioFormat RTAUDIO_SINT32 = 0x8;   // 32-bit signed integer.
-00077 static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; // Normalized between plus/minus 1.0.
-00078 static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/minus 1.0.
-00079 
-00122 typedef unsigned int RtAudioStreamFlags;
-00123 static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1;    // Use non-interleaved buffers (default = interleaved).
-00124 static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2;  // Attempt to set stream parameters for lowest possible latency.
-00125 static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4;        // Attempt grab device and prevent use by others.
-00126 static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8; // Try to select realtime scheduling for callback thread.
-00127 static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10; // Use the "default" PCM device (ALSA only).
-00128 
-00140 typedef unsigned int RtAudioStreamStatus;
-00141 static const RtAudioStreamStatus RTAUDIO_INPUT_OVERFLOW = 0x1;    // Input data was discarded because of an overflow condition at the driver.
-00142 static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2;  // The output buffer ran low, likely causing a gap in the output sound.
-00143 
-00145 
-00183 typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
-00184                                 unsigned int nFrames,
-00185                                 double streamTime,
-00186                                 RtAudioStreamStatus status,
-00187                                 void *userData );
-00188 
-00189 
-00190 // **************************************************************** //
-00191 //
-00192 // RtAudio class declaration.
-00193 //
-00194 // RtAudio is a "controller" used to select an available audio i/o
-00195 // interface.  It presents a common API for the user to call but all
-00196 // functionality is implemented by the class RtApi and its
-00197 // subclasses.  RtAudio creates an instance of an RtApi subclass
-00198 // based on the user's API choice.  If no choice is made, RtAudio
-00199 // attempts to make a "logical" API selection.
-00200 //
-00201 // **************************************************************** //
-00202 
-00203 class RtApi;
-00204 
-00205 class RtAudio
-00206 {
-00207  public:
-00208 
-00210   enum Api {
-00211     UNSPECIFIED,    
-00212     LINUX_ALSA,     
-00213     LINUX_PULSE,    
-00214     LINUX_OSS,      
-00215     UNIX_JACK,      
-00216     MACOSX_CORE,    
-00217     WINDOWS_ASIO,   
-00218     WINDOWS_DS,     
-00219     RTAUDIO_DUMMY   
-00220   };
-00221 
-00223   struct DeviceInfo {
-00224     bool probed;                  
-00225     std::string name;             
-00226     unsigned int outputChannels;  
-00227     unsigned int inputChannels;   
-00228     unsigned int duplexChannels;  
-00229     bool isDefaultOutput;         
-00230     bool isDefaultInput;          
-00231     std::vector<unsigned int> sampleRates; 
-00232     RtAudioFormat nativeFormats;  
-00234     // Default constructor.
-00235     DeviceInfo()
-00236       :probed(false), outputChannels(0), inputChannels(0), duplexChannels(0),
-00237        isDefaultOutput(false), isDefaultInput(false), nativeFormats(0) {}
-00238   };
-00239 
-00241   struct StreamParameters {
-00242     unsigned int deviceId;     
-00243     unsigned int nChannels;    
-00244     unsigned int firstChannel; 
-00246     // Default constructor.
-00247     StreamParameters()
-00248       : deviceId(0), nChannels(0), firstChannel(0) {}
-00249   };
-00250 
-00252 
-00308   struct StreamOptions {
-00309     RtAudioStreamFlags flags;      
-00310     unsigned int numberOfBuffers;  
-00311     std::string streamName;        
-00312     int priority;                  
-00314     // Default constructor.
-00315     StreamOptions()
-00316     : flags(0), numberOfBuffers(0), priority(0) {}
-00317   };
-00318 
-00320 
-00325   static void getCompiledApi( std::vector<RtAudio::Api> &apis ) throw();
-00326 
-00328 
-00336   RtAudio( RtAudio::Api api=UNSPECIFIED ) throw();
-00337 
-00339 
-00343   ~RtAudio() throw();
-00344 
-00346   RtAudio::Api getCurrentApi( void ) throw();
-00347 
-00349 
-00354   unsigned int getDeviceCount( void ) throw();
-00355 
-00357 
-00367   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00368 
-00370 
-00377   unsigned int getDefaultOutputDevice( void ) throw();
-00378 
-00380 
-00387   unsigned int getDefaultInputDevice( void ) throw();
-00388 
-00390 
-00427   void openStream( RtAudio::StreamParameters *outputParameters,
-00428                    RtAudio::StreamParameters *inputParameters,
-00429                    RtAudioFormat format, unsigned int sampleRate,
-00430                    unsigned int *bufferFrames, RtAudioCallback callback,
-00431                    void *userData = NULL, RtAudio::StreamOptions *options = NULL );
-00432 
-00434 
-00438   void closeStream( void ) throw();
-00439 
-00441 
-00447   void startStream( void );
-00448 
-00450 
-00456   void stopStream( void );
-00457 
-00459 
-00465   void abortStream( void );
-00466 
-00468   bool isStreamOpen( void ) const throw();
-00469 
-00471   bool isStreamRunning( void ) const throw();
-00472 
-00474 
-00477   double getStreamTime( void );
-00478 
-00480 
-00488   long getStreamLatency( void );
-00489 
-00491 
-00496   unsigned int getStreamSampleRate( void );
-00497 
-00499   void showWarnings( bool value = true ) throw();
-00500 
-00501  protected:
-00502 
-00503   void openRtApi( RtAudio::Api api );
-00504   RtApi *rtapi_;
-00505 };
-00506 
-00507 // Operating system dependent thread functionality.
-00508 #if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)
-00509   #include <windows.h>
-00510   #include <process.h>
-00511 
-00512   typedef unsigned long ThreadHandle;
-00513   typedef CRITICAL_SECTION StreamMutex;
-00514 
-00515 #elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
-00516   // Using pthread library for various flavors of unix.
-00517   #include <pthread.h>
-00518 
-00519   typedef pthread_t ThreadHandle;
-00520   typedef pthread_mutex_t StreamMutex;
-00521 
-00522 #else // Setup for "dummy" behavior
-00523 
-00524   #define __RTAUDIO_DUMMY__
-00525   typedef int ThreadHandle;
-00526   typedef int StreamMutex;
-00527 
-00528 #endif
-00529 
-00530 // This global structure type is used to pass callback information
-00531 // between the private RtAudio stream structure and global callback
-00532 // handling functions.
-00533 struct CallbackInfo {
-00534   void *object;    // Used as a "this" pointer.
-00535   ThreadHandle thread;
-00536   void *callback;
-00537   void *userData;
-00538   void *apiInfo;   // void pointer for API specific callback information
-00539   bool isRunning;
-00540 
-00541   // Default constructor.
-00542   CallbackInfo()
-00543     :object(0), callback(0), userData(0), apiInfo(0), isRunning(false) {}
-00544 };
-00545 
-00546 // **************************************************************** //
-00547 //
-00548 // RtApi class declaration.
-00549 //
-00550 // Subclasses of RtApi contain all API- and OS-specific code necessary
-00551 // to fully implement the RtAudio API.
-00552 //
-00553 // Note that RtApi is an abstract base class and cannot be
-00554 // explicitly instantiated.  The class RtAudio will create an
-00555 // instance of an RtApi subclass (RtApiOss, RtApiAlsa,
-00556 // RtApiJack, RtApiCore, RtApiDs, or RtApiAsio).
-00557 //
-00558 // **************************************************************** //
-00559 
-00560 #if defined( HAVE_GETTIMEOFDAY )
-00561   #include <sys/time.h>
-00562 #endif
-00563 
-00564 #include <sstream>
-00565 
-00566 class RtApi
-00567 {
-00568 public:
-00569 
-00570   RtApi();
-00571   virtual ~RtApi();
-00572   virtual RtAudio::Api getCurrentApi( void ) = 0;
-00573   virtual unsigned int getDeviceCount( void ) = 0;
-00574   virtual RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) = 0;
-00575   virtual unsigned int getDefaultInputDevice( void );
-00576   virtual unsigned int getDefaultOutputDevice( void );
-00577   void openStream( RtAudio::StreamParameters *outputParameters,
-00578                    RtAudio::StreamParameters *inputParameters,
-00579                    RtAudioFormat format, unsigned int sampleRate,
-00580                    unsigned int *bufferFrames, RtAudioCallback callback,
-00581                    void *userData, RtAudio::StreamOptions *options );
-00582   virtual void closeStream( void );
-00583   virtual void startStream( void ) = 0;
-00584   virtual void stopStream( void ) = 0;
-00585   virtual void abortStream( void ) = 0;
-00586   long getStreamLatency( void );
-00587   unsigned int getStreamSampleRate( void );
-00588   virtual double getStreamTime( void );
-00589   bool isStreamOpen( void ) const { return stream_.state != STREAM_CLOSED; };
-00590   bool isStreamRunning( void ) const { return stream_.state == STREAM_RUNNING; };
-00591   void showWarnings( bool value ) { showWarnings_ = value; };
-00592 
-00593 
-00594 protected:
-00595 
-00596   static const unsigned int MAX_SAMPLE_RATES;
-00597   static const unsigned int SAMPLE_RATES[];
-00598 
-00599   enum { FAILURE, SUCCESS };
-00600 
-00601   enum StreamState {
-00602     STREAM_STOPPED,
-00603     STREAM_STOPPING,
-00604     STREAM_RUNNING,
-00605     STREAM_CLOSED = -50
-00606   };
-00607 
-00608   enum StreamMode {
-00609     OUTPUT,
-00610     INPUT,
-00611     DUPLEX,
-00612     UNINITIALIZED = -75
-00613   };
-00614 
-00615   // A protected structure used for buffer conversion.
-00616   struct ConvertInfo {
-00617     int channels;
-00618     int inJump, outJump;
-00619     RtAudioFormat inFormat, outFormat;
-00620     std::vector<int> inOffset;
-00621     std::vector<int> outOffset;
-00622   };
-00623 
-00624   // A protected structure for audio streams.
-00625   struct RtApiStream {
-00626     unsigned int device[2];    // Playback and record, respectively.
-00627     void *apiHandle;           // void pointer for API specific stream handle information
-00628     StreamMode mode;           // OUTPUT, INPUT, or DUPLEX.
-00629     StreamState state;         // STOPPED, RUNNING, or CLOSED
-00630     char *userBuffer[2];       // Playback and record, respectively.
-00631     char *deviceBuffer;
-00632     bool doConvertBuffer[2];   // Playback and record, respectively.
-00633     bool userInterleaved;
-00634     bool deviceInterleaved[2]; // Playback and record, respectively.
-00635     bool doByteSwap[2];        // Playback and record, respectively.
-00636     unsigned int sampleRate;
-00637     unsigned int bufferSize;
-00638     unsigned int nBuffers;
-00639     unsigned int nUserChannels[2];    // Playback and record, respectively.
-00640     unsigned int nDeviceChannels[2];  // Playback and record channels, respectively.
-00641     unsigned int channelOffset[2];    // Playback and record, respectively.
-00642     unsigned long latency[2];         // Playback and record, respectively.
-00643     RtAudioFormat userFormat;
-00644     RtAudioFormat deviceFormat[2];    // Playback and record, respectively.
-00645     StreamMutex mutex;
-00646     CallbackInfo callbackInfo;
-00647     ConvertInfo convertInfo[2];
-00648     double streamTime;         // Number of elapsed seconds since the stream started.
-00649 
-00650 #if defined(HAVE_GETTIMEOFDAY)
-00651     struct timeval lastTickTimestamp;
-00652 #endif
-00653 
-00654     RtApiStream()
-00655       :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
-00656   };
-00657 
-00658   typedef signed short Int16;
-00659   typedef signed int Int32;
-00660   typedef float Float32;
-00661   typedef double Float64;
-00662 
-00663   std::ostringstream errorStream_;
-00664   std::string errorText_;
-00665   bool showWarnings_;
-00666   RtApiStream stream_;
-00667 
-00675   virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00676                                 unsigned int firstChannel, unsigned int sampleRate,
-00677                                 RtAudioFormat format, unsigned int *bufferSize,
-00678                                 RtAudio::StreamOptions *options );
-00679 
-00681   void tickStreamTime( void );
-00682 
-00684   void clearStreamInfo();
-00685 
-00690   void verifyStream( void );
-00691 
-00693   void error( RtError::Type type );
-00694 
-00699   void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info );
-00700 
-00702   void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format );
-00703 
-00705   unsigned int formatBytes( RtAudioFormat format );
-00706 
-00708   void setConvertInfo( StreamMode mode, unsigned int firstChannel );
-00709 };
-00710 
-00711 // **************************************************************** //
-00712 //
-00713 // Inline RtAudio definitions.
-00714 //
-00715 // **************************************************************** //
-00716 
-00717 inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
-00718 inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }
-00719 inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }
-00720 inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }
-00721 inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }
-00722 inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }
-00723 inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }
-00724 inline void RtAudio :: stopStream( void )  { return rtapi_->stopStream(); }
-00725 inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }
-00726 inline bool RtAudio :: isStreamOpen( void ) const throw() { return rtapi_->isStreamOpen(); }
-00727 inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->isStreamRunning(); }
-00728 inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }
-00729 inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); };
-00730 inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }
-00731 inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }
-00732 
-00733 // RtApi Subclass prototypes.
-00734 
-00735 #if defined(__MACOSX_CORE__)
-00736 
-00737 #include <CoreAudio/AudioHardware.h>
-00738 
-00739 class RtApiCore: public RtApi
-00740 {
-00741 public:
-00742 
-00743   RtApiCore();
-00744   ~RtApiCore();
-00745   RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; };
-00746   unsigned int getDeviceCount( void );
-00747   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00748   unsigned int getDefaultOutputDevice( void );
-00749   unsigned int getDefaultInputDevice( void );
-00750   void closeStream( void );
-00751   void startStream( void );
-00752   void stopStream( void );
-00753   void abortStream( void );
-00754   long getStreamLatency( void );
-00755 
-00756   // This function is intended for internal use only.  It must be
-00757   // public because it is called by the internal callback handler,
-00758   // which is not a member of RtAudio.  External use of this function
-00759   // will most likely produce highly undesireable results!
-00760   bool callbackEvent( AudioDeviceID deviceId,
-00761                       const AudioBufferList *inBufferList,
-00762                       const AudioBufferList *outBufferList );
-00763 
-00764   private:
-00765 
-00766   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00767                         unsigned int firstChannel, unsigned int sampleRate,
-00768                         RtAudioFormat format, unsigned int *bufferSize,
-00769                         RtAudio::StreamOptions *options );
-00770   static const char* getErrorCode( OSStatus code );
-00771 };
-00772 
-00773 #endif
-00774 
-00775 #if defined(__UNIX_JACK__)
-00776 
-00777 class RtApiJack: public RtApi
-00778 {
-00779 public:
-00780 
-00781   RtApiJack();
-00782   ~RtApiJack();
-00783   RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; };
-00784   unsigned int getDeviceCount( void );
-00785   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00786   void closeStream( void );
-00787   void startStream( void );
-00788   void stopStream( void );
-00789   void abortStream( void );
-00790   long getStreamLatency( void );
-00791 
-00792   // This function is intended for internal use only.  It must be
-00793   // public because it is called by the internal callback handler,
-00794   // which is not a member of RtAudio.  External use of this function
-00795   // will most likely produce highly undesireable results!
-00796   bool callbackEvent( unsigned long nframes );
-00797 
-00798   private:
-00799 
-00800   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00801                         unsigned int firstChannel, unsigned int sampleRate,
-00802                         RtAudioFormat format, unsigned int *bufferSize,
-00803                         RtAudio::StreamOptions *options );
-00804 };
-00805 
-00806 #endif
-00807 
-00808 #if defined(__WINDOWS_ASIO__)
-00809 
-00810 class RtApiAsio: public RtApi
-00811 {
-00812 public:
-00813 
-00814   RtApiAsio();
-00815   ~RtApiAsio();
-00816   RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; };
-00817   unsigned int getDeviceCount( void );
-00818   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00819   void closeStream( void );
-00820   void startStream( void );
-00821   void stopStream( void );
-00822   void abortStream( void );
-00823   long getStreamLatency( void );
-00824 
-00825   // This function is intended for internal use only.  It must be
-00826   // public because it is called by the internal callback handler,
-00827   // which is not a member of RtAudio.  External use of this function
-00828   // will most likely produce highly undesireable results!
-00829   bool callbackEvent( long bufferIndex );
-00830 
-00831   private:
-00832 
-00833   std::vector<RtAudio::DeviceInfo> devices_;
-00834   void saveDeviceInfo( void );
-00835   bool coInitialized_;
-00836   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00837                         unsigned int firstChannel, unsigned int sampleRate,
-00838                         RtAudioFormat format, unsigned int *bufferSize,
-00839                         RtAudio::StreamOptions *options );
-00840 };
-00841 
-00842 #endif
-00843 
-00844 #if defined(__WINDOWS_DS__)
-00845 
-00846 class RtApiDs: public RtApi
-00847 {
-00848 public:
-00849 
-00850   RtApiDs();
-00851   ~RtApiDs();
-00852   RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; };
-00853   unsigned int getDeviceCount( void );
-00854   unsigned int getDefaultOutputDevice( void );
-00855   unsigned int getDefaultInputDevice( void );
-00856   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00857   void closeStream( void );
-00858   void startStream( void );
-00859   void stopStream( void );
-00860   void abortStream( void );
-00861   long getStreamLatency( void );
-00862 
-00863   // This function is intended for internal use only.  It must be
-00864   // public because it is called by the internal callback handler,
-00865   // which is not a member of RtAudio.  External use of this function
-00866   // will most likely produce highly undesireable results!
-00867   void callbackEvent( void );
-00868 
-00869   private:
-00870 
-00871   bool coInitialized_;
-00872   bool buffersRolling;
-00873   long duplexPrerollBytes;
-00874   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00875                         unsigned int firstChannel, unsigned int sampleRate,
-00876                         RtAudioFormat format, unsigned int *bufferSize,
-00877                         RtAudio::StreamOptions *options );
-00878 };
-00879 
-00880 #endif
-00881 
-00882 #if defined(__LINUX_ALSA__)
-00883 
-00884 class RtApiAlsa: public RtApi
-00885 {
-00886 public:
-00887 
-00888   RtApiAlsa();
-00889   ~RtApiAlsa();
-00890   RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; };
-00891   unsigned int getDeviceCount( void );
-00892   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00893   void closeStream( void );
-00894   void startStream( void );
-00895   void stopStream( void );
-00896   void abortStream( void );
-00897 
-00898   // This function is intended for internal use only.  It must be
-00899   // public because it is called by the internal callback handler,
-00900   // which is not a member of RtAudio.  External use of this function
-00901   // will most likely produce highly undesireable results!
-00902   void callbackEvent( void );
-00903 
-00904   private:
-00905 
-00906   std::vector<RtAudio::DeviceInfo> devices_;
-00907   void saveDeviceInfo( void );
-00908   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00909                         unsigned int firstChannel, unsigned int sampleRate,
-00910                         RtAudioFormat format, unsigned int *bufferSize,
-00911                         RtAudio::StreamOptions *options );
-00912 };
-00913 
-00914 #endif
-00915 
-00916 #if defined(__LINUX_PULSE__)
-00917 
-00918 class RtApiPulse: public RtApi
-00919 {
-00920 public:
-00921   ~RtApiPulse();
-00922   RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; };
-00923   unsigned int getDeviceCount( void );
-00924   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00925   void closeStream( void );
-00926   void startStream( void );
-00927   void stopStream( void );
-00928   void abortStream( void );
-00929 
-00930   // This function is intended for internal use only.  It must be
-00931   // public because it is called by the internal callback handler,
-00932   // which is not a member of RtAudio.  External use of this function
-00933   // will most likely produce highly undesireable results!
-00934   void callbackEvent( void );
-00935 
-00936   private:
-00937 
-00938   std::vector<RtAudio::DeviceInfo> devices_;
-00939   void saveDeviceInfo( void );
-00940   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
-00941                         unsigned int firstChannel, unsigned int sampleRate,
-00942                         RtAudioFormat format, unsigned int *bufferSize,
-00943                         RtAudio::StreamOptions *options );
-00944 };
-00945 
-00946 #endif
-00947 
-00948 
-00949 #if defined(__LINUX_OSS__)
-00950 
-00951 class RtApiOss: public RtApi
-00952 {
-00953 public:
-00954 
-00955   RtApiOss();
-00956   ~RtApiOss();
-00957   RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; };
-00958   unsigned int getDeviceCount( void );
-00959   RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-00960   void closeStream( void );
-00961   void startStream( void );
-00962   void stopStream( void );
-00963   void abortStream( void );
-00964 
-00965   // This function is intended for internal use only.  It must be
-00966   // public because it is called by the internal callback handler,
-00967   // which is not a member of RtAudio.  External use of this function
-00968   // will most likely produce highly undesireable results!
-00969   void callbackEvent( void );
-00970 
-00971   private:
-00972 
-00973   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00974                         unsigned int firstChannel, unsigned int sampleRate,
-00975                         RtAudioFormat format, unsigned int *bufferSize,
-00976                         RtAudio::StreamOptions *options );
-00977 };
-00978 
-00979 #endif
-00980 
-00981 #if defined(__RTAUDIO_DUMMY__)
-00982 
-00983 class RtApiDummy: public RtApi
-00984 {
-00985 public:
-00986 
-00987   RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtError::WARNING ); };
-00988   RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; };
-00989   unsigned int getDeviceCount( void ) { return 0; };
-00990   RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) { RtAudio::DeviceInfo info; return info; };
-00991   void closeStream( void ) {};
-00992   void startStream( void ) {};
-00993   void stopStream( void ) {};
-00994   void abortStream( void ) {};
-00995 
-00996   private:
-00997 
-00998   bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, 
-00999                         unsigned int firstChannel, unsigned int sampleRate,
-01000                         RtAudioFormat format, unsigned int *bufferSize,
-01001                         RtAudio::StreamOptions *options ) { return false; };
-01002 };
-01003 
-01004 #endif
-01005 
-01006 #endif
-01007 
-01008 // Indentation settings for Vim and Emacs
-01009 //
-01010 // Local Variables:
-01011 // c-basic-offset: 2
-01012 // indent-tabs-mode: nil
-01013 // End:
-01014 //
-01015 // vim: et sts=2 sw=2
-
+ + +
+
+
RtAudio.h
+
+
+Go to the documentation of this file.
1 /************************************************************************/
+
39 /************************************************************************/
+
40 
+
45 #ifndef __RTAUDIO_H
+
46 #define __RTAUDIO_H
+
47 
+
48 #include <string>
+
49 #include <vector>
+
50 #include "RtError.h"
+
51 
+
52 // RtAudio version
+
53 static const std::string VERSION( "4.0.12" );
+
54 
+
71 typedef unsigned long RtAudioFormat;
+
72 static const RtAudioFormat RTAUDIO_SINT8 = 0x1; // 8-bit signed integer.
+
73 static const RtAudioFormat RTAUDIO_SINT16 = 0x2; // 16-bit signed integer.
+
74 static const RtAudioFormat RTAUDIO_SINT24 = 0x4; // 24-bit signed integer.
+
75 static const RtAudioFormat RTAUDIO_SINT32 = 0x8; // 32-bit signed integer.
+
76 static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; // Normalized between plus/minus 1.0.
+
77 static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/minus 1.0.
+
78 
+
121 typedef unsigned int RtAudioStreamFlags;
+
122 static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1; // Use non-interleaved buffers (default = interleaved).
+
123 static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2; // Attempt to set stream parameters for lowest possible latency.
+
124 static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4; // Attempt grab device and prevent use by others.
+
125 static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8; // Try to select realtime scheduling for callback thread.
+
126 static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10; // Use the "default" PCM device (ALSA only).
+
127 
+
139 typedef unsigned int RtAudioStreamStatus;
+
140 static const RtAudioStreamStatus RTAUDIO_INPUT_OVERFLOW = 0x1; // Input data was discarded because of an overflow condition at the driver.
+
141 static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2; // The output buffer ran low, likely causing a gap in the output sound.
+
142 
+
144 
+
182 typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
+
183  unsigned int nFrames,
+
184  double streamTime,
+
185  RtAudioStreamStatus status,
+
186  void *userData );
+
187 
+
189 
+
193 typedef void (*RtAudioErrorCallback)( RtError::Type type, const std::string &errorText );
+
194 
+
195 // **************************************************************** //
+
196 //
+
197 // RtAudio class declaration.
+
198 //
+
199 // RtAudio is a "controller" used to select an available audio i/o
+
200 // interface. It presents a common API for the user to call but all
+
201 // functionality is implemented by the class RtApi and its
+
202 // subclasses. RtAudio creates an instance of an RtApi subclass
+
203 // based on the user's API choice. If no choice is made, RtAudio
+
204 // attempts to make a "logical" API selection.
+
205 //
+
206 // **************************************************************** //
+
207 
+
208 class RtApi;
+
209 
+
210 class RtAudio
+
211 {
+
212  public:
+
213 
+
215  enum Api {
+ + + + + + + + + +
225  };
+
226 
+
228  struct DeviceInfo {
+
229  bool probed;
+
230  std::string name;
+
231  unsigned int outputChannels;
+
232  unsigned int inputChannels;
+
233  unsigned int duplexChannels;
+ + +
236  std::vector<unsigned int> sampleRates;
+ +
239  // Default constructor.
+
240  DeviceInfo()
+ +
242  isDefaultOutput(false), isDefaultInput(false), nativeFormats(0) {}
+
243  };
+
244 
+ +
247  unsigned int deviceId;
+
248  unsigned int nChannels;
+
249  unsigned int firstChannel;
+
251  // Default constructor.
+ +
253  : deviceId(0), nChannels(0), firstChannel(0) {}
+
254  };
+
255 
+
257 
+
313  struct StreamOptions {
+ +
315  unsigned int numberOfBuffers;
+
316  std::string streamName;
+
317  int priority;
+
319  // Default constructor.
+
320  StreamOptions()
+
321  : flags(0), numberOfBuffers(0), priority(0) {}
+
322  };
+
323 
+
325  static std::string getVersion( void ) { return VERSION; }
+
326 
+
328 
+
333  static void getCompiledApi( std::vector<RtAudio::Api> &apis ) throw();
+
334 
+
336 
+
344  RtAudio( RtAudio::Api api=UNSPECIFIED ) throw();
+
345 
+
347 
+
351  ~RtAudio() throw();
+
352 
+
354  RtAudio::Api getCurrentApi( void ) throw();
+
355 
+
357 
+
362  unsigned int getDeviceCount( void ) throw();
+
363 
+
365 
+
375  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
376 
+
378 
+
385  unsigned int getDefaultOutputDevice( void ) throw();
+
386 
+
388 
+
395  unsigned int getDefaultInputDevice( void ) throw();
+
396 
+
398 
+
437  void openStream( RtAudio::StreamParameters *outputParameters,
+
438  RtAudio::StreamParameters *inputParameters,
+
439  RtAudioFormat format, unsigned int sampleRate,
+
440  unsigned int *bufferFrames, RtAudioCallback callback,
+
441  void *userData = NULL, RtAudio::StreamOptions *options = NULL, RtAudioErrorCallback errorCallback = NULL );
+
442 
+
444 
+
448  void closeStream( void ) throw();
+
449 
+
451 
+
457  void startStream( void );
+
458 
+
460 
+
466  void stopStream( void );
+
467 
+
469 
+
475  void abortStream( void );
+
476 
+
478  bool isStreamOpen( void ) const throw();
+
479 
+
481  bool isStreamRunning( void ) const throw();
+
482 
+
484 
+
487  double getStreamTime( void );
+
488 
+
490 
+
498  long getStreamLatency( void );
+
499 
+
501 
+
506  unsigned int getStreamSampleRate( void );
+
507 
+
509  void showWarnings( bool value = true ) throw();
+
510 
+
511  protected:
+
512 
+
513  void openRtApi( RtAudio::Api api );
+
514  RtApi *rtapi_;
+
515 };
+
516 
+
517 // Operating system dependent thread functionality.
+
518 #if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)
+
519  #include <windows.h>
+
520  #include <process.h>
+
521 
+
522  typedef unsigned long ThreadHandle;
+
523  typedef CRITICAL_SECTION StreamMutex;
+
524 
+
525 #elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
+
526  // Using pthread library for various flavors of unix.
+
527  #include <pthread.h>
+
528 
+
529  typedef pthread_t ThreadHandle;
+
530  typedef pthread_mutex_t StreamMutex;
+
531 
+
532 #else // Setup for "dummy" behavior
+
533 
+
534  #define __RTAUDIO_DUMMY__
+
535  typedef int ThreadHandle;
+
536  typedef int StreamMutex;
+
537 
+
538 #endif
+
539 
+
540 // This global structure type is used to pass callback information
+
541 // between the private RtAudio stream structure and global callback
+
542 // handling functions.
+
543 struct CallbackInfo {
+
544  void *object; // Used as a "this" pointer.
+
545  ThreadHandle thread;
+
546  void *callback;
+
547  void *userData;
+
548  void *errorCallback;
+
549  void *apiInfo; // void pointer for API specific callback information
+
550  bool isRunning;
+
551  bool doRealtime;
+
552  int priority;
+
553 
+
554  // Default constructor.
+
555  CallbackInfo()
+
556  :object(0), callback(0), userData(0), errorCallback(0), apiInfo(0), isRunning(false), doRealtime(false) {}
+
557 };
+
558 
+
559 // **************************************************************** //
+
560 //
+
561 // RtApi class declaration.
+
562 //
+
563 // Subclasses of RtApi contain all API- and OS-specific code necessary
+
564 // to fully implement the RtAudio API.
+
565 //
+
566 // Note that RtApi is an abstract base class and cannot be
+
567 // explicitly instantiated. The class RtAudio will create an
+
568 // instance of an RtApi subclass (RtApiOss, RtApiAlsa,
+
569 // RtApiJack, RtApiCore, RtApiDs, or RtApiAsio).
+
570 //
+
571 // **************************************************************** //
+
572 
+
573 #pragma pack(push, 1)
+
574 class S24 {
+
575 
+
576  protected:
+
577  unsigned char c3[3];
+
578 
+
579  public:
+
580  S24() {}
+
581 
+
582  S24& operator = ( const int& i ) {
+
583  c3[0] = (i & 0x000000ff);
+
584  c3[1] = (i & 0x0000ff00) >> 8;
+
585  c3[2] = (i & 0x00ff0000) >> 16;
+
586  return *this;
+
587  }
+
588 
+
589  S24( const S24& v ) { *this = v; }
+
590  S24( const double& d ) { *this = (int) d; }
+
591  S24( const float& f ) { *this = (int) f; }
+
592  S24( const signed short& s ) { *this = (int) s; }
+
593  S24( const char& c ) { *this = (int) c; }
+
594 
+
595  int asInt() {
+
596  int i = c3[0] | (c3[1] << 8) | (c3[2] << 16);
+
597  if (i & 0x800000) i |= ~0xffffff;
+
598  return i;
+
599  }
+
600 };
+
601 #pragma pack(pop)
+
602 
+
603 #if defined( HAVE_GETTIMEOFDAY )
+
604  #include <sys/time.h>
+
605 #endif
+
606 
+
607 #include <sstream>
+
608 
+
609 class RtApi
+
610 {
+
611 public:
+
612 
+
613  RtApi();
+
614  virtual ~RtApi();
+
615  virtual RtAudio::Api getCurrentApi( void ) = 0;
+
616  virtual unsigned int getDeviceCount( void ) = 0;
+
617  virtual RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) = 0;
+
618  virtual unsigned int getDefaultInputDevice( void );
+
619  virtual unsigned int getDefaultOutputDevice( void );
+
620  void openStream( RtAudio::StreamParameters *outputParameters,
+
621  RtAudio::StreamParameters *inputParameters,
+
622  RtAudioFormat format, unsigned int sampleRate,
+
623  unsigned int *bufferFrames, RtAudioCallback callback,
+
624  void *userData, RtAudio::StreamOptions *options,
+
625  RtAudioErrorCallback errorCallback );
+
626  virtual void closeStream( void );
+
627  virtual void startStream( void ) = 0;
+
628  virtual void stopStream( void ) = 0;
+
629  virtual void abortStream( void ) = 0;
+
630  long getStreamLatency( void );
+
631  unsigned int getStreamSampleRate( void );
+
632  virtual double getStreamTime( void );
+
633  bool isStreamOpen( void ) const { return stream_.state != STREAM_CLOSED; }
+
634  bool isStreamRunning( void ) const { return stream_.state == STREAM_RUNNING; }
+
635  void showWarnings( bool value ) { showWarnings_ = value; }
+
636 
+
637 
+
638 protected:
+
639 
+
640  static const unsigned int MAX_SAMPLE_RATES;
+
641  static const unsigned int SAMPLE_RATES[];
+
642 
+
643  enum { FAILURE, SUCCESS };
+
644 
+
645  enum StreamState {
+
646  STREAM_STOPPED,
+
647  STREAM_STOPPING,
+
648  STREAM_RUNNING,
+
649  STREAM_CLOSED = -50
+
650  };
+
651 
+
652  enum StreamMode {
+
653  OUTPUT,
+
654  INPUT,
+
655  DUPLEX,
+
656  UNINITIALIZED = -75
+
657  };
+
658 
+
659  // A protected structure used for buffer conversion.
+
660  struct ConvertInfo {
+
661  int channels;
+
662  int inJump, outJump;
+
663  RtAudioFormat inFormat, outFormat;
+
664  std::vector<int> inOffset;
+
665  std::vector<int> outOffset;
+
666  };
+
667 
+
668  // A protected structure for audio streams.
+
669  struct RtApiStream {
+
670  unsigned int device[2]; // Playback and record, respectively.
+
671  void *apiHandle; // void pointer for API specific stream handle information
+
672  StreamMode mode; // OUTPUT, INPUT, or DUPLEX.
+
673  StreamState state; // STOPPED, RUNNING, or CLOSED
+
674  char *userBuffer[2]; // Playback and record, respectively.
+
675  char *deviceBuffer;
+
676  bool doConvertBuffer[2]; // Playback and record, respectively.
+
677  bool userInterleaved;
+
678  bool deviceInterleaved[2]; // Playback and record, respectively.
+
679  bool doByteSwap[2]; // Playback and record, respectively.
+
680  unsigned int sampleRate;
+
681  unsigned int bufferSize;
+
682  unsigned int nBuffers;
+
683  unsigned int nUserChannels[2]; // Playback and record, respectively.
+
684  unsigned int nDeviceChannels[2]; // Playback and record channels, respectively.
+
685  unsigned int channelOffset[2]; // Playback and record, respectively.
+
686  unsigned long latency[2]; // Playback and record, respectively.
+
687  RtAudioFormat userFormat;
+
688  RtAudioFormat deviceFormat[2]; // Playback and record, respectively.
+
689  StreamMutex mutex;
+
690  CallbackInfo callbackInfo;
+
691  ConvertInfo convertInfo[2];
+
692  double streamTime; // Number of elapsed seconds since the stream started.
+
693 
+
694 #if defined(HAVE_GETTIMEOFDAY)
+
695  struct timeval lastTickTimestamp;
+
696 #endif
+
697 
+
698  RtApiStream()
+
699  :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
+
700  };
+
701 
+
702  typedef S24 Int24;
+
703  typedef signed short Int16;
+
704  typedef signed int Int32;
+
705  typedef float Float32;
+
706  typedef double Float64;
+
707 
+
708  std::ostringstream errorStream_;
+
709  std::string errorText_;
+
710  bool showWarnings_;
+
711  RtApiStream stream_;
+
712 
+
720  virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
721  unsigned int firstChannel, unsigned int sampleRate,
+
722  RtAudioFormat format, unsigned int *bufferSize,
+
723  RtAudio::StreamOptions *options );
+
724 
+
726  void tickStreamTime( void );
+
727 
+
729  void clearStreamInfo();
+
730 
+
735  void verifyStream( void );
+
736 
+
738  void error( RtError::Type type );
+
739 
+
744  void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info );
+
745 
+
747  void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format );
+
748 
+
750  unsigned int formatBytes( RtAudioFormat format );
+
751 
+
753  void setConvertInfo( StreamMode mode, unsigned int firstChannel );
+
754 };
+
755 
+
756 // **************************************************************** //
+
757 //
+
758 // Inline RtAudio definitions.
+
759 //
+
760 // **************************************************************** //
+
761 
+
762 inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
+
763 inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }
+
764 inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }
+
765 inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }
+
766 inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }
+
767 inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }
+
768 inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }
+
769 inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }
+
770 inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }
+
771 inline bool RtAudio :: isStreamOpen( void ) const throw() { return rtapi_->isStreamOpen(); }
+
772 inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->isStreamRunning(); }
+
773 inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }
+
774 inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); }
+
775 inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }
+
776 inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }
+
777 
+
778 // RtApi Subclass prototypes.
+
779 
+
780 #if defined(__MACOSX_CORE__)
+
781 
+
782 #include <CoreAudio/AudioHardware.h>
+
783 
+
784 class RtApiCore: public RtApi
+
785 {
+
786 public:
+
787 
+
788  RtApiCore();
+
789  ~RtApiCore();
+ +
791  unsigned int getDeviceCount( void );
+
792  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
793  unsigned int getDefaultOutputDevice( void );
+
794  unsigned int getDefaultInputDevice( void );
+
795  void closeStream( void );
+
796  void startStream( void );
+
797  void stopStream( void );
+
798  void abortStream( void );
+
799  long getStreamLatency( void );
+
800 
+
801  // This function is intended for internal use only. It must be
+
802  // public because it is called by the internal callback handler,
+
803  // which is not a member of RtAudio. External use of this function
+
804  // will most likely produce highly undesireable results!
+
805  bool callbackEvent( AudioDeviceID deviceId,
+
806  const AudioBufferList *inBufferList,
+
807  const AudioBufferList *outBufferList );
+
808 
+
809  private:
+
810 
+
811  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
812  unsigned int firstChannel, unsigned int sampleRate,
+
813  RtAudioFormat format, unsigned int *bufferSize,
+
814  RtAudio::StreamOptions *options );
+
815  static const char* getErrorCode( OSStatus code );
+
816 };
+
817 
+
818 #endif
+
819 
+
820 #if defined(__UNIX_JACK__)
+
821 
+
822 class RtApiJack: public RtApi
+
823 {
+
824 public:
+
825 
+
826  RtApiJack();
+
827  ~RtApiJack();
+
828  RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }
+
829  unsigned int getDeviceCount( void );
+
830  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
831  void closeStream( void );
+
832  void startStream( void );
+
833  void stopStream( void );
+
834  void abortStream( void );
+
835  long getStreamLatency( void );
+
836 
+
837  // This function is intended for internal use only. It must be
+
838  // public because it is called by the internal callback handler,
+
839  // which is not a member of RtAudio. External use of this function
+
840  // will most likely produce highly undesireable results!
+
841  bool callbackEvent( unsigned long nframes );
+
842 
+
843  private:
+
844 
+
845  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
846  unsigned int firstChannel, unsigned int sampleRate,
+
847  RtAudioFormat format, unsigned int *bufferSize,
+
848  RtAudio::StreamOptions *options );
+
849 };
+
850 
+
851 #endif
+
852 
+
853 #if defined(__WINDOWS_ASIO__)
+
854 
+
855 class RtApiAsio: public RtApi
+
856 {
+
857 public:
+
858 
+
859  RtApiAsio();
+
860  ~RtApiAsio();
+ +
862  unsigned int getDeviceCount( void );
+
863  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
864  void closeStream( void );
+
865  void startStream( void );
+
866  void stopStream( void );
+
867  void abortStream( void );
+
868  long getStreamLatency( void );
+
869 
+
870  // This function is intended for internal use only. It must be
+
871  // public because it is called by the internal callback handler,
+
872  // which is not a member of RtAudio. External use of this function
+
873  // will most likely produce highly undesireable results!
+
874  bool callbackEvent( long bufferIndex );
+
875 
+
876  private:
+
877 
+
878  std::vector<RtAudio::DeviceInfo> devices_;
+
879  void saveDeviceInfo( void );
+
880  bool coInitialized_;
+
881  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
882  unsigned int firstChannel, unsigned int sampleRate,
+
883  RtAudioFormat format, unsigned int *bufferSize,
+
884  RtAudio::StreamOptions *options );
+
885 };
+
886 
+
887 #endif
+
888 
+
889 #if defined(__WINDOWS_DS__)
+
890 
+
891 class RtApiDs: public RtApi
+
892 {
+
893 public:
+
894 
+
895  RtApiDs();
+
896  ~RtApiDs();
+ +
898  unsigned int getDeviceCount( void );
+
899  unsigned int getDefaultOutputDevice( void );
+
900  unsigned int getDefaultInputDevice( void );
+
901  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
902  void closeStream( void );
+
903  void startStream( void );
+
904  void stopStream( void );
+
905  void abortStream( void );
+
906  long getStreamLatency( void );
+
907 
+
908  // This function is intended for internal use only. It must be
+
909  // public because it is called by the internal callback handler,
+
910  // which is not a member of RtAudio. External use of this function
+
911  // will most likely produce highly undesireable results!
+
912  void callbackEvent( void );
+
913 
+
914  private:
+
915 
+
916  bool coInitialized_;
+
917  bool buffersRolling;
+
918  long duplexPrerollBytes;
+
919  std::vector<struct DsDevice> dsDevices;
+
920  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
921  unsigned int firstChannel, unsigned int sampleRate,
+
922  RtAudioFormat format, unsigned int *bufferSize,
+
923  RtAudio::StreamOptions *options );
+
924 };
+
925 
+
926 #endif
+
927 
+
928 #if defined(__LINUX_ALSA__)
+
929 
+
930 class RtApiAlsa: public RtApi
+
931 {
+
932 public:
+
933 
+
934  RtApiAlsa();
+
935  ~RtApiAlsa();
+ +
937  unsigned int getDeviceCount( void );
+
938  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
939  void closeStream( void );
+
940  void startStream( void );
+
941  void stopStream( void );
+
942  void abortStream( void );
+
943 
+
944  // This function is intended for internal use only. It must be
+
945  // public because it is called by the internal callback handler,
+
946  // which is not a member of RtAudio. External use of this function
+
947  // will most likely produce highly undesireable results!
+
948  void callbackEvent( void );
+
949 
+
950  private:
+
951 
+
952  std::vector<RtAudio::DeviceInfo> devices_;
+
953  void saveDeviceInfo( void );
+
954  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
955  unsigned int firstChannel, unsigned int sampleRate,
+
956  RtAudioFormat format, unsigned int *bufferSize,
+
957  RtAudio::StreamOptions *options );
+
958 };
+
959 
+
960 #endif
+
961 
+
962 #if defined(__LINUX_PULSE__)
+
963 
+
964 class RtApiPulse: public RtApi
+
965 {
+
966 public:
+
967  ~RtApiPulse();
+ +
969  unsigned int getDeviceCount( void );
+
970  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
971  void closeStream( void );
+
972  void startStream( void );
+
973  void stopStream( void );
+
974  void abortStream( void );
+
975 
+
976  // This function is intended for internal use only. It must be
+
977  // public because it is called by the internal callback handler,
+
978  // which is not a member of RtAudio. External use of this function
+
979  // will most likely produce highly undesireable results!
+
980  void callbackEvent( void );
+
981 
+
982  private:
+
983 
+
984  std::vector<RtAudio::DeviceInfo> devices_;
+
985  void saveDeviceInfo( void );
+
986  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
987  unsigned int firstChannel, unsigned int sampleRate,
+
988  RtAudioFormat format, unsigned int *bufferSize,
+
989  RtAudio::StreamOptions *options );
+
990 };
+
991 
+
992 #endif
+
993 
+
994 #if defined(__LINUX_OSS__)
+
995 
+
996 class RtApiOss: public RtApi
+
997 {
+
998 public:
+
999 
+
1000  RtApiOss();
+
1001  ~RtApiOss();
+ +
1003  unsigned int getDeviceCount( void );
+
1004  RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
+
1005  void closeStream( void );
+
1006  void startStream( void );
+
1007  void stopStream( void );
+
1008  void abortStream( void );
+
1009 
+
1010  // This function is intended for internal use only. It must be
+
1011  // public because it is called by the internal callback handler,
+
1012  // which is not a member of RtAudio. External use of this function
+
1013  // will most likely produce highly undesireable results!
+
1014  void callbackEvent( void );
+
1015 
+
1016  private:
+
1017 
+
1018  bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
+
1019  unsigned int firstChannel, unsigned int sampleRate,
+
1020  RtAudioFormat format, unsigned int *bufferSize,
+
1021  RtAudio::StreamOptions *options );
+
1022 };
+
1023 
+
1024 #endif
+
1025 
+
1026 #if defined(__RTAUDIO_DUMMY__)
+
1027 
+
1028 class RtApiDummy: public RtApi
+
1029 {
+
1030 public:
+
1031 
+
1032  RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtError::WARNING ); }
+ +
1034  unsigned int getDeviceCount( void ) { return 0; }
+
1035  RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) { RtAudio::DeviceInfo info; return info; }
+
1036  void closeStream( void ) {}
+
1037  void startStream( void ) {}
+
1038  void stopStream( void ) {}
+
1039  void abortStream( void ) {}
+
1040 
+
1041  private:
+
1042 
+
1043  bool probeDeviceOpen( unsigned int /*device*/, StreamMode /*mode*/, unsigned int /*channels*/,
+
1044  unsigned int /*firstChannel*/, unsigned int /*sampleRate*/,
+
1045  RtAudioFormat /*format*/, unsigned int * /*bufferSize*/,
+
1046  RtAudio::StreamOptions * /*options*/ ) { return false; }
+
1047 };
+
1048 
+
1049 #endif
+
1050 
+
1051 #endif
+
1052 
+
1053 // Indentation settings for Vim and Emacs
+
1054 //
+
1055 // Local Variables:
+
1056 // c-basic-offset: 2
+
1057 // indent-tabs-mode: nil
+
1058 // End:
+
1059 //
+
1060 // vim: et sts=2 sw=2
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/RtError_8h_source.html b/doc/html/RtError_8h_source.html index 0575322..2a73398 100644 --- a/doc/html/RtError_8h_source.html +++ b/doc/html/RtError_8h_source.html @@ -8,58 +8,62 @@
Home   Class/Enum List   File List   Compound Members  

- -

RtError.h

00001 /************************************************************************/
-00010 /************************************************************************/
-00011 
-00012 #ifndef RTERROR_H
-00013 #define RTERROR_H
-00014 
-00015 #include <exception>
-00016 #include <iostream>
-00017 #include <string>
-00018 
-00019 class RtError : public std::exception
-00020 {
-00021  public:
-00023   enum Type {
-00024     WARNING,           
-00025     DEBUG_WARNING,     
-00026     UNSPECIFIED,       
-00027     NO_DEVICES_FOUND,  
-00028     INVALID_DEVICE,    
-00029     MEMORY_ERROR,      
-00030     INVALID_PARAMETER, 
-00031     INVALID_USE,       
-00032     DRIVER_ERROR,      
-00033     SYSTEM_ERROR,      
-00034     THREAD_ERROR       
-00035   };
-00036 
-00038   RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
-00039  
-00041   virtual ~RtError( void ) throw() {}
-00042 
-00044   virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
-00045 
-00047   virtual const Type& getType(void) const throw() { return type_; }
-00048 
-00050   virtual const std::string& getMessage(void) const throw() { return message_; }
-00051 
-00053   virtual const char* what( void ) const throw() { return message_.c_str(); }
-00054 
-00055  protected:
-00056   std::string message_;
-00057   Type type_;
-00058 };
-00059 
-00060 #endif
-
+ + +
+
+
RtError.h
+
+
+
1 /************************************************************************/
+
10 /************************************************************************/
+
11 
+
12 #ifndef RTERROR_H
+
13 #define RTERROR_H
+
14 
+
15 #include <exception>
+
16 #include <iostream>
+
17 #include <string>
+
18 
+
19 class RtError : public std::exception
+
20 {
+
21  public:
+
23  enum Type {
+ + + + + + + + + + + +
35  };
+
36 
+
38  RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
+
39 
+
41  virtual ~RtError( void ) throw() {}
+
42 
+
44  virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
+
45 
+
47  virtual const Type& getType(void) const throw() { return type_; }
+
48 
+
50  virtual const std::string& getMessage(void) const throw() { return message_; }
+
51 
+
53  virtual const char* what( void ) const throw() { return message_.c_str(); }
+
54 
+
55  protected:
+
56  std::string message_;
+
57  Type type_;
+
58 };
+
59 
+
60 #endif
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/acknowledge.html b/doc/html/acknowledge.html index ad4d30a..6ca5381 100644 --- a/doc/html/acknowledge.html +++ b/doc/html/acknowledge.html @@ -8,11 +8,14 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Acknowledgements
+
- - -

Acknowledgements

Many thanks to the following people for providing bug fixes and improvements:

+

Many thanks to the following people for providing bug fixes and improvements:

  • Stefan Arisona
  • @@ -51,12 +54,10 @@ Ryan Williams (Windows non-MS compiler ASIO support)

The RtAudio API incorporates many of the concepts developed in the PortAudio project by Phil Burk and Ross Bencina. Early development also incorporated ideas from Bill Schottstaedt's sndlib. The CCRMA SoundWire group provided valuable feedback during the API proposal stages.

The early 2.0 version of RtAudio was slowly developed over the course of many months while in residence at the Institut Universitari de L'Audiovisual (IUA) in Barcelona, Spain and the Laboratory of Acoustics and Audio Signal Processing at the Helsinki University of Technology, Finland. Much subsequent development happened while working at the Center for Computer Research in Music and Acoustics (CCRMA) at Stanford University. All recent versions of RtAudio have been completed while working as an assistant / associate professor of Music Technology at McGill University. This work was supported in part by the United States Air Force Office of Scientific Research (grant #F49620-99-1-0293).

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 1136f27..d8fe6c3 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -8,21 +8,26 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Class List
+
-

Class List

Here are the classes, structs, unions and interfaces with brief descriptions: - - - - - +
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 12]
RtAudio::DeviceInfoThe public device information structure for returning queried values
RtAudioRealtime audio i/o C++ classes
RtErrorException handling class for RtAudio & RtMidi
RtAudio::StreamOptionsThe structure for specifying stream options
RtAudio::StreamParametersThe structure for specifying input or ouput stream parameters
+ + + + +
oCRtAudioRealtime audio i/o C++ classes
|oCDeviceInfoThe public device information structure for returning queried values
|oCStreamOptionsThe structure for specifying stream options
|\CStreamParametersThe structure for specifying input or ouput stream parameters
\CRtErrorException handling class for RtAudio & RtMidi
-
+ +
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/apinotes.html b/doc/html/apinotes.html index 0747147..c205ce0 100644 --- a/doc/html/apinotes.html +++ b/doc/html/apinotes.html @@ -8,38 +8,39 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
API Notes
+
- - -

API Notes

RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each.

-

-Linux:

+

RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each.

+

+Linux:

RtAudio for Linux was developed under Redhat distributions 7.0 - Fedora. Four different audio APIs are supported on Linux platforms: OSS (versions >= 4.0), ALSA, Jack, and PulseAudio. Note that RtAudio now only supports the newer version 4.0 OSS API. The ALSA API is now part of the Linux kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack is a low-latency audio server written primarily for the GNU/Linux operating system. It can connect a number of different applications to an audio device, as well as allow them to share audio between themselves. Input/output latency on the order of 15 milliseconds can typically be achieved using any of the Linux APIs by fine-tuning the RtAudio buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions.

The ALSA library includes OSS emulation support. That means that you can run programs compiled for the OSS API even when using the ALSA drivers and library. It should be noted however that OSS emulation under ALSA is not perfect. Specifically, channel number queries seem to consistently produce invalid results. While OSS emulation is successful for the majority of RtAudio tests, it is recommended that the native ALSA implementation of RtAudio be used on systems which have ALSA drivers installed.

The ALSA implementation of RtAudio makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, de-interleaving, and byte-swapping is handled by internal RtAudio routines.

-

-Macintosh OS-X (CoreAudio and Jack):

-

The Apple CoreAudio API is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. The numberOfBuffers parameter to the RtAudio::openStream() function has no affect in this implementation.

+

+Macintosh OS-X (CoreAudio and Jack):

+

The Apple CoreAudio API is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. The numberOfBuffers parameter to the RtAudio::openStream() function has no affect in this implementation.

It is not possible to have multiple instances of RtAudio accessing the same CoreAudio device.

The RtAudio Jack support can be compiled on Macintosh OS-X systems, as well as in Linux.

-

-Windows (DirectSound):

-

The configure script provides support for the MinGW compiler. DirectSound support is specified with the "--with-ds" flag.

+

+Windows (DirectSound):

+

The configure script provides support for the MinGW compiler. DirectSound support is specified with the "&ndash;with-ds" flag.

In order to compile RtAudio under Windows for the DirectSound API, you must have the header and source files for DirectSound version 5.0 or higher. As far as I know, there is no DirectSoundCapture support for Windows NT. Audio output latency with DirectSound can be reasonably good, especially since RtAudio version 3.0.2. Input audio latency still tends to be bad but better since version 3.0.2. RtAudio was originally developed with Visual C++ version 6.0 but has been tested with .NET.

The DirectSound version of RtAudio can be compiled with or without the UNICODE preprocessor definition.

-

-Windows (ASIO):

-

ASIO support using MinGW and the configure script is specified with the "--with-asio" flag.

-

The Steinberg ASIO audio API allows only a single device driver to be loaded and accessed at a time. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The numberOfBuffers parameter to the RtAudio::openStream() function has no affect in this implementation.

+

+Windows (ASIO):

+

ASIO support using MinGW and the configure script is specified with the "&ndash;with-asio" flag.

+

The Steinberg ASIO audio API allows only a single device driver to be loaded and accessed at a time. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The numberOfBuffers parameter to the RtAudio::openStream() function has no affect in this implementation.

A number of ASIO source and header files are required for use with RtAudio. Specifically, an RtAudio project must include the following files: asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h; iasiothiscallresolver.h,cpp. The Visual C++ projects found in /tests/Windows/ compile both ASIO and DirectSound support.

The Steinberg provided asiolist class does not compile when the preprocessor definition UNICODE is defined. Note that this could be an issue when using RtAudio with Qt, though Qt programs appear to compile without the UNICODE definition (try DEFINES -= UNICODE in your .pro file). RtAudio with ASIO support has been tested using the MinGW compiler under Windows XP, as well as in the Visual Studio environment.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/classRtAudio-members.html b/doc/html/classRtAudio-members.html index 9df26e1..f818bf7 100644 --- a/doc/html/classRtAudio-members.html +++ b/doc/html/classRtAudio-members.html @@ -8,44 +8,50 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
RtAudio Member List
+
-

RtAudio Member List

This is the complete list of members for RtAudio, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
abortStream(void)RtAudio [inline]
Api enum nameRtAudio
closeStream(void)RtAudio [inline]
getCompiledApi(std::vector< RtAudio::Api > &apis)RtAudio [static]
getCurrentApi(void)RtAudio [inline]
getDefaultInputDevice(void)RtAudio [inline]
getDefaultOutputDevice(void)RtAudio [inline]
getDeviceCount(void)RtAudio [inline]
getDeviceInfo(unsigned int device)RtAudio [inline]
getStreamLatency(void)RtAudio [inline]
getStreamSampleRate(void)RtAudio [inline]
getStreamTime(void)RtAudio [inline]
isStreamOpen(void) const RtAudio [inline]
isStreamRunning(void) const RtAudio [inline]
LINUX_ALSA enum valueRtAudio
LINUX_OSS enum valueRtAudio
LINUX_PULSE enum valueRtAudio
MACOSX_CORE enum valueRtAudio
openStream(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)RtAudio
RtAudio(RtAudio::Api api=UNSPECIFIED)RtAudio
RTAUDIO_DUMMY enum valueRtAudio
showWarnings(bool value=true)RtAudio [inline]
startStream(void)RtAudio [inline]
stopStream(void)RtAudio [inline]
UNIX_JACK enum valueRtAudio
UNSPECIFIED enum valueRtAudio
WINDOWS_ASIO enum valueRtAudio
WINDOWS_DS enum valueRtAudio
~RtAudio()RtAudio
-
+

This is the complete list of members for RtAudio, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
abortStream(void)RtAudioinline
Api enum nameRtAudio
closeStream(void)RtAudioinline
getCompiledApi(std::vector< RtAudio::Api > &apis)RtAudiostatic
getCurrentApi(void)RtAudioinline
getDefaultInputDevice(void)RtAudioinline
getDefaultOutputDevice(void)RtAudioinline
getDeviceCount(void)RtAudioinline
getDeviceInfo(unsigned int device)RtAudioinline
getStreamLatency(void)RtAudioinline
getStreamSampleRate(void)RtAudioinline
getStreamTime(void)RtAudioinline
getVersion(void)RtAudioinlinestatic
isStreamOpen(void) const RtAudioinline
isStreamRunning(void) const RtAudioinline
LINUX_ALSA enum valueRtAudio
LINUX_OSS enum valueRtAudio
LINUX_PULSE enum valueRtAudio
MACOSX_CORE enum valueRtAudio
openStream(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL, RtAudioErrorCallback errorCallback=NULL)RtAudio
RtAudio(RtAudio::Api api=UNSPECIFIED)RtAudio
RTAUDIO_DUMMY enum valueRtAudio
showWarnings(bool value=true)RtAudioinline
startStream(void)RtAudioinline
stopStream(void)RtAudioinline
UNIX_JACK enum valueRtAudio
UNSPECIFIED enum valueRtAudio
WINDOWS_ASIO enum valueRtAudio
WINDOWS_DS enum valueRtAudio
~RtAudio()RtAudio
+
- +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/classRtAudio.html b/doc/html/classRtAudio.html index fb67084..2b5461e 100644 --- a/doc/html/classRtAudio.html +++ b/doc/html/classRtAudio.html @@ -8,96 +8,138 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
-

RtAudio Class Reference

+

Realtime audio i/o C++ classes. -More...

+ More...

#include <RtAudio.h>

- -

List of all members.

- - - - - - - - - -

Classes

struct  DeviceInfo
 The public device information structure for returning queried values. More...
struct  StreamOptions
 The structure for specifying stream options. More...
struct  StreamParameters
 The structure for specifying input or ouput stream parameters. More...

Public Types

enum  Api {
-  UNSPECIFIED, + + + + + + + + + + + +

+Classes

struct  DeviceInfo
 The public device information structure for returning queried values. More...
 
struct  StreamOptions
 The structure for specifying stream options. More...
 
struct  StreamParameters
 The structure for specifying input or ouput stream parameters. More...
 
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +

+Public Types

enum  Api {
+  UNSPECIFIED, LINUX_ALSA, LINUX_PULSE, LINUX_OSS,
-  UNIX_JACK, +  UNIX_JACK, MACOSX_CORE, WINDOWS_ASIO, WINDOWS_DS,
-  RTAUDIO_DUMMY +  RTAUDIO_DUMMY
}
 

Audio API specifier arguments.

- More...

Public Member Functions

 RtAudio (RtAudio::Api api=UNSPECIFIED) throw ()
 The class constructor.
 ~RtAudio () throw ()
 The destructor.
-RtAudio::Api getCurrentApi (void) throw ()
 Returns the audio API specifier for the current instance of RtAudio.
unsigned int getDeviceCount (void) throw ()
 A public function that queries for the number of audio devices available.
RtAudio::DeviceInfo getDeviceInfo (unsigned int device)
 Return an RtAudio::DeviceInfo structure for a specified device number.
unsigned int getDefaultOutputDevice (void) throw ()
 A function that returns the index of the default output device.
unsigned int getDefaultInputDevice (void) throw ()
 A function that returns the index of the default input device.
void openStream (RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)
 A public function for opening a stream with the specified parameters.
void closeStream (void) throw ()
 A function that closes a stream and frees any associated stream memory.
void startStream (void)
 A function that starts a stream.
void stopStream (void)
 Stop a stream, allowing any samples remaining in the output queue to be played.
void abortStream (void)
 Stop a stream, discarding any samples remaining in the input/output queue.
-bool isStreamOpen (void) const throw ()
 Returns true if a stream is open and false if not.
-bool isStreamRunning (void) const throw ()
 Returns true if the stream is running and false if it is stopped or not open.
double getStreamTime (void)
 Returns the number of elapsed seconds since the stream was started.
long getStreamLatency (void)
 Returns the internal stream latency in sample frames.
unsigned int getStreamSampleRate (void)
 Returns actual sample rate in use by the stream.
-void showWarnings (bool value=true) throw ()
 Specify whether warning messages should be printed to stderr.

Static Public Member Functions

static void getCompiledApi (std::vector< RtAudio::Api > &apis) throw ()
 A static function to determine the available compiled audio APIs.
 Audio API specifier arguments. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 RtAudio (RtAudio::Api api=UNSPECIFIED) throw ()
 The class constructor.
 
 ~RtAudio () throw ()
 The destructor.
 
+RtAudio::Api getCurrentApi (void) throw ()
 Returns the audio API specifier for the current instance of RtAudio.
 
unsigned int getDeviceCount (void) throw ()
 A public function that queries for the number of audio devices available.
 
RtAudio::DeviceInfo getDeviceInfo (unsigned int device)
 Return an RtAudio::DeviceInfo structure for a specified device number.
 
unsigned int getDefaultOutputDevice (void) throw ()
 A function that returns the index of the default output device.
 
unsigned int getDefaultInputDevice (void) throw ()
 A function that returns the index of the default input device.
 
void openStream (RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL, RtAudioErrorCallback errorCallback=NULL)
 A public function for opening a stream with the specified parameters.
 
void closeStream (void) throw ()
 A function that closes a stream and frees any associated stream memory.
 
void startStream (void)
 A function that starts a stream.
 
void stopStream (void)
 Stop a stream, allowing any samples remaining in the output queue to be played.
 
void abortStream (void)
 Stop a stream, discarding any samples remaining in the input/output queue.
 
+bool isStreamOpen (void) const throw ()
 Returns true if a stream is open and false if not.
 
+bool isStreamRunning (void) const throw ()
 Returns true if the stream is running and false if it is stopped or not open.
 
double getStreamTime (void)
 Returns the number of elapsed seconds since the stream was started.
 
long getStreamLatency (void)
 Returns the internal stream latency in sample frames.
 
unsigned int getStreamSampleRate (void)
 Returns actual sample rate in use by the stream.
 
+void showWarnings (bool value=true) throw ()
 Specify whether warning messages should be printed to stderr.
 
+ + + + + + +

+Static Public Member Functions

+static std::string getVersion (void)
 A static function to determine the current RtAudio version.
 
static void getCompiledApi (std::vector< RtAudio::Api > &apis) throw ()
 A static function to determine the available compiled audio APIs.
 
-

Detailed Description

-

Realtime audio i/o C++ classes.

+

Detailed Description

+

Realtime audio i/o C++ classes.

RtAudio provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), Macintosh OS X (CoreAudio and Jack), and Windows (DirectSound and ASIO) operating systems.

RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/

-

RtAudio: realtime audio i/o C++ classes Copyright (c) 2001-2012 Gary P. Scavone

+

RtAudio: realtime audio i/o C++ classes Copyright (c) 2001-2013 Gary P. Scavone

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-

Member Enumeration Documentation

- +

Member Enumeration Documentation

+
@@ -105,36 +147,35 @@ void 
enum RtAudio::Api
-
-
+

Audio API specifier arguments.

Enumerator:
- - - - - - - - -
UNSPECIFIED  +
UNSPECIFIED 

Search for a working compiled API.

LINUX_ALSA  +
LINUX_ALSA 

The Advanced Linux Sound Architecture API.

LINUX_PULSE  +
LINUX_PULSE 

The Linux PulseAudio API.

LINUX_OSS  +
LINUX_OSS 

The Linux Open Sound System API.

UNIX_JACK  +
UNIX_JACK 

The Jack Low-Latency Audio Server API.

MACOSX_CORE  +
MACOSX_CORE 

Macintosh OS-X Core Audio API.

WINDOWS_ASIO  +
WINDOWS_ASIO 

The Steinberg Audio Stream I/O API.

WINDOWS_DS  +
WINDOWS_DS 

The Microsoft Direct Sound API.

RTAUDIO_DUMMY  +
RTAUDIO_DUMMY 

A compilable but non-functional API.

@@ -143,22 +184,20 @@ void 
+

Constructor & Destructor Documentation

+
- - - + +
RtAudio::RtAudio (RtAudio::Api  api = UNSPECIFIED ) RtAudio::Api api = UNSPECIFIED) throw ()
-
-
+

The class constructor.

The constructor performs minor initialization tasks. No exceptions can be thrown.

@@ -166,354 +205,430 @@ void 
+
- - +
RtAudio::~RtAudio ( ) ) throw ()
-
-
+

The destructor.

If a stream is running or open, it will be stopped and closed automatically.

-

Member Function Documentation

- +

Member Function Documentation

+
+ + + + + +
- - - - + + +
static void RtAudio::getCompiledApi (std::vector< RtAudio::Api > &  apis )  throw () [static]std::vector< RtAudio::Api > & apis) throw ()
- -
+
+static
+

A static function to determine the available compiled audio APIs.

The values returned in the std::vector can be compared against the enumerated list values. Note that there can be more than one API compiled for certain operating systems.

- +
+ + + + + +
- - - - + + +
unsigned int RtAudio::getDeviceCount (void  )  throw () [inline]void ) throw ()
- -
+
+inline
+

A public function that queries for the number of audio devices available.

This function performs a system query of available devices each time it is called, thus supporting devices connected after instantiation. If a system error occurs during processing, a warning will be issued.

- +
+ + + + + +
- - - - + + +
RtAudio::DeviceInfo RtAudio::getDeviceInfo (unsigned int  device )  [inline]unsigned int device)
- -
+
+inline
+

Return an RtAudio::DeviceInfo structure for a specified device number.

Any device integer between 0 and getDeviceCount() - 1 is valid. If an invalid argument is provided, an RtError (type = INVALID_USE) will be thrown. If a device is busy or otherwise unavailable, the structure member "probed" will have a value of "false" and all other members are undefined. If the specified device is the current default input or output device, the corresponding "isDefault" member will have a value of "true".

- +
+ + + + + +
- - - - + + +
unsigned int RtAudio::getDefaultOutputDevice (void  )  throw () [inline]void ) throw ()
- -
+
+inline
+

A function that returns the index of the default output device.

If the underlying audio API does not provide a "default - device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream.

+device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream.

- +
+ + + + + +
- - - - + + +
unsigned int RtAudio::getDefaultInputDevice (void  )  throw () [inline]void ) throw ()
- -
+
+inline
+

A function that returns the index of the default input device.

If the underlying audio API does not provide a "default - device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream.

+device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream.

- +
- - + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - +
void RtAudio::openStream (RtAudio::StreamParameters outputParameters, RtAudio::StreamParametersoutputParameters,
RtAudio::StreamParametersinputParameters,
RtAudio::StreamParameters inputParameters, RtAudioFormat format,
RtAudioFormat  format, unsigned int sampleRate,
unsigned int  sampleRate, unsigned int * bufferFrames,
unsigned int *  bufferFrames, RtAudioCallback callback,
RtAudioCallback  callback, void * userData = NULL,
void *  userData = NULL, RtAudio::StreamOptionsoptions = NULL,
RtAudio::StreamOptions options = NULL RtAudioErrorCallback errorCallback = NULL 
)
-
-
+

A public function for opening a stream with the specified parameters.

An RtError (type = SYSTEM_ERROR) is thrown if a stream cannot be opened with the specified parameters or an error occurs during processing. An RtError (type = INVALID_USE) is thrown if any invalid device ID or channel number parameters are specified.

-
Parameters:
- - - - - - - - - +
Parameters
+
outputParameters Specifies output stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For input-only streams, this argument should be NULL. The device ID is an index value between 0 and getDeviceCount() - 1.
inputParameters Specifies input stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For output-only streams, this argument should be NULL. The device ID is an index value between 0 and getDeviceCount() - 1.
format An RtAudioFormat specifying the desired sample data format.
sampleRate The desired sample rate (sample frames per second).
*bufferFrames A pointer to a value indicating the desired internal buffer size in sample frames. The actual value used by the device is returned via the same pointer. A value of zero can be specified, in which case the lowest allowable value is determined.
callback A client-defined function that will be invoked when input data is available and/or output data is needed.
userData An optional pointer to data that can be accessed from within the callback function.
options An optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags and a suggested number of stream buffers that can be used to control stream latency. More buffers typically result in more robust performance, though at a cost of greater latency. If a value of zero is specified, a system-specific median value is chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the lowest allowable value is used. The actual value used is returned via the structure argument. The parameter is API dependent.
+ + + + + + + + +
outputParametersSpecifies output stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For input-only streams, this argument should be NULL. The device ID is an index value between 0 and getDeviceCount() - 1.
inputParametersSpecifies input stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For output-only streams, this argument should be NULL. The device ID is an index value between 0 and getDeviceCount() - 1.
formatAn RtAudioFormat specifying the desired sample data format.
sampleRateThe desired sample rate (sample frames per second).
*bufferFramesA pointer to a value indicating the desired internal buffer size in sample frames. The actual value used by the device is returned via the same pointer. A value of zero can be specified, in which case the lowest allowable value is determined.
callbackA client-defined function that will be invoked when input data is available and/or output data is needed.
userDataAn optional pointer to data that can be accessed from within the callback function.
optionsAn optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags and a suggested number of stream buffers that can be used to control stream latency. More buffers typically result in more robust performance, though at a cost of greater latency. If a value of zero is specified, a system-specific median value is chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the lowest allowable value is used. The actual value used is returned via the structure argument. The parameter is API dependent.
errorCallbackA client-defined function that will be invoked when an error has occured.
- +
+ + + + + +
- - - - + + +
void RtAudio::closeStream (void  )  throw () [inline]void ) throw ()
- -
+
+inline
+

A function that closes a stream and frees any associated stream memory.

If a stream is not open, this function issues a warning and returns (no exception is thrown).

- +
+ + + + + +
- - - - + + +
void RtAudio::startStream (void  )  [inline]void )
- -
+
+inline
+

A function that starts a stream.

An RtError (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An RtError (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already running.

- +
+ + + + + +
- - - - + + +
void RtAudio::stopStream (void  )  [inline]void )
- -
+
+inline
+

Stop a stream, allowing any samples remaining in the output queue to be played.

An RtError (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An RtError (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped.

- +
+ + + + + +
- - - - + + +
void RtAudio::abortStream (void  )  [inline]void )
- -
+
+inline
+

Stop a stream, discarding any samples remaining in the input/output queue.

An RtError (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An RtError (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped.

- +
+ + + + + +
- - - - + + +
double RtAudio::getStreamTime (void  )  [inline]void )
- -
+
+inline
+

Returns the number of elapsed seconds since the stream was started.

If a stream is not open, an RtError (type = INVALID_USE) will be thrown.

- +
+ + + + + +
- - - - + + +
long RtAudio::getStreamLatency (void  )  [inline]void )
- -
+
+inline
+

Returns the internal stream latency in sample frames.

The stream latency refers to delay in audio input and/or output caused by internal buffering by the audio system and/or hardware. For duplex streams, the returned value will represent the sum of the input and output latencies. If a stream is not open, an RtError (type = INVALID_USE) will be thrown. If the API does not report latency, the return value will be zero.

- +
+ + + + + +
- - - - + + +
unsigned int RtAudio::getStreamSampleRate (void  )  [inline]void )
- -
+
+inline
+

Returns actual sample rate in use by the stream.

On some systems, the sample rate used may be slightly different than that specified in the stream parameters. If a stream is not open, an RtError (type = INVALID_USE) will be thrown.

@@ -523,12 +638,10 @@ void 
RtAudio.h - +
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/classRtError-members.html b/doc/html/classRtError-members.html index c4ae4a9..04e5811 100644 --- a/doc/html/classRtError-members.html +++ b/doc/html/classRtError-members.html @@ -8,33 +8,38 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
RtError Member List
+
-

RtError Member List

This is the complete list of members for RtError, including all inherited members. - - - - - - - - - - - - - - - - - - -
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void) const RtError [inline, virtual]
getType(void) const RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_USE enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void) const RtError [inline, virtual]
RtError(const std::string &message, Type type=RtError::UNSPECIFIED)RtError [inline]
SYSTEM_ERROR enum valueRtError
THREAD_ERROR enum valueRtError
Type enum nameRtError
UNSPECIFIED enum valueRtError
WARNING enum valueRtError
what(void) const RtError [inline, virtual]
~RtError(void)RtError [inline, virtual]
-
+

This is the complete list of members for RtError, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void) const RtErrorinlinevirtual
getType(void) const RtErrorinlinevirtual
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_USE enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void) const RtErrorinlinevirtual
RtError(const std::string &message, Type type=RtError::UNSPECIFIED)RtErrorinline
SYSTEM_ERROR enum valueRtError
THREAD_ERROR enum valueRtError
Type enum nameRtError
UNSPECIFIED enum valueRtError
WARNING enum valueRtError
what(void) const RtErrorinlinevirtual
~RtError(void)RtErrorinlinevirtual
+
- +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/classRtError.html b/doc/html/classRtError.html index c98abd7..e564d86 100644 --- a/doc/html/classRtError.html +++ b/doc/html/classRtError.html @@ -8,60 +8,78 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+ +
+
RtError Class Reference
+
-

RtError Class Reference

+

Exception handling class for RtAudio & RtMidi. -More...

+ More...

#include <RtError.h>

-

List of all members.

- - -

Public Types

enum  Type {
-  WARNING, +

Inherits exception.

+ + + - - - - - - - - - - - - - - + + +

+Public Types

enum  Type {
+  WARNING, DEBUG_WARNING, UNSPECIFIED, NO_DEVICES_FOUND,
-  INVALID_DEVICE, +  INVALID_DEVICE, MEMORY_ERROR, INVALID_PARAMETER, INVALID_USE,
-  DRIVER_ERROR, +  DRIVER_ERROR, SYSTEM_ERROR, THREAD_ERROR
}
 

Defined RtError types.

- More...

Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
 The constructor.
-virtual ~RtError (void) throw ()
 The destructor.
-virtual void printMessage (void) const throw ()
 Prints thrown error message to stderr.
-virtual const TypegetType (void) const throw ()
 Returns the thrown error message type.
-virtual const std::string & getMessage (void) const throw ()
 Returns the thrown error message string.
-virtual const char * what (void) const throw ()
 Returns the thrown error message as a c-style string.
 Defined RtError types. More...
 
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
 The constructor.
 
+virtual ~RtError (void) throw ()
 The destructor.
 
+virtual void printMessage (void) const throw ()
 Prints thrown error message to stderr.
 
+virtual const TypegetType (void) const throw ()
 Returns the thrown error message type.
 
+virtual const std::string & getMessage (void) const throw ()
 Returns the thrown error message string.
 
+virtual const char * what (void) const throw ()
 Returns the thrown error message as a c-style string.
 
-

Detailed Description

-

Exception handling class for RtAudio & RtMidi.

+

Detailed Description

+

Exception handling class for RtAudio & RtMidi.

The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. See the RtAudio and RtMidi documentation to know which methods can throw an RtError.

-

Member Enumeration Documentation

- +

Member Enumeration Documentation

+
@@ -69,42 +87,41 @@ virtual const char * 
enum RtError::Type
-
-
+

Defined RtError types.

Enumerator:
- - - - - - - - - - -
WARNING  +
WARNING 

A non-critical error.

DEBUG_WARNING  +
DEBUG_WARNING 

A non-critical error which might be useful for debugging.

UNSPECIFIED  +
UNSPECIFIED 

The default, unspecified error type.

NO_DEVICES_FOUND  +
NO_DEVICES_FOUND 

No devices found on system.

INVALID_DEVICE  +
INVALID_DEVICE 

An invalid device ID was specified.

MEMORY_ERROR  +
MEMORY_ERROR 

An error occured during memory allocation.

INVALID_PARAMETER  +
INVALID_PARAMETER 

An invalid parameter was specified to a function.

INVALID_USE  +
INVALID_USE 

The function was called incorrectly.

DRIVER_ERROR  +
DRIVER_ERROR 

A system driver error occured.

SYSTEM_ERROR  +
SYSTEM_ERROR 

A system error occured.

THREAD_ERROR  +
THREAD_ERROR 

A thread error occured.

@@ -116,12 +133,10 @@ virtual const char * 
The documentation for this class was generated from the following file: - +
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/classes.html b/doc/html/classes.html index ca00c5d..8f0e44b 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -8,20 +8,29 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Class Index
+
-

Class Index

D | R | S
- -
  D  
-
  R  
-
RtError   RtAudio::StreamOptions   RtAudio::StreamParameters   
RtAudio::DeviceInfo   RtAudio   
  S  
-
D | R | S
-
+
D | R | S
+ + + + + + +
  D  
+
  R  
+
RtError   RtAudio::StreamParameters   
  S  
+
RtAudio::DeviceInfo   RtAudio   
RtAudio::StreamOptions   
+
D | R | S
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/compiling.html b/doc/html/compiling.html index e6207ca..58d6a55 100644 --- a/doc/html/compiling.html +++ b/doc/html/compiling.html @@ -8,27 +8,30 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Debugging & Compiling
+
- - -

Debugging & Compiling

-Debugging

-

If you are having problems getting RtAudio to run on your system, make sure to pass a value of true to the RtAudio::showWarnings() function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the tests directory. The program audioprobe displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__.

-

-Compiling

+

+Debugging

+

If you are having problems getting RtAudio to run on your system, make sure to pass a value of true to the RtAudio::showWarnings() function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the tests directory. The program audioprobe displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition RTAUDIO_DEBUG.

+

+Compiling

In order to compile RtAudio for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:

- +
- + - @@ -39,12 +42,10 @@ Compiling
OS: Audio API: C++ Class: Preprocessor Definition: Library or Framework: Example Compiler Statement:
Linux ALSA RtApiAlsa __LINUX_ALSA__ asound, pthread g++ -Wall -D__LINUX_ALSA__ -o audioprobe audioprobe.cpp RtAudio.cpp -lasound -lpthread
Linux PulseAudio RtApiPulse __LINUX_PULSE__ pthread g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread
Linux PulseAudio RtApiPulse __LINUX_PULSE__ pthread g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread -lpulse-simple -lpulse
Linux OSS RtApiOss __LINUX_OSS__ pthread g++ -Wall -D__LINUX_OSS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread
Linux or Macintosh OS-X Jack Audio Server RtApiJack __UNIX_JACK__ jack, pthread

g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread

+
Linux or Macintosh OS-X Jack Audio Server RtApiJack __UNIX_JACK__ jack, pthread

g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp pkg-config --cflags --libs jack -lpthread

Windows ASIO RtApiAsio __WINDOWS_ASIO__ various ASIO header and source files compiler specific

The example compiler statements above could be used to compile the audioprobe.cpp example file, assuming that audioprobe.cpp, RtAudio.h, RtError.h, and RtAudio.cpp all exist in the same directory.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index b057a92..2642e8f 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,25 +1,49 @@ /* The standard CSS for doxygen */ body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; + font: 400 14px/19px Roboto,sans-serif; } /* @group Heading Levels */ -h1 { - text-align: center; +h1.groupheader { font-size: 150%; } -h2 { - font-size: 120%; +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; } -h3 { +h3.groupheader { font-size: 100%; } +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + dt { font-weight: bold; } @@ -64,11 +88,9 @@ h3.version { } div.qindex, div.navtab{ - background-color: #e8eef2; - border: 1px solid #84b0c7; + background-color: #EBEFF6; + border: 1px solid #A3B4D7; text-align: center; - margin: 2px; - padding: 2px; } div.qindex, div.navpath { @@ -83,13 +105,13 @@ div.navtab { /* @group Link Styling */ a { - color: #153788; + color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { - color: #1b77c5; + color: #4665A2; } a:hover { @@ -102,9 +124,9 @@ a.qindex { a.qindexHL { font-weight: bold; - background-color: #6666cc; + background-color: #9CAFD4; color: #ffffff; - border: 1px double #9295C2; + border: 1px double #869DCA; } .contents a.qindexHL:visited { @@ -118,12 +140,12 @@ a.el { a.elRef { } -a.code { - color: #3030f0; +a.code, a.code:visited { + color: #4665A2; } -a.codeRef { - color: #3030f0; +a.codeRef, a.codeRef:visited { + color: #4665A2; } /* @end */ @@ -132,20 +154,72 @@ dl.el { margin-left: -1cm; } -.fragment { +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px; + margin: 4px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { font-family: monospace, fixed; - font-size: 105%; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; } -pre.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; } div.ah { @@ -153,13 +227,22 @@ div.ah { font-weight: bold; color: #ffffff; margin-bottom: 3px; - margin-top: 3px + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; - margin-bottom: 6px; font-weight: bold; } @@ -169,29 +252,36 @@ div.groupText { } body { - background: white; + background-color: white; color: black; - margin-right: 20px; - margin-left: 20px; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; } td.indexkey { - background-color: #e8eef2; + background-color: #EBEFF6; font-weight: bold; - border: 1px solid #CCCCCC; + border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; + white-space: nowrap; + vertical-align: top; } td.indexvalue { - background-color: #e8eef2; - border: 1px solid #CCCCCC; + background-color: #EBEFF6; + border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { - background-color: #f0f0f0; + background-color: #EEF1F7; } p.formulaDsp { @@ -217,6 +307,11 @@ div.center img { border: 0px; } +address.footer { + text-align: right; + padding-right: 12px; +} + img.footer { border: 0px; vertical-align: middle; @@ -268,8 +363,16 @@ span.vhdllogic { color: #ff0000 } +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + /* @end */ +/* .search { color: #003399; font-weight: bold; @@ -286,6 +389,7 @@ input.search { font-weight: normal; background-color: #e8eef2; } +*/ td.tiny { font-size: 75%; @@ -294,26 +398,53 @@ td.tiny { .dirtab { padding: 4px; border-collapse: collapse; - border: 1px solid #84b0c7; + border: 1px solid #A3B4D7; } th.dirtab { - background: #e8eef2; + background: #EBEFF6; font-weight: bold; } hr { - height: 0; + height: 0px; border: none; - border-top: 1px solid #666; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; } /* @group Member Descriptions */ +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #FAFAFA; + background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; @@ -324,17 +455,25 @@ hr { color: #555; } -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #ccc; +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } +.memItemRight { + width: 100%; +} + .memTemplParams { - color: #606060; + color: #4665A2; white-space: nowrap; + font-size: 80%; } /* @end */ @@ -345,57 +484,107 @@ hr { .memtemplate { font-size: 80%; - color: #606060; + color: #4665A2; font-weight: normal; - margin-left: 3px; + margin-left: 9px; } .memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; + background-color: #EBEFF6; + border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } +.mempage { + width: 100%; +} + .memitem { padding: 0; margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; } -.memname { - white-space: nowrap; - font-weight: bold; +.memitem.glow { + box-shadow: 0 0 15px cyan; } -.memproto, .memdoc { - border: 1px solid #84b0c7; -} - -.memproto { - padding: 0; - background-color: #d5e1e8; - font-weight: bold; - -webkit-border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -moz-border-radius-topleft: 8px; - -moz-border-radius-topright: 8px; + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} +dl.reflist dt { + padding: 5px; } -.memdoc { - padding: 2px 5px; - background-color: #eef3f5; - border-top-width: 0; - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; } .paramkey { @@ -413,120 +602,571 @@ hr { .paramname em { font-style: normal; } +.paramname code { + line-height: 14px; +} -/* @end */ +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} -/* @group Directory (tree) */ +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} -/* for the tree view */ +table.mlabels { + border-spacing: 0px; +} -.ftvtree { - font-family: sans-serif; - margin: 0.5em; +td.mlabels-left { + width: 100%; + padding: 0px; } -/* these are for tree view when used as main index */ +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} -.directory { - font-size: 9pt; - font-weight: bold; +span.mlabels { + margin-left: 8px; } -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; } -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ -.directory > h3 { - margin-top: 0; +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; } -.directory p { - margin: 0px; - white-space: nowrap; +.directory table { + border-collapse:collapse; } -.directory div { - display: none; - margin: 0px; +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; } -.directory img { - vertical-align: -30%; +.directory td.entry { + white-space: nowrap; + padding-right: 6px; } -/* these are for tree view when not used as main index */ +.directory td.entry a { + outline:none; +} -.directory-alt { - font-size: 100%; - font-weight: bold; +.directory td.entry a img { + border: none; } -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); } -.directory-alt > h3 { - margin-top: 0; +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; } -.directory-alt p { - margin: 0px; - white-space: nowrap; +.directory img { + vertical-align: -30%; } -.directory-alt div { - display: none; - margin: 0px; +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; } -.directory-alt img { - vertical-align: -30%; +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; } -/* @end */ +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} address { font-style: normal; - color: #333; + color: #2A3D61; } table.doxtable { border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; } table.doxtable td, table.doxtable th { - border: 1px solid #153788; + border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { - background-color: #254798; + background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; - text-align:left; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } } diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png index f0a274bbaffdd67f6d784c894d9cf28729db0e14..3ff17d807fd8aa003bed8bb2a69e8f0909592fd1 100644 GIT binary patch literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/doc/html/duplex.html b/doc/html/duplex.html index d43281b..d397a8d 100644 --- a/doc/html/duplex.html +++ b/doc/html/duplex.html @@ -8,83 +8,84 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Duplex Mode
+
- - -

Duplex Mode

Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we simply pass the input data back to the output.

-
#include "RtAudio.h"
-#include <iostream>
-#include <cstdlib>
-#include <cstring>
-
-// Pass-through function.
-int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
-           double streamTime, RtAudioStreamStatus status, void *data )
-{
-  // Since the number of input and output channels is equal, we can do
-  // a simple buffer copy operation here.
-  if ( status ) std::cout << "Stream over/underflow detected." << std::endl;
-
-  unsigned long *bytes = (unsigned long *) data;
-  memcpy( outputBuffer, inputBuffer, *bytes );
-  return 0;
-}
-
-int main()
-{
- RtAudio adac;
-  if ( adac.getDeviceCount() < 1 ) {
-    std::cout << "\nNo audio devices found!\n";
-    exit( 0 );
-  }
-
-  // Set the same number of channels for both input and output.
-  unsigned int bufferBytes, bufferFrames = 512;
-  RtAudio::StreamParameters iParams, oParams;
-  iParams.deviceId = 0; // first available device
-  iParams.nChannels = 2;
-  oParams.deviceId = 0; // first available device
-  oParams.nChannels = 2;
-
-  try {
-    adac.openStream( &oParams, &iParams, RTAUDIO_SINT32, 44100, &bufferFrames, &inout, (void *)&bufferBytes );
-  }
-  catch ( RtError& e ) {
-    e.printMessage();
-    exit( 0 );
-  }
-
-  bufferBytes = bufferFrames * 2 * 4;
-
-  try {
-    adac.startStream();
-
-    char input;
-    std::cout << "\nRunning ... press <enter> to quit.\n";
-    std::cin.get(input);
-
-    // Stop the stream.
-    adac.stopStream();
-  }
-  catch ( RtError& e ) {
-    e.printMessage();
-    goto cleanup;
-  }
-
- cleanup:
-  if ( adac.isStreamOpen() ) adac.closeStream();
-
-  return 0;
-}
-

In this example, audio recorded by the stream input will be played out during the next round of audio processing.

+

Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we simply pass the input data back to the output.

+
#include "RtAudio.h"
+
#include <iostream>
+
#include <cstdlib>
+
#include <cstring>
+
+
// Pass-through function.
+
int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+
double streamTime, RtAudioStreamStatus status, void *data )
+
{
+
// Since the number of input and output channels is equal, we can do
+
// a simple buffer copy operation here.
+
if ( status ) std::cout << "Stream over/underflow detected." << std::endl;
+
+
unsigned long *bytes = (unsigned long *) data;
+
memcpy( outputBuffer, inputBuffer, *bytes );
+
return 0;
+
}
+
+
int main()
+
{
+
RtAudio adac;
+
if ( adac.getDeviceCount() < 1 ) {
+
std::cout << "\nNo audio devices found!\n";
+
exit( 0 );
+
}
+
+
// Set the same number of channels for both input and output.
+
unsigned int bufferBytes, bufferFrames = 512;
+
RtAudio::StreamParameters iParams, oParams;
+
iParams.deviceId = 0; // first available device
+
iParams.nChannels = 2;
+
oParams.deviceId = 0; // first available device
+
oParams.nChannels = 2;
+
+
try {
+
adac.openStream( &oParams, &iParams, RTAUDIO_SINT32, 44100, &bufferFrames, &inout, (void *)&bufferBytes );
+
}
+
catch ( RtError& e ) {
+ +
exit( 0 );
+
}
+
+
bufferBytes = bufferFrames * 2 * 4;
+
+
try {
+
adac.startStream();
+
+
char input;
+
std::cout << "\nRunning ... press <enter> to quit.\n";
+
std::cin.get(input);
+
+
// Stop the stream.
+
adac.stopStream();
+
}
+
catch ( RtError& e ) {
+ +
goto cleanup;
+
}
+
+
cleanup:
+
if ( adac.isStreamOpen() ) adac.closeStream();
+
+
return 0;
+
}
+

In this example, audio recorded by the stream input will be played out during the next round of audio processing.

Note that a duplex stream can make use of two different devices (except when using the Linux Jack and Windows ASIO APIs). However, this may cause timing problems due to possible device clock variations, unless a common external "sync" is provided.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/errors.html b/doc/html/errors.html index f04dc1e..3c05433 100644 --- a/doc/html/errors.html +++ b/doc/html/errors.html @@ -8,17 +8,18 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Error Handling
+
- - -

Error Handling

RtAudio makes restrained use of C++ exceptions. That is, exceptions are thrown only when system errors occur that prevent further class operation or when the user makes invalid function calls. In other cases, a warning message may be displayed and an appropriate value is returned. For example, if a system error occurs when processing the RtAudio::getDeviceCount() function, the return value is zero. In such a case, the user cannot expect to make use of most other RtAudio functions because no devices are available (and thus a stream cannot be opened). A client can call the function RtAudio::showWarnings() with a boolean argument to enable or disable the printing of warning messages to stderr. By default, warning messages are displayed. There is a protected RtAudio method, error(), that can be modified to globally control how these messages are handled and reported.

-
+

RtAudio makes restrained use of C++ exceptions. That is, exceptions are thrown only when system errors occur that prevent further class operation or when the user makes invalid function calls. In other cases, a warning message may be displayed and an appropriate value is returned. For example, if a system error occurs when processing the RtAudio::getDeviceCount() function, the return value is zero. In such a case, the user cannot expect to make use of most other RtAudio functions because no devices are available (and thus a stream cannot be opened). A client can call the function RtAudio::showWarnings() with a boolean argument to enable or disable the printing of warning messages to stderr. By default, warning messages are displayed. There is a protected RtAudio method, error(), that can be modified to globally control how these messages are handled and reported.

+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/files.html b/doc/html/files.html index 74a8f45..a173fa6 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -8,18 +8,23 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
File List
+
-

File List

Here is a list of all documented files with brief descriptions: - - +
Here is a list of all documented files with brief descriptions:
+
RtAudio.h [code]
RtError.h [code]
+ +
o*RtAudio.h
\*RtError.h
-
+ +
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/functions.html b/doc/html/functions.html index c9cab16..020228f 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -8,41 +8,12 @@
Home   Class/Enum List   File List   Compound Members  

- - -
- -
+ +
-Here is a list of all documented class members with links to the class documentation for each member: +
Here is a list of all documented class members with links to the class documentation for each member:
-

- a -

    +

    - a -

    • abortStream() : RtAudio
    • @@ -52,14 +23,14 @@ Here is a list of all documented class members with links to the class documenta
    -

    - c -

      +

      - c -

      -

      - d -

        +

        - d -

        • DEBUG_WARNING : RtError
        • @@ -75,7 +46,7 @@ Here is a list of all documented class members with links to the class documenta
        -

        - f -

          +

          - f -

          • firstChannel : RtAudio::StreamParameters
          • @@ -85,7 +56,7 @@ Here is a list of all documented class members with links to the class documenta
          -

          - g -

            +

            - g -

            • getCompiledApi() : RtAudio
            • @@ -119,10 +90,13 @@ Here is a list of all documented class members with links to the class documenta
            • getType() : RtError
            • +
            • getVersion() +: RtAudio +
            -

            - i -

              +

              - i -

              • inputChannels : RtAudio::DeviceInfo
              • @@ -150,7 +124,7 @@ Here is a list of all documented class members with links to the class documenta
              -

              - l -

                +

                - l -

                • LINUX_ALSA : RtAudio
                • @@ -163,7 +137,7 @@ Here is a list of all documented class members with links to the class documenta
                -

                - m -

                  +

                  - m -

                  • MACOSX_CORE : RtAudio
                  • @@ -173,7 +147,7 @@ Here is a list of all documented class members with links to the class documenta
                  -

                  - n -

                    +

                    - n -

                    • name : RtAudio::DeviceInfo
                    • @@ -192,9 +166,9 @@ Here is a list of all documented class members with links to the class documenta
                    -

                    - o -

                      +

                      - o -

                      • openStream() -: RtAudio +: RtAudio
                      • outputChannels : RtAudio::DeviceInfo @@ -202,7 +176,7 @@ Here is a list of all documented class members with links to the class documenta
                      -

                      - p -

                        +

                        - p -

                        • printMessage() : RtError
                        • @@ -215,7 +189,7 @@ Here is a list of all documented class members with links to the class documenta
                        -

                        - r -

                          +

                          - r -

                          • RtAudio() : RtAudio
                          • @@ -228,7 +202,7 @@ Here is a list of all documented class members with links to the class documenta
                          -

                          - s -

                            +

                            - s -

                            • sampleRates : RtAudio::DeviceInfo
                            • @@ -250,7 +224,7 @@ Here is a list of all documented class members with links to the class documenta
                            -

                            - t -

                              +

                              - t -

                              • THREAD_ERROR : RtError
                              • @@ -260,7 +234,7 @@ Here is a list of all documented class members with links to the class documenta
                              -

                              - u -

                                +

                                - u -

                                • UNIX_JACK : RtAudio
                                • @@ -271,7 +245,7 @@ Here is a list of all documented class members with links to the class documenta
                                -

                                - w -

                                  +

                                  - w -

                                  • WARNING : RtError
                                  • @@ -287,7 +261,7 @@ Here is a list of all documented class members with links to the class documenta
                                  -

                                  - ~ -

                                    +

                                    - ~ -

                                    • ~RtAudio() : RtAudio
                                    • @@ -295,12 +269,10 @@ Here is a list of all documented class members with links to the class documenta : RtError
                                    -
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html index 0837025..005cda1 100644 --- a/doc/html/functions_enum.html +++ b/doc/html/functions_enum.html @@ -8,18 +8,10 @@
Home   Class/Enum List   File List   Compound Members  

- - + +
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html index 17b4de9..d2bf550 100644 --- a/doc/html/functions_eval.html +++ b/doc/html/functions_eval.html @@ -8,18 +8,10 @@
Home   Class/Enum List   File List   Compound Members  

- - + +
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html index c8f46a0..6bea4ce 100644 --- a/doc/html/functions_func.html +++ b/doc/html/functions_func.html @@ -8,18 +8,10 @@
Home   Class/Enum List   File List   Compound Members  

- - + +
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index 4fd1758..2619b2a 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -8,18 +8,10 @@
Home   Class/Enum List   File List   Compound Members  

- - + +
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/globals.html b/doc/html/globals.html index f2ff3da..c7e4a64 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -8,18 +8,16 @@
Home   Class/Enum List   File List   Compound Members  

- -
- -
+ +
-Here is a list of all documented file members with links to the documentation:
    +
    Here is a list of all documented file members with links to the documentation:
    • RtAudioCallback : RtAudio.h
    • +
    • RtAudioErrorCallback +: RtAudio.h +
    • RtAudioFormat : RtAudio.h
    • @@ -30,12 +28,10 @@ Here is a list of all documented file members with links to the documentation:RtAudio.h
    -
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html index 7592545..f0b451e 100644 --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -8,18 +8,16 @@
Home   Class/Enum List   File List   Compound Members  

- -
- -
+ +
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/index.html b/doc/html/index.html index e7e82f5..e1c5ef4 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -8,9 +8,14 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
The RtAudio Home Page
+
-

The RtAudio Home Page

4.0.11

RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:

+

RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:

  • object-oriented C++ design
  • @@ -30,26 +35,24 @@ allow audio device capability probing automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping

RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the API Notes section for information specific to each of the supported audio APIs.

-

-What's New (Version 4.0)

-

RtAudio V4 represents a significant rewrite of the code and includes a number of API and functionality changes from previous versions. A partial list of the changes includes:

+

+Latest Updates (Version 4.0.12)

    -
  • new support for non-interleaved user data
  • -
  • additional input/output parameter specifications, including channel offset
  • -
  • new support for dynamic connection of devices
  • -
  • new support for stream time
  • -
  • revised callback arguments, including separate input and output buffer arguments
  • -
  • revised C++ exception handling
  • -
  • updated support for OSS version 4.0
  • -
  • discontinued support of blocking functionality
  • -
  • discontinued support of SGI
  • +
  • new functionality to allow error reporting via a client-supplied function (thanks to Pavel Mogilevskiy)
  • +
  • new function to return the version number
  • +
  • updated RtAudio.cpp and ASIO files for UNICODE support (thanks to Renaud Schoonbroodt)
  • +
  • updates to PulseAudio API support (thanks to Peter Meerwald and Tristan Matthews)
  • +
  • updates for pkg-config support in configure script
  • +
  • 24-bit format changed to true 24-bit format, not sub-bytes of 32-bits (thanks to Marc Britton)
  • +
  • bug fixes to make sure stream status is closed if error during probeDeviceOpen
  • +
  • updates / fixes to SCHED_RR code in ALSA (thanks to Marc Lindahl)
  • +
  • various changes to avoid global variables (thanks to Martin Koegler)
-

Devices are now re-enumerated every time the RtAudio::getDeviceCount(), RtAudio::getDeviceInfo(), and RtAudio::openStream() functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices that are connected after an RtAudio instance is created.

-

-Download

-

Latest Release (14 June 2012): Version 4.0.11

-

-Documentation Links

+

+Download

+

Latest Release (16 April 2013): Version 4.0.12

+

+Documentation Links

  1. Error Handling
  2. Probing Device Capabilities
  3. @@ -66,12 +69,10 @@ Documentation Links
  4. Possible Updates
  5. RtAudio at SourceForge
-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/license.html b/doc/html/license.html index 9c481b4..e07b316 100644 --- a/doc/html/license.html +++ b/doc/html/license.html @@ -8,22 +8,23 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
License
+
- - -

License

RtAudio: a set of realtime audio i/o C++ classes
+

RtAudio: a set of realtime audio i/o C++ classes
Copyright (c) 2001-2012 Gary P. Scavone

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/multi.html b/doc/html/multi.html index 270de6e..19c166f 100644 --- a/doc/html/multi.html +++ b/doc/html/multi.html @@ -8,18 +8,19 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Using Simultaneous Multiple APIs
+
- - -

Using Simultaneous Multiple APIs

Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument RtAudio::WINDOWS_ASIO when attempting to create an instance of RtAudio. If no available devices are found, then an instance of RtAudio with the api argument RtAudio::WINDOWS_DS can be created. Alternately, if no api argument is specified, RtAudio will first look for an ASIO instance and then a DirectSound instance (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of RtAudio open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is unlikely that the same device could be simultaneously controlled with two different audio APIs.

+

Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument RtAudio::WINDOWS_ASIO when attempting to create an instance of RtAudio. If no available devices are found, then an instance of RtAudio with the api argument RtAudio::WINDOWS_DS can be created. Alternately, if no api argument is specified, RtAudio will first look for an ASIO instance and then a DirectSound instance (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of RtAudio open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is unlikely that the same device could be simultaneously controlled with two different audio APIs.

The static function RtAudio::getCompiledApi() is provided to determine the available compiled API support. The function RtAudio::getCurrentApi() indicates the API selected for a given RtAudio instance.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/pages.html b/doc/html/pages.html index 2281ef8..116a070 100644 --- a/doc/html/pages.html +++ b/doc/html/pages.html @@ -8,38 +8,32 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Related Pages
+
-

Related Pages

Here is a list of all related documentation pages: -
+
Here is a list of all related documentation pages:
+
- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/playback.html b/doc/html/playback.html index 6830cae..1364fa5 100644 --- a/doc/html/playback.html +++ b/doc/html/playback.html @@ -8,89 +8,90 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Playback
+
- - -

Playback

In this example, we provide a complete program that demonstrates the use of RtAudio for audio playback. Our program produces a two-channel sawtooth waveform for output.

-
#include "RtAudio.h"
-#include <iostream>
-#include <cstdlib>
-
-// Two-channel sawtooth wave generator.
-int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
-         double streamTime, RtAudioStreamStatus status, void *userData )
-{
-  unsigned int i, j;
-  double *buffer = (double *) outputBuffer;
-  double *lastValues = (double *) userData;
-
-  if ( status )
-    std::cout << "Stream underflow detected!" << std::endl;
-
-  // Write interleaved audio data.
-  for ( i=0; i<nBufferFrames; i++ ) {
-    for ( j=0; j<2; j++ ) {
-      *buffer++ = lastValues[j];
-
-      lastValues[j] += 0.005 * (j+1+(j*0.1));
-      if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
-    }
-  }
-
-  return 0;
-}
-
-int main()
-{
-  RtAudio dac;
-  if ( dac.getDeviceCount() < 1 ) {
-    std::cout << "\nNo audio devices found!\n";
-    exit( 0 );
-  }
-
-  RtAudio::StreamParameters parameters;
-  parameters.deviceId = dac.getDefaultOutputDevice();
-  parameters.nChannels = 2;
-  parameters.firstChannel = 0;
-  unsigned int sampleRate = 44100;
-  unsigned int bufferFrames = 256; // 256 sample frames
-  double data[2];
-
-  try {
-    dac.openStream( &parameters, NULL, RTAUDIO_FLOAT64,
-                    sampleRate, &bufferFrames, &saw, (void *)&data );
-    dac.startStream();
-  }
-  catch ( RtError& e ) {
-    e.printMessage();
-    exit( 0 );
-  }
-  
-  char input;
-  std::cout << "\nPlaying ... press <enter> to quit.\n";
-  std::cin.get( input );
-
-  try {
-    // Stop the stream
-    dac.stopStream();
-  }
-  catch (RtError& e) {
-    e.printMessage();
-  }
-
-  if ( dac.isStreamOpen() ) dac.closeStream();
-
-  return 0;
-}
-

We open the stream in exactly the same way as the previous example (except with a data format change) and specify the address of our callback function "saw()". The callback function will automatically be invoked when the underlying audio system needs data for output. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() functions). We can also pass a pointer value to the RtAudio::openStream() function that is made available in the callback function. In this way, it is possible to gain access to arbitrary data created in our main() function from within the globally defined callback function.

+

In this example, we provide a complete program that demonstrates the use of RtAudio for audio playback. Our program produces a two-channel sawtooth waveform for output.

+
#include "RtAudio.h"
+
#include <iostream>
+
#include <cstdlib>
+
+
// Two-channel sawtooth wave generator.
+
int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+
double streamTime, RtAudioStreamStatus status, void *userData )
+
{
+
unsigned int i, j;
+
double *buffer = (double *) outputBuffer;
+
double *lastValues = (double *) userData;
+
+
if ( status )
+
std::cout << "Stream underflow detected!" << std::endl;
+
+
// Write interleaved audio data.
+
for ( i=0; i<nBufferFrames; i++ ) {
+
for ( j=0; j<2; j++ ) {
+
*buffer++ = lastValues[j];
+
+
lastValues[j] += 0.005 * (j+1+(j*0.1));
+
if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
+
}
+
}
+
+
return 0;
+
}
+
+
int main()
+
{
+
RtAudio dac;
+
if ( dac.getDeviceCount() < 1 ) {
+
std::cout << "\nNo audio devices found!\n";
+
exit( 0 );
+
}
+
+ +
parameters.deviceId = dac.getDefaultOutputDevice();
+
parameters.nChannels = 2;
+
parameters.firstChannel = 0;
+
unsigned int sampleRate = 44100;
+
unsigned int bufferFrames = 256; // 256 sample frames
+
double data[2];
+
+
try {
+
dac.openStream( &parameters, NULL, RTAUDIO_FLOAT64,
+
sampleRate, &bufferFrames, &saw, (void *)&data );
+
dac.startStream();
+
}
+
catch ( RtError& e ) {
+ +
exit( 0 );
+
}
+
+
char input;
+
std::cout << "\nPlaying ... press <enter> to quit.\n";
+
std::cin.get( input );
+
+
try {
+
// Stop the stream
+
dac.stopStream();
+
}
+
catch (RtError& e) {
+ +
}
+
+
if ( dac.isStreamOpen() ) dac.closeStream();
+
+
return 0;
+
}
+

We open the stream in exactly the same way as the previous example (except with a data format change) and specify the address of our callback function "saw()". The callback function will automatically be invoked when the underlying audio system needs data for output. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() functions). We can also pass a pointer value to the RtAudio::openStream() function that is made available in the callback function. In this way, it is possible to gain access to arbitrary data created in our main() function from within the globally defined callback function.

In this example, we stop the stream with an explicit call to RtAudio::stopStream(). It is also possible to stop a stream by returning a non-zero value from the callback function. A return value of 1 will cause the stream to finish draining its internal buffers and then halt (equivalent to calling the RtAudio::stopStream() function). A return value of 2 will cause the stream to stop immediately (equivalent to calling the RtAudio::abortStream() function).

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/probe.html b/doc/html/probe.html index c3ecc26..69fd84c 100644 --- a/doc/html/probe.html +++ b/doc/html/probe.html @@ -8,67 +8,68 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Probing Device Capabilities
+
- - -

Probing Device Capabilities

A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done.

-
// audioprobe.cpp
-
-#include <iostream>
-#include "RtAudio.h"
-
-int main()
-{
-  RtAudio audio;
-
-  // Determine the number of devices available
-  unsigned int devices = audio.getDeviceCount();
-
-  // Scan through devices for various capabilities
-  RtAudio::DeviceInfo info;
-  for ( unsigned int i=0; i<=devices; i++ ) {
-
-    info = audio.getDeviceInfo( i );
-
-    if ( info.probed == true ) {
-      // Print, for example, the maximum number of output channels for each device
-      std::cout << "device = " << i;
-      std::cout << ": maximum output channels = " << info.outputChannels << "\n";
-    }
-  }
-
-  return 0;
-}
-

The RtAudio::DeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device:

-
  typedef struct RtAudio::DeviceInfo {
-    bool probed;                           // true if the device capabilities were successfully probed.
-    std::string name;                      // Character string device identifier.
-    unsigned int outputChannels;           // Maximum output channels supported by device.
-    unsigned int inputChannels;            // Maximum input channels supported by device.
-    unsigned int duplexChannels;           // Maximum simultaneous input/output channels supported by device.
-    bool isDefaultOutput;                  // true if this is the default output device.
-    bool isDefaultInput;                   // true if this is the default input device.
-    std::vector<unsigned int> sampleRates; // Supported sample rates.
-    RtAudioFormat nativeFormats;           // Bit mask of supported data formats.
-  };
-

The following data formats are defined and fully supported by RtAudio:

-
  typedef unsigned long RtAudioFormat;
-  static const RtAudioFormat  RTAUDIO_SINT8;   // Signed 8-bit integer
-  static const RtAudioFormat  RTAUDIO_SINT16;  // Signed 16-bit integer
-  static const RtAudioFormat  RTAUDIO_SINT24;  // Signed 24-bit integer (lower 3 bytes of 32-bit signed integer.)
-  static const RtAudioFormat  RTAUDIO_SINT32;  // Signed 32-bit integer
-  static const RtAudioFormat  RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0
-  static const RtAudioFormat  RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0
-

The nativeFormats member of the RtAudio::DeviceInfo structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the probed member of the RtAudio::DeviceInfo structure is false, the remaining structure members are undefined and the device is probably unusable.

+

A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done.

+
// audioprobe.cpp
+
+
#include <iostream>
+
#include "RtAudio.h"
+
+
int main()
+
{
+
RtAudio audio;
+
+
// Determine the number of devices available
+
unsigned int devices = audio.getDeviceCount();
+
+
// Scan through devices for various capabilities
+ +
for ( unsigned int i=0; i<=devices; i++ ) {
+
+
info = audio.getDeviceInfo( i );
+
+
if ( info.probed == true ) {
+
// Print, for example, the maximum number of output channels for each device
+
std::cout << "device = " << i;
+
std::cout << ": maximum output channels = " << info.outputChannels << "\n";
+
}
+
}
+
+
return 0;
+
}
+

The RtAudio::DeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device:

+
typedef struct RtAudio::DeviceInfo {
+
bool probed; // true if the device capabilities were successfully probed.
+
std::string name; // Character string device identifier.
+
unsigned int outputChannels; // Maximum output channels supported by device.
+
unsigned int inputChannels; // Maximum input channels supported by device.
+
unsigned int duplexChannels; // Maximum simultaneous input/output channels supported by device.
+
bool isDefaultOutput; // true if this is the default output device.
+
bool isDefaultInput; // true if this is the default input device.
+
std::vector<unsigned int> sampleRates; // Supported sample rates.
+
RtAudioFormat nativeFormats; // Bit mask of supported data formats.
+
};
+

The following data formats are defined and fully supported by RtAudio:

+
typedef unsigned long RtAudioFormat;
+
static const RtAudioFormat RTAUDIO_SINT8; // Signed 8-bit integer
+
static const RtAudioFormat RTAUDIO_SINT16; // Signed 16-bit integer
+
static const RtAudioFormat RTAUDIO_SINT24; // Signed 24-bit integer (lower 3 bytes of 32-bit signed integer.)
+
static const RtAudioFormat RTAUDIO_SINT32; // Signed 32-bit integer
+
static const RtAudioFormat RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0
+
static const RtAudioFormat RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0
+

The nativeFormats member of the RtAudio::DeviceInfo structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the probed member of the RtAudio::DeviceInfo structure is false, the remaining structure members are undefined and the device is probably unusable.

Some audio devices may require a minimum channel value greater than one. RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is NOT possible when the number of channels set by the user is greater than that supported by the device.

It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not rely on the queried values when attempting to open a stream.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/recording.html b/doc/html/recording.html index 17b1a50..2acb1e6 100644 --- a/doc/html/recording.html +++ b/doc/html/recording.html @@ -8,75 +8,76 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Recording
+
- - -

Recording

Using RtAudio for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording:

-
#include "RtAudio.h"
-#include <iostream>
-#include <cstdlib>
-#include <cstring>
-
-int record( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
-         double streamTime, RtAudioStreamStatus status, void *userData )
-{
-  if ( status )
-    std::cout << "Stream overflow detected!" << std::endl;
-
-  // Do something with the data in the "inputBuffer" buffer.
-
-  return 0;
-}
-
-int main()
-{
-  RtAudio adc;
-  if ( adc.getDeviceCount() < 1 ) {
-    std::cout << "\nNo audio devices found!\n";
-    exit( 0 );
-  }
-
-  RtAudio::StreamParameters parameters;
-  parameters.deviceId = adc.getDefaultInputDevice();
-  parameters.nChannels = 2;
-  parameters.firstChannel = 0;
-  unsigned int sampleRate = 44100;
-  unsigned int bufferFrames = 256; // 256 sample frames
-
-  try {
-    adc.openStream( NULL, &parameters, RTAUDIO_SINT16,
-                    sampleRate, &bufferFrames, &record );
-    adc.startStream();
-  }
-  catch ( RtError& e ) {
-    e.printMessage();
-    exit( 0 );
-  }
-  
-  char input;
-  std::cout << "\nRecording ... press <enter> to quit.\n";
-  std::cin.get( input );
-
-  try {
-    // Stop the stream
-    adc.stopStream();
-  }
-  catch (RtError& e) {
-    e.printMessage();
-  }
-
-  if ( adc.isStreamOpen() ) adc.closeStream();
-
-  return 0;
-}
-

In this example, we pass the address of the stream parameter structure as the second argument of the RtAudio::openStream() function and pass a NULL value for the output stream parameters. In this example, the record() callback function performs no specific operations.

-
+

Using RtAudio for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording:

+
#include "RtAudio.h"
+
#include <iostream>
+
#include <cstdlib>
+
#include <cstring>
+
+
int record( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+
double streamTime, RtAudioStreamStatus status, void *userData )
+
{
+
if ( status )
+
std::cout << "Stream overflow detected!" << std::endl;
+
+
// Do something with the data in the "inputBuffer" buffer.
+
+
return 0;
+
}
+
+
int main()
+
{
+
RtAudio adc;
+
if ( adc.getDeviceCount() < 1 ) {
+
std::cout << "\nNo audio devices found!\n";
+
exit( 0 );
+
}
+
+ +
parameters.deviceId = adc.getDefaultInputDevice();
+
parameters.nChannels = 2;
+
parameters.firstChannel = 0;
+
unsigned int sampleRate = 44100;
+
unsigned int bufferFrames = 256; // 256 sample frames
+
+
try {
+
adc.openStream( NULL, &parameters, RTAUDIO_SINT16,
+
sampleRate, &bufferFrames, &record );
+
adc.startStream();
+
}
+
catch ( RtError& e ) {
+ +
exit( 0 );
+
}
+
+
char input;
+
std::cout << "\nRecording ... press <enter> to quit.\n";
+
std::cin.get( input );
+
+
try {
+
// Stop the stream
+
adc.stopStream();
+
}
+
catch (RtError& e) {
+ +
}
+
+
if ( adc.isStreamOpen() ) adc.closeStream();
+
+
return 0;
+
}
+

In this example, we pass the address of the stream parameter structure as the second argument of the RtAudio::openStream() function and pass a NULL value for the output stream parameters. In this example, the record() callback function performs no specific operations.

+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/settings.html b/doc/html/settings.html index 2a26328..2812cff 100644 --- a/doc/html/settings.html +++ b/doc/html/settings.html @@ -8,50 +8,51 @@
Home   Class/Enum List   File List   Compound Members  

- + + +
+
+
Device Settings
+
- - -

Device Settings

The next step in using RtAudio is to open a stream with particular device and parameter settings.

-
#include "RtAudio.h"
-
-int main()
-{
-  RtAudio dac;
-  if ( dac.getDeviceCount() == 0 ) exit( 0 );
-
-  RtAudio::StreamParameters parameters;
-  parameters.deviceId = dac.getDefaultOutputDevice();
-  parameters.nChannels = 2;
-  unsigned int sampleRate = 44100;
-  unsigned int bufferFrames = 256; // 256 sample frames
-
-  RtAudio::StreamOptions options;
-  options.flags = RTAUDIO_NONINTERLEAVED;
-
-  try {
-    dac.openStream( &parameters, NULL, RTAUDIO_FLOAT32,
-                    sampleRate, &bufferFrames, &myCallback, NULL, &options );
-  }
-  catch ( RtError& e ) {
-    std::cout << '\n' << e.getMessage() << '\n' << std::endl;
-    exit( 0 );
-  }
-  
-  return 0;
-}
-

The RtAudio::openStream() function attempts to open a stream with a specified set of parameter values. In the above example, we attempt to open a two channel playback stream using the default output device, 32-bit floating point data, a sample rate of 44100 Hz, and a frame rate of 256 sample frames per output buffer. If the user specifies an invalid parameter value (such as a device id greater than or equal to the number of enumerated devices), an RtError is thrown of type = INVALID_USE. If a system error occurs or the device does not support the specified parameter values, an RtError of type = SYSTEM_ERROR is thrown. In either case, a descriptive error message is bundled with the exception and can be queried with the RtError::getMessage() or RtError::what() functions.

+

The next step in using RtAudio is to open a stream with particular device and parameter settings.

+
#include "RtAudio.h"
+
+
int main()
+
{
+
RtAudio dac;
+
if ( dac.getDeviceCount() == 0 ) exit( 0 );
+
+ +
parameters.deviceId = dac.getDefaultOutputDevice();
+
parameters.nChannels = 2;
+
unsigned int sampleRate = 44100;
+
unsigned int bufferFrames = 256; // 256 sample frames
+
+ +
options.flags = RTAUDIO_NONINTERLEAVED;
+
+
try {
+
dac.openStream( &parameters, NULL, RTAUDIO_FLOAT32,
+
sampleRate, &bufferFrames, &myCallback, NULL, &options );
+
}
+
catch ( RtError& e ) {
+
std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+
exit( 0 );
+
}
+
+
return 0;
+
}
+

The RtAudio::openStream() function attempts to open a stream with a specified set of parameter values. In the above example, we attempt to open a two channel playback stream using the default output device, 32-bit floating point data, a sample rate of 44100 Hz, and a frame rate of 256 sample frames per output buffer. If the user specifies an invalid parameter value (such as a device id greater than or equal to the number of enumerated devices), an RtError is thrown of type = INVALID_USE. If a system error occurs or the device does not support the specified parameter values, an RtError of type = SYSTEM_ERROR is thrown. In either case, a descriptive error message is bundled with the exception and can be queried with the RtError::getMessage() or RtError::what() functions.

RtAudio provides four signed integer and two floating point data formats which can be specified using the RtAudioFormat parameter values mentioned earlier. If the opened device does not natively support the given format, RtAudio will automatically perform the necessary data format conversion.

The bufferFrames parameter specifies the desired number of sample frames that will be written to and/or read from a device per write/read operation. This parameter can be used to control stream latency though there is no guarantee that the passed value will be that used by a device. In general, a lower bufferFrames value will produce less latency but perhaps less robust performance. A value of zero can be specified, in which case the smallest allowable value will be used. The bufferFrames parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. bufferFrames values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Stream latency can also be controlled via the optional RtAudio::StreamOptions member numberOfBuffers (not used in the example above), though this tends to be more system dependent. In particular, the numberOfBuffers parameter is ignored when using the OS-X Core Audio, Jack, and the Windows ASIO APIs.

As noted earlier, the device capabilities reported by a driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. Because of this, RtAudio does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, RtAudio simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not.

The RtAudioCallback parameter above is a pointer to a user-defined function that will be called whenever the audio system is ready for new output data or has new input data to be read. Further details on the use of a callback function are provided in the next section.

Several stream options are available to fine-tune the behavior of an audio stream. In the example above, we specify that data will be written by the user in a non-interleaved format via the RtAudio::StreamOptions member flags. That is, all bufferFrames of the first channel should be written consecutively, followed by all bufferFrames of the second channel. By default (when no option is specified), RtAudio expects data to be written in an interleaved format.

-
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1DeviceInfo-members.html b/doc/html/structRtAudio_1_1DeviceInfo-members.html index 93e417f..936ad4f 100644 --- a/doc/html/structRtAudio_1_1DeviceInfo-members.html +++ b/doc/html/structRtAudio_1_1DeviceInfo-members.html @@ -8,24 +8,33 @@
Home   Class/Enum List   File List   Compound Members  

- + + + +
+
+
RtAudio::DeviceInfo Member List
+
-
+

This is the complete list of members for RtAudio::DeviceInfo, including all inherited members.

+ + + + + + + + + + +
duplexChannelsRtAudio::DeviceInfo
inputChannelsRtAudio::DeviceInfo
isDefaultInputRtAudio::DeviceInfo
isDefaultOutputRtAudio::DeviceInfo
nameRtAudio::DeviceInfo
nativeFormatsRtAudio::DeviceInfo
outputChannelsRtAudio::DeviceInfo
probedRtAudio::DeviceInfo
sampleRatesRtAudio::DeviceInfo
+
- +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1DeviceInfo.html b/doc/html/structRtAudio_1_1DeviceInfo.html index 598d81b..a95b6ec 100644 --- a/doc/html/structRtAudio_1_1DeviceInfo.html +++ b/doc/html/structRtAudio_1_1DeviceInfo.html @@ -8,154 +8,163 @@
Home   Class/Enum List   File List   Compound Members  

- - + + + +
+ +
+
RtAudio::DeviceInfo Struct Reference
+
-

RtAudio::DeviceInfo Struct Reference

+

The public device information structure for returning queried values. -More...

+ More...

#include <RtAudio.h>

- -

List of all members.

- - - - - - - - - - - +

Public Attributes

bool probed
std::string name
unsigned int outputChannels
unsigned int inputChannels
unsigned int duplexChannels
bool isDefaultOutput
bool isDefaultInput
std::vector< unsigned int > sampleRates
RtAudioFormat nativeFormats
+ + + + + + + + + + + + + + + + + + +

+Public Attributes

bool probed
 
std::string name
 
unsigned int outputChannels
 
unsigned int inputChannels
 
unsigned int duplexChannels
 
bool isDefaultOutput
 
bool isDefaultInput
 
std::vector< unsigned int > sampleRates
 
RtAudioFormat nativeFormats
 
-

Detailed Description

-

The public device information structure for returning queried values.

-

Member Data Documentation

- +

Detailed Description

+

The public device information structure for returning queried values.

+

Member Data Documentation

+
- +
bool RtAudio::DeviceInfo::probedbool RtAudio::DeviceInfo::probed
-
-
+

true if the device capabilities were successfully probed.

- +
- +
std::string RtAudio::DeviceInfo::namestd::string RtAudio::DeviceInfo::name
-
-
+

Character string device identifier.

- +
- +
unsigned int RtAudio::DeviceInfo::outputChannelsunsigned int RtAudio::DeviceInfo::outputChannels
-
-
+

Maximum output channels supported by device.

- +
- +
unsigned int RtAudio::DeviceInfo::inputChannelsunsigned int RtAudio::DeviceInfo::inputChannels
-
-
+

Maximum input channels supported by device.

- +
- +
unsigned int RtAudio::DeviceInfo::duplexChannelsunsigned int RtAudio::DeviceInfo::duplexChannels
-
-
+

Maximum simultaneous input/output channels supported by device.

- +
- +
bool RtAudio::DeviceInfo::isDefaultOutputbool RtAudio::DeviceInfo::isDefaultOutput
-
-
+

true if this is the default output device.

- +
- +
bool RtAudio::DeviceInfo::isDefaultInputbool RtAudio::DeviceInfo::isDefaultInput
-
-
+

true if this is the default input device.

- +
- +
std::vector<unsigned int> RtAudio::DeviceInfo::sampleRatesstd::vector<unsigned int> RtAudio::DeviceInfo::sampleRates
-
-
+

Supported sample rates (queried from list of standard rates).

- +
- +
RtAudioFormat RtAudio::DeviceInfo::nativeFormatsRtAudioFormat RtAudio::DeviceInfo::nativeFormats
-
-
+

Bit mask of supported data formats.

@@ -163,12 +172,10 @@
The documentation for this struct was generated from the following file: -
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1StreamOptions-members.html b/doc/html/structRtAudio_1_1StreamOptions-members.html index 99d2e80..60c4e03 100644 --- a/doc/html/structRtAudio_1_1StreamOptions-members.html +++ b/doc/html/structRtAudio_1_1StreamOptions-members.html @@ -8,19 +8,28 @@
Home   Class/Enum List   File List   Compound Members  

- + + + +
+
+
RtAudio::StreamOptions Member List
+
-

RtAudio::StreamOptions Member List

This is the complete list of members for RtAudio::StreamOptions, including all inherited members. - - - - -
flagsRtAudio::StreamOptions
numberOfBuffersRtAudio::StreamOptions
priorityRtAudio::StreamOptions
streamNameRtAudio::StreamOptions
-
+

This is the complete list of members for RtAudio::StreamOptions, including all inherited members.

+ + + + + +
flagsRtAudio::StreamOptions
numberOfBuffersRtAudio::StreamOptions
priorityRtAudio::StreamOptions
streamNameRtAudio::StreamOptions
+
- +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1StreamOptions.html b/doc/html/structRtAudio_1_1StreamOptions.html index ddc0dcb..43e772e 100644 --- a/doc/html/structRtAudio_1_1StreamOptions.html +++ b/doc/html/structRtAudio_1_1StreamOptions.html @@ -8,26 +8,39 @@
Home   Class/Enum List   File List   Compound Members  

- - + + + +
+ +
+
RtAudio::StreamOptions Struct Reference
+
-

RtAudio::StreamOptions Struct Reference

+

The structure for specifying stream options. -More...

+ More...

#include <RtAudio.h>

- -

List of all members.

- - - - - - +

Public Attributes

RtAudioStreamFlags flags
unsigned int numberOfBuffers
std::string streamName
int priority
+ + + + + + + + +

+Public Attributes

RtAudioStreamFlags flags
 
unsigned int numberOfBuffers
 
std::string streamName
 
int priority
 
-

Detailed Description

-

The structure for specifying stream options.

+

Detailed Description

+

The structure for specifying stream options.

The following flags can be OR'ed together to allow a client to make changes to the default stream behavior:

  • RTAUDIO_NONINTERLEAVED: Use non-interleaved buffers (default = interleaved).
  • @@ -36,66 +49,62 @@
  • RTAUDIO_SCHEDULE_REALTIME: Attempt to select realtime scheduling for callback thread.
  • RTAUDIO_ALSA_USE_DEFAULT: Use the "default" PCM device (ALSA only).
-

By default, RtAudio streams pass and receive audio data from the client in an interleaved format. By passing the RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio data will instead be presented in non-interleaved buffers. In this case, each buffer argument in the RtAudioCallback function will point to a single array of data, with nFrames samples for each channel concatenated back-to-back. For example, the first sample of data for the second channel would be located at index nFrames (assuming the buffer pointer was recast to the correct data type for the stream).

-

Certain audio APIs offer a number of parameters that influence the I/O latency of a stream. By default, RtAudio will attempt to set these parameters internally for robust (glitch-free) performance (though some APIs, like Windows Direct Sound, make this difficult). By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream() function, internal stream settings will be influenced in an attempt to minimize stream latency, though possibly at the expense of stream performance.

+

By default, RtAudio streams pass and receive audio data from the client in an interleaved format. By passing the RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio data will instead be presented in non-interleaved buffers. In this case, each buffer argument in the RtAudioCallback function will point to a single array of data, with nFrames samples for each channel concatenated back-to-back. For example, the first sample of data for the second channel would be located at index nFrames (assuming the buffer pointer was recast to the correct data type for the stream).

+

Certain audio APIs offer a number of parameters that influence the I/O latency of a stream. By default, RtAudio will attempt to set these parameters internally for robust (glitch-free) performance (though some APIs, like Windows Direct Sound, make this difficult). By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream() function, internal stream settings will be influenced in an attempt to minimize stream latency, though possibly at the expense of stream performance.

If the RTAUDIO_HOG_DEVICE flag is set, RtAudio will attempt to open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs.

If the RTAUDIO_SCHEDULE_REALTIME flag is set, RtAudio will attempt to select realtime scheduling (round-robin) for the callback thread. The priority parameter will only be used if the RTAUDIO_SCHEDULE_REALTIME flag is set. It defines the thread's realtime priority.

If the RTAUDIO_ALSA_USE_DEFAULT flag is set, RtAudio will attempt to open the "default" PCM device when using the ALSA API. Note that this will override any specified input or output device id.

-

The numberOfBuffers parameter can be used to control stream latency in the Windows DirectSound, Linux OSS, and Linux Alsa APIs only. A value of two is usually the smallest allowed. Larger numbers can potentially result in more robust stream performance, though likely at the cost of stream latency. The value set by the user is replaced during execution of the RtAudio::openStream() function by the value actually used by the system.

+

The numberOfBuffers parameter can be used to control stream latency in the Windows DirectSound, Linux OSS, and Linux Alsa APIs only. A value of two is usually the smallest allowed. Larger numbers can potentially result in more robust stream performance, though likely at the cost of stream latency. The value set by the user is replaced during execution of the RtAudio::openStream() function by the value actually used by the system.

The streamName parameter can be used to set the client name when using the Jack API. By default, the client name is set to RtApiJack. However, if you wish to create multiple instances of RtAudio with Jack, each instance must have a unique client name.

-

Member Data Documentation

- +

Member Data Documentation

+
-
+

A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT).

- +
- +
unsigned int RtAudio::StreamOptions::numberOfBuffersunsigned int RtAudio::StreamOptions::numberOfBuffers
-
-
+

Number of stream buffers.

- +
- +
std::string RtAudio::StreamOptions::streamNamestd::string RtAudio::StreamOptions::streamName
-
-
+

A stream name (currently used only in Jack).

- +
- +
int RtAudio::StreamOptions::priorityint RtAudio::StreamOptions::priority
-
-
+

Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME).

@@ -103,12 +112,10 @@
The documentation for this struct was generated from the following file: -
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1StreamParameters-members.html b/doc/html/structRtAudio_1_1StreamParameters-members.html index 812d41a..ce64f8e 100644 --- a/doc/html/structRtAudio_1_1StreamParameters-members.html +++ b/doc/html/structRtAudio_1_1StreamParameters-members.html @@ -8,18 +8,27 @@
Home   Class/Enum List   File List   Compound Members  

- + + + +
+
+
RtAudio::StreamParameters Member List
+
-

RtAudio::StreamParameters Member List

This is the complete list of members for RtAudio::StreamParameters, including all inherited members. - - - -
deviceIdRtAudio::StreamParameters
firstChannelRtAudio::StreamParameters
nChannelsRtAudio::StreamParameters
-
+

This is the complete list of members for RtAudio::StreamParameters, including all inherited members.

+ + + + +
deviceIdRtAudio::StreamParameters
firstChannelRtAudio::StreamParameters
nChannelsRtAudio::StreamParameters
+
- +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/structRtAudio_1_1StreamParameters.html b/doc/html/structRtAudio_1_1StreamParameters.html index 42c0d11..83a6f8b 100644 --- a/doc/html/structRtAudio_1_1StreamParameters.html +++ b/doc/html/structRtAudio_1_1StreamParameters.html @@ -8,64 +8,73 @@
Home   Class/Enum List   File List   Compound Members  

- - + + + +
+ +
+
RtAudio::StreamParameters Struct Reference
+
-

RtAudio::StreamParameters Struct Reference

+

The structure for specifying input or ouput stream parameters. -More...

+ More...

#include <RtAudio.h>

- -

List of all members.

- - - - - +

Public Attributes

unsigned int deviceId
unsigned int nChannels
unsigned int firstChannel
+ + + + + + +

+Public Attributes

unsigned int deviceId
 
unsigned int nChannels
 
unsigned int firstChannel
 
-

Detailed Description

-

The structure for specifying input or ouput stream parameters.

-

Member Data Documentation

- +

Detailed Description

+

The structure for specifying input or ouput stream parameters.

+

Member Data Documentation

+
- +
unsigned int RtAudio::StreamParameters::deviceIdunsigned int RtAudio::StreamParameters::deviceId
-
-
+

Device index (0 to getDeviceCount() - 1).

- +
- +
unsigned int RtAudio::StreamParameters::nChannelsunsigned int RtAudio::StreamParameters::nChannels
-
-
+

Number of channels.

- +
- +
unsigned int RtAudio::StreamParameters::firstChannelunsigned int RtAudio::StreamParameters::firstChannel
-
-
+

First channel index on device (default = 0).

@@ -73,12 +82,10 @@
The documentation for this struct was generated from the following file: -
+

- - +
©2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone.
- diff --git a/doc/html/tabs.css b/doc/html/tabs.css index a444163..9cf578f 100644 --- a/doc/html/tabs.css +++ b/doc/html/tabs.css @@ -1,105 +1,60 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : 80%; - font-weight : bold; - text-decoration : none; +.tabs2 { + font-size: 10px; } - -DIV.tabs A:hover -{ - background-position: 100% -150px; +.tabs3 { + font-size: 9px; } -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; +.tablist { + margin: 0; + padding: 0; + display: table; } -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; } -DIV.tabs #MSearchBox -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : 80%; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; } -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; +.tabs3 .tablist a { + padding: 0 10px; } -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; } -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; - text-align : center; - margin : 2px; - padding : 2px; +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } -- 2.30.2