From 830706e4368bb27d4c7d8138fbce4e393cedcd2f Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Fri, 11 Oct 2013 00:00:56 +0200 Subject: [PATCH] Release 3.0 tarball --- configure | 2928 ++++++++++++----- doc/html/RtAudio_8h-source.html | 823 +++-- doc/html/RtError_8h-source.html | 64 + doc/html/annotated.html | 18 +- doc/html/classRtAudio-members.html | 57 +- doc/html/classRtAudio.html | 788 ++--- doc/html/classRtError-members.html | 37 +- doc/html/classRtError.html | 138 +- doc/html/doxygen.css | 179 +- doc/html/doxygen.gif | Bin 2378 -> 0 bytes doc/html/doxygen.png | Bin 0 -> 2352 bytes doc/html/files.html | 14 +- doc/html/functions.html | 114 +- doc/html/functions_enum.html | 26 + doc/html/functions_eval.html | 42 + doc/html/functions_func.html | 43 + doc/html/functions_vars.html | 32 + doc/html/index.html | 883 +++-- doc/html/structRtAudioDeviceInfo-members.html | 28 + doc/html/structRtAudioDeviceInfo.html | 226 ++ ...uctRtAudio_1_1RTAUDIO__DEVICE-members.html | 34 - .../structRtAudio_1_1RTAUDIO__DEVICE.html | 384 --- 22 files changed, 4217 insertions(+), 2641 deletions(-) create mode 100644 doc/html/RtError_8h-source.html delete mode 100644 doc/html/doxygen.gif create mode 100644 doc/html/doxygen.png create mode 100644 doc/html/functions_enum.html create mode 100644 doc/html/functions_eval.html create mode 100644 doc/html/functions_func.html create mode 100644 doc/html/functions_vars.html create mode 100644 doc/html/structRtAudioDeviceInfo-members.html create mode 100644 doc/html/structRtAudioDeviceInfo.html delete mode 100644 doc/html/structRtAudio_1_1RTAUDIO__DEVICE-members.html delete mode 100644 doc/html/structRtAudio_1_1RTAUDIO__DEVICE.html diff --git a/configure b/configure index f6cdcf4..e4e158d 100755 --- a/configure +++ b/configure @@ -1,14 +1,83 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52 for RtAudio 2.1. +# Generated by GNU Autoconf 2.57 for RtAudio 3.0. # # Report bugs to . # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # 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. ## +## --------------------- ## +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; 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 || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -16,22 +85,113 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { 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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -57,24 +217,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -83,7 +239,8 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -96,9 +253,11 @@ exec 6>&1 # Initializations. # ac_default_prefix=/usr/local +ac_config_libobj_dir=. cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -106,7 +265,53 @@ SHELL=${CONFIG_SHELL-/bin/sh} # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME='RtAudio' +PACKAGE_TARNAME='rtaudio' +PACKAGE_VERSION='3.0' +PACKAGE_STRING='RtAudio 3.0' +PACKAGE_BUGREPORT='gary@ccrma.stanford.edu' + ac_unique_file="RtAudio.cpp" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS GXX CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP debug cflags object_path warn build build_cpu build_vendor build_os host host_cpu host_vendor host_os sound_api audio_apis frameworks LIBOBJS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. ac_init_help= @@ -146,13 +351,6 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME='RtAudio' -PACKAGE_TARNAME='rtaudio' -PACKAGE_VERSION='2.1' -PACKAGE_STRING='RtAudio 2.1' -PACKAGE_BUGREPORT='gary@ccrma.stanford.edu' - ac_prev= for ac_option do @@ -285,7 +483,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -464,7 +662,7 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done @@ -476,18 +674,19 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -503,13 +702,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -519,13 +728,16 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias @@ -574,8 +786,8 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat <. -EOF +_ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` - for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue - cd $ac_subdir - # A "../" for each directory in /$ac_subdir. - ac_dots=`echo $ac_subdir | - sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` - - case $srcdir in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_subdir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; - esac + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure.gnu; then + if test -f $ac_srcdir/configure.gnu; then echo - $SHELL $ac_sub_srcdir/configure.gnu --help=recursive - elif test -f $ac_sub_srcdir/configure; then + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then echo - $SHELL $ac_sub_srcdir/configure --help=recursive - elif test -f $ac_sub_srcdir/configure.ac || - test -f $ac_sub_srcdir/configure.in; then + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else - echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -706,33 +940,33 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF -RtAudio configure 2.1 -generated by GNU Autoconf 2.52 + cat <<\_ACEOF +RtAudio configure 3.0 +generated by GNU Autoconf 2.57 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <&5 <<_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 2.1, which was -generated by GNU Autoconf 2.52. Invocation command line was +It was created by RtAudio $as_me 3.0, which was +generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -751,51 +985,96 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= +ac_configure_args0= +ac_configure_args1= ac_sep= -for ac_arg +ac_must_keep_next=false +for ac_pass in 1 2 do - case $ac_arg in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; - esac - # Get rid of the leading space. + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + 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; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in @@ -809,21 +1088,53 @@ trap 'exit_status=$? "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -836,6 +1147,33 @@ rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >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 + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -847,9 +1185,9 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:850: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -858,7 +1196,7 @@ 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 - { echo "$as_me:861: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -866,7 +1204,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:869: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -882,42 +1220,42 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:885: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:889: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:895: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:897: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:899: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:918: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:920: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -928,28 +1266,39 @@ 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 -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:940: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:943: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh -ac_config_files="$ac_config_files tests/Makefile" + + + + + + + + + + + + + + + + + + + + + + + + + + + ac_config_files="$ac_config_files tests/Makefile" + + +# Fill GXX with something before test. +GXX="no" + # Checks for programs. ac_ext=c @@ -960,7 +1309,7 @@ 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 -echo "$as_me:963: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -968,25 +1317,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:978: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:986: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:989: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -995,7 +1347,7 @@ 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 -echo "$as_me:998: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1003,25 +1355,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1013: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1021: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1024: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1034,7 +1389,7 @@ 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 -echo "$as_me:1037: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1042,25 +1397,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1052: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1060: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1063: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1069,7 +1427,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1072: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1077,25 +1435,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1087: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1095: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1098: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1108,7 +1469,7 @@ 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 -echo "$as_me:1111: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1117,19 +1478,22 @@ else ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1131: found $ac_dir/$ac_word" >&5 -break +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_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" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -1141,19 +1505,17 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1153: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1156: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1164,7 +1526,7 @@ 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 -echo "$as_me:1167: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1172,25 +1534,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1182: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1190: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1193: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1203,7 +1568,7 @@ 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 -echo "$as_me:1206: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1211,25 +1576,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1221: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1229: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1232: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1241,33 +1609,40 @@ fi fi -test -z "$CC" && { { echo "$as_me:1244: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1249:" \ +echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1252: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1255: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1257: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1260: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1262: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1265: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1269 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1278,100 +1653,120 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out 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. -echo "$as_me:1285: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1288: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1291: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; - * ) break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1314: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1320: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1325: checking whether the C compiler works" >&5 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&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' - { (eval echo "$as_me:1331: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1334: \$? = $ac_status" >&5 + 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 - { { echo "$as_me:1341: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 + { { 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 echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi -echo "$as_me:1349: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1356: checking whether we are cross compiling" >&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1358: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1361: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1363: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1366: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 # `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; @@ -1379,26 +1774,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1382: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1388: result: $ac_cv_exeext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1394: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1400 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1409,40 +1810,47 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1412: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1415: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1427: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1434: result: $ac_cv_objext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1438: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1444 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1456,41 +1864,46 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1459: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1462: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1465: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1468: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1480: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1486: checking whether $CC accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1492 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1501,26 +1914,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1504: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1507: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1510: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1513: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1523: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1537,6 +1951,102 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* 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); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide @@ -1547,16 +2057,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1550: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1553: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1556: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1559: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1568,8 +2078,12 @@ if { (eval echo "$as_me:1550: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1571 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include $ac_declaration int @@ -1581,27 +2095,32 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1584: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1587: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1590: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1593: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1603 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration int main () @@ -1612,21 +2131,22 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1615: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1618: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1621: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1624: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest.$ac_ext done @@ -1639,7 +2159,8 @@ fi else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c @@ -1654,11 +2175,11 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC CC g++ c++ cxx + for ac_prog in $CCC g++ CC c++ cxx 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 -echo "$as_me:1661: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1666,25 +2187,28 @@ else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -echo "$as_me:1676: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:1684: result: $CXX" >&5 + echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:1687: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1693,11 +2217,11 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC CC g++ c++ cxx + for ac_prog in $CCC g++ CC c++ cxx do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1700: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1705,25 +2229,28 @@ else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CXX="$ac_prog" -echo "$as_me:1715: found $ac_dir/$ac_word" >&5 -break +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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:1723: result: $ac_ct_CXX" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:1726: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1734,34 +2261,39 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi + # Provide some information about the compiler. -echo "$as_me:1738:" \ +echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1741: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1744: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1746: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1749: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1751: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1754: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:1757: checking whether we are using the GNU C++ compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1763 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1775,41 +2307,46 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1781: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1784: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1787: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1799: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" -echo "$as_me:1805: checking whether $CXX accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1811 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1820,26 +2357,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1823: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1826: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1829: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1832: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1842: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -1866,8 +2404,12 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1869 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include $ac_declaration int @@ -1879,27 +2421,32 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1882: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1885: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1888: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1891: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1901 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration int main () @@ -1910,21 +2457,22 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1913: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1916: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1919: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1922: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest.$ac_ext done @@ -1941,9 +2489,11 @@ 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 + # Checks for libraries. -echo "$as_me:1946: checking for pthread_create in -lpthread" >&5 + +echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1951,8 +2501,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 1954 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -1970,48 +2524,50 @@ pthread_create (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1973: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1976: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1979: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1982: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_create=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_pthread_pthread_create=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:1993: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 if test $ac_cv_lib_pthread_pthread_create = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 -EOF +_ACEOF LIBS="-lpthread $LIBS" else - { { echo "$as_me:2003: error: RtAudio requires the pthread library!" >&5 + { { echo "$as_me:$LINENO: error: RtAudio requires the pthread library!" >&5 echo "$as_me: error: RtAudio requires the pthread library!" >&2;} { (exit 1); exit 1; }; } fi + # Checks for header files. ac_ext=c 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 -echo "$as_me:2014: checking how to run the C preprocessor" >&5 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -2029,21 +2585,31 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 -#line 2035 "configure" -#include "confdefs.h" -#include +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if { (eval echo "$as_me:2040: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2046: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2057,7 +2623,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -2066,17 +2633,21 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2069 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:2073: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2079: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2091,7 +2662,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2113,28 +2685,38 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2116: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 -#line 2126 "configure" -#include "confdefs.h" -#include +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if { (eval echo "$as_me:2131: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2137: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2148,7 +2730,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -2157,17 +2740,21 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2160 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:2164: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2170: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2182,7 +2769,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2195,8 +2783,10 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:2198: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -2206,55 +2796,82 @@ 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 -echo "$as_me:2209: checking for ANSI C header files" >&5 + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2215 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include #include +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:2223: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:2229: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_stdc=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f 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 -#line 2251 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 @@ -2266,13 +2883,17 @@ 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 -#line 2269 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 @@ -2287,14 +2908,19 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 2290 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) @@ -2313,57 +2939,171 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:2316: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2319: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2321: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2324: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -echo "$as_me:2337: result: $ac_cv_header_stdc" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi -for ac_header in sys/ioctl.h unistd.h +# 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:2350: checking for $ac_header" >&5 +echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2356 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in sys/ioctl.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:2360: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2366: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2374,124 +3114,84 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:2385: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line 2404 "configure" -#include "confdefs.h" -#include -#include -#include -#include -/* 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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:2453: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2456: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2459: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2462: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC fi -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:2479: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:2482: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac +done + -echo "$as_me:2487: checking for an ANSI C-conforming const" >&5 +# Checks for typedefs, structures, and compiler characteristics. +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2493 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -2548,37 +3248,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2551: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2554: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2557: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2560: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2570: result: $ac_cv_c_const" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define const -EOF +_ACEOF fi + # Check for debug -echo "$as_me:2581: checking whether to compile debug version" >&5 +echo "$as_me:$LINENO: checking whether to compile debug version" >&5 echo $ECHO_N "checking whether to compile debug version... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -2586,13 +3288,13 @@ if test "${enable_debug+set}" = set; then debug=-D__RTAUDIO_DEBUG__ cflags=-g object_path=Debug - echo "$as_me:2589: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else debug= cflags=-O2 object_path=Release - echo "$as_me:2595: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; @@ -2620,7 +3322,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:2623: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -2630,11 +3332,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:2633: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:2637: checking build system type" >&5 +echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2643,23 +3345,24 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:2646: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:2650: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:2655: result: $ac_cv_build" >&5 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:2662: checking host system type" >&5 + +echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2668,38 +3371,187 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:2671: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:2676: result: $ac_cv_host" >&5 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:2683: checking for audio API" >&5 + +echo "$as_me:$LINENO: checking for audio API" >&5 echo $ECHO_N "checking for audio API... $ECHO_C" >&6 case $host in *-*-linux*) + sound_api=_NO_API_ + + +# Check whether --with-jack or --without-jack was given. +if test "${with_jack+set}" = set; then + withval="$with_jack" + sound_api=-D__LINUX_JACK__ + echo "$as_me:$LINENO: result: using JACK" >&5 +echo "${ECHO_T}using JACK" >&6 +fi; + if test $sound_api = -D__LINUX_JACK__; then + TEMP_LIBS=$LIBS + +echo "$as_me:$LINENO: checking for jack_client_new in -ljack" >&5 +echo $ECHO_N "checking for jack_client_new in -ljack... $ECHO_C" >&6 +if test "${ac_cv_lib_jack_jack_client_new+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char jack_client_new (); +int +main () +{ +jack_client_new (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_jack_jack_client_new=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_jack_jack_client_new=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_client_new" >&5 +echo "${ECHO_T}$ac_cv_lib_jack_jack_client_new" >&6 +if test $ac_cv_lib_jack_jack_client_new = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBJACK 1 +_ACEOF + + LIBS="-ljack $LIBS" + +else + { { echo "$as_me:$LINENO: error: JACK support requires the jack library!" >&5 +echo "$as_me: error: JACK support requires the jack library!" >&2;} + { (exit 1); exit 1; }; } +fi + + +echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 +echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6 +if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char snd_pcm_open (); +int +main () +{ +snd_pcm_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_asound_snd_pcm_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_asound_snd_pcm_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6 +if test $ac_cv_lib_asound_snd_pcm_open = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBASOUND 1 +_ACEOF + + LIBS="-lasound $LIBS" + +else + { { echo "$as_me:$LINENO: error: Jack support also requires the asound library!" >&5 +echo "$as_me: error: Jack support also requires the asound library!" >&2;} + { (exit 1); exit 1; }; } +fi + + LIBS="`pkg-config --cflags --libs jack` $TEMP_LIBS -lasound" + audio_apis="-D__LINUX_JACK__" + fi + + # Look for Alsa flag # Check whether --with-alsa or --without-alsa was given. if test "${with_alsa+set}" = set; then withval="$with_alsa" sound_api=-D__LINUX_ALSA__ - echo "$as_me:2692: result: using ALSA" >&5 + echo "$as_me:$LINENO: result: using ALSA" >&5 echo "${ECHO_T}using ALSA" >&6 -else - sound_api=-D__LINUX_OSS__ - echo "$as_me:2696: result: using OSS" >&5 -echo "${ECHO_T}using OSS" >&6 fi; - if test $sound_api = -D__LINUX_ALSA__; then -echo "$as_me:2702: checking for snd_pcm_open in -lasound" >&5 +echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6 if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2707,8 +3559,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lasound $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2710 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -2726,51 +3582,76 @@ snd_pcm_open (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2729: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2732: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2735: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2738: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_asound_snd_pcm_open=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_asound_snd_pcm_open=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:2749: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6 if test $ac_cv_lib_asound_snd_pcm_open = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define HAVE_LIBASOUND 1 -EOF +_ACEOF LIBS="-lasound $LIBS" else - { { echo "$as_me:2759: error: ALSA support requires the asound library!" >&5 + { { echo "$as_me:$LINENO: error: ALSA support requires the asound library!" >&5 echo "$as_me: error: ALSA support requires the asound library!" >&2;} { (exit 1); exit 1; }; } fi + audio_apis="-D__LINUX_ALSA__ $audio_apis" + fi + + # Look for OSS flag + +# Check whether --with-oss or --without-oss was given. +if test "${with_oss+set}" = set; then + withval="$with_oss" + sound_api=-D__LINUX_OSS__ + echo "$as_me:$LINENO: result: using OSS" >&5 +echo "${ECHO_T}using OSS" >&6 +fi; + if test $sound_api = -D__LINUX_OSS__; then + audio_apis="-D__LINUX_OSS__ $audio_apis" + fi + + # If no audio api flags specified, use OSS + if test $sound_api = _NO_API_; then + sound_api=-D__LINUX_OSS__ + + echo "$as_me:$LINENO: result: using OSS" >&5 +echo "${ECHO_T}using OSS" >&6 + audio_apis=-D__LINUX_OSS__ + fi ;; *-sgi*) - sound_api=-D__IRIX_AL__ + audio_apis="-D__IRIX_AL__ -LANG:std -w" - echo "$as_me:2770: result: using IRIX AL" >&5 + echo "$as_me:$LINENO: result: using IRIX AL" >&5 echo "${ECHO_T}using IRIX AL" >&6 -echo "$as_me:2773: checking for alOpenPort in -laudio" >&5 +echo "$as_me:$LINENO: checking for alOpenPort in -laudio" >&5 echo $ECHO_N "checking for alOpenPort in -laudio... $ECHO_C" >&6 if test "${ac_cv_lib_audio_alOpenPort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2778,8 +3659,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-laudio $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2781 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -2797,37 +3682,38 @@ alOpenPort (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2800: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2803: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2806: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2809: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_audio_alOpenPort=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_audio_alOpenPort=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:2820: result: $ac_cv_lib_audio_alOpenPort" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_audio_alOpenPort" >&5 echo "${ECHO_T}$ac_cv_lib_audio_alOpenPort" >&6 if test $ac_cv_lib_audio_alOpenPort = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define HAVE_LIBAUDIO 1 -EOF +_ACEOF LIBS="-laudio $LIBS" else - { { echo "$as_me:2830: error: IRIX audio support requires the audio library!" >&5 + { { echo "$as_me:$LINENO: error: IRIX audio support requires the audio library!" >&5 echo "$as_me: error: IRIX audio support requires the audio library!" >&2;} { (exit 1); exit 1; }; } fi @@ -2836,23 +3722,70 @@ fi *-apple*) # Check for CoreAudio framework - echo "$as_me:2839: checking for CoreAudio/CoreAudio.h" >&5 + if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then + echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6 if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 +echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 2845 "configure" -#include "confdefs.h" + # Is the header compilable? +echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5 +echo $ECHO_N "checking CoreAudio/CoreAudio.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default #include _ACEOF -if { (eval echo "$as_me:2849: \"$ac_cpp conftest.$ac_ext\"") >&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5 +echo $ECHO_N "checking CoreAudio/CoreAudio.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2855: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2863,28 +3796,75 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_CoreAudio_CoreAudio_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_CoreAudio_CoreAudio_h=no +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 +echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6 +if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc fi -echo "$as_me:2874: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6 + +fi if test $ac_cv_header_CoreAudio_CoreAudio_h = yes; then - sound_api=-D__MACOSX_CORE__ + audio_apis=-D__MACOSX_CORE__ else - { { echo "$as_me:2880: error: CoreAudio header files not found!" >&5 + { { echo "$as_me:$LINENO: error: CoreAudio header files not found!" >&5 echo "$as_me: error: CoreAudio header files not found!" >&2;} { (exit 1); exit 1; }; } fi + frameworks="-framework CoreAudio" -echo "$as_me:2887: checking for printf in -lstdc++" >&5 + +echo "$as_me:$LINENO: checking for printf in -lstdc++" >&5 echo $ECHO_N "checking for printf in -lstdc++... $ECHO_C" >&6 if test "${ac_cv_lib_stdcpp_printf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2892,8 +3872,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lstdc++ $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 2895 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -2911,37 +3895,38 @@ printf (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2914: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2917: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2920: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2923: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_stdcpp_printf=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_stdcpp_printf=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:2934: result: $ac_cv_lib_stdcpp_printf" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_printf" >&5 echo "${ECHO_T}$ac_cv_lib_stdcpp_printf" >&6 if test $ac_cv_lib_stdcpp_printf = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define HAVE_LIBSTDC__ 1 -EOF +_ACEOF LIBS="-lstdc++ $LIBS" else - { { echo "$as_me:2944: error: RtAudio requires the C++ library!" >&5 + { { echo "$as_me:$LINENO: error: RtAudio requires the C++ library!" >&5 echo "$as_me: error: RtAudio requires the C++ library!" >&2;} { (exit 1); exit 1; }; } fi @@ -2950,7 +3935,7 @@ fi *) # Default case for unknown realtime systems. - { { echo "$as_me:2953: error: Unknown system type for realtime support!" >&5 + { { echo "$as_me:$LINENO: error: Unknown system type for realtime support!" >&5 echo "$as_me: error: Unknown system type for realtime support!" >&2;} { (exit 1); exit 1; }; } ;; @@ -2958,48 +3943,58 @@ esac # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:2961: checking whether $CC needs -traditional" >&5 + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF -#line 2968 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* + if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line 2983 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi -echo "$as_me:2996: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -3010,7 +4005,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -3045,7 +4040,7 @@ _ACEOF t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache -if cmp -s $cache_file confcache; then :; else +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file @@ -3081,7 +4076,7 @@ fi # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\EOF +cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g @@ -3095,7 +4090,7 @@ s,\[,\\&,g s,\],\\&,g s,\$,$$,g p -EOF +_ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within @@ -3106,35 +4101,228 @@ ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:3112: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; 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=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -3160,24 +4348,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -3186,10 +4370,34 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH exec 6>&1 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by RtAudio $as_me 3.0, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -3209,7 +4417,7 @@ if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -3219,6 +4427,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] @@ -3228,12 +4437,12 @@ Configuration files: $config_files Report bugs to ." -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -RtAudio config.status 2.1 -configured by $0, generated by GNU Autoconf 2.52, +RtAudio config.status 3.0 +configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -3241,9 +4450,9 @@ Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -3253,30 +4462,30 @@ do --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift ;; - -*);; *) # This is not an option, so the user has probably given explicit # arguments. + ac_option=$1 ac_need_defaults=false;; esac - case $1 in + case $ac_option in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" - exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF + ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:3279: error: ambiguous option: $1 + { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -3286,16 +4495,19 @@ Try \`$0 --help' for more information." >&2;} --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:3298: error: unrecognized option: $1 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -3307,31 +4519,33 @@ Try \`$0 --help' for more information." >&2;} shift done -exec 5>>config.log -cat >&5 << _ACEOF +ac_configure_extra_args= -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi -This file was extended by $as_me (RtAudio 2.1) 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi _ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF + + + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) { { echo "$as_me:3334: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -3345,6 +4559,9 @@ if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { @@ -3353,23 +4570,23 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} + { - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=$TMPDIR/cs$$-$RANDOM + tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -3382,6 +4599,12 @@ if test -n "\$CONFIG_FILES"; then sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t @@ -3397,20 +4620,15 @@ s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t +s,@GXX@,$GXX,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -3422,6 +4640,7 @@ s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t s,@debug@,$debug,;t t s,@cflags@,$cflags,;t t s,@object_path@,$object_path,;t t @@ -3435,12 +4654,15 @@ s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@sound_api@,$sound_api,;t t +s,@audio_apis@,$audio_apis,;t t s,@frameworks@,$frameworks,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 @@ -3479,8 +4701,8 @@ EOF fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in @@ -3494,7 +4716,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -3505,55 +4728,80 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } - - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" else - ac_dir_suffix= ac_dots= - fi + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + if test x"$ac_file" != x-; then - { echo "$as_me:3548: creating $ac_file" >&5 + { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -3563,7 +4811,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:3566: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -3576,23 +4824,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:3579: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then @@ -3603,15 +4857,16 @@ s,@top_srcdir@,$ac_top_srcdir,;t t fi done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -3622,8 +4877,11 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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. diff --git a/doc/html/RtAudio_8h-source.html b/doc/html/RtAudio_8h-source.html index ffe382d..7c78353 100644 --- a/doc/html/RtAudio_8h-source.html +++ b/doc/html/RtAudio_8h-source.html @@ -7,328 +7,533 @@
Tutorial   Class/Enum List   File List   Compound Members  

- -

RtAudio.h

00001 /************************************************************************/
-00038 /************************************************************************/
+
+

RtAudio.h

00001 /************************************************************************/
+00038 /************************************************************************/
 00039 
-00040 #if !defined(__RTAUDIO_H)
-00041 #define __RTAUDIO_H
-00042 
-00043 #include <map>
-00044 
-00045 #if defined(__LINUX_ALSA__)
-00046   #include <alsa/asoundlib.h>
-00047   #include <pthread.h>
-00048   #include <unistd.h>
-00049 
-00050   typedef snd_pcm_t *AUDIO_HANDLE;
-00051   typedef int DEVICE_ID;
-00052   typedef pthread_t THREAD_HANDLE;
-00053   typedef pthread_mutex_t MUTEX;
-00054 
-00055 #elif defined(__LINUX_OSS__)
-00056   #include <pthread.h>
-00057   #include <unistd.h>
-00058 
-00059   typedef int AUDIO_HANDLE;
-00060   typedef int DEVICE_ID;
-00061   typedef pthread_t THREAD_HANDLE;
-00062   typedef pthread_mutex_t MUTEX;
-00063 
-00064 #elif defined(__WINDOWS_DS__)
-00065   #include <windows.h>
-00066   #include <process.h>
-00067 
-00068   // The following struct is used to hold the extra variables
-00069   // specific to the DirectSound implementation.
-00070   typedef struct {
-00071     void * object;
-00072     void * buffer;
-00073     UINT bufferPointer;
-00074   } AUDIO_HANDLE;
+00040 // RtAudio: Version 3.0, 11 March 2004
+00041 
+00042 #ifndef __RTAUDIO_H
+00043 #define __RTAUDIO_H
+00044 
+00045 #include "RtError.h"
+00046 #include <string>
+00047 #include <vector>
+00048 
+00049 // Operating system dependent thread functionality.
+00050 #if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)
+00051   #include <windows.h>
+00052   #include <process.h>
+00053 
+00054   typedef unsigned long ThreadHandle;
+00055   typedef CRITICAL_SECTION StreamMutex;
+00056 
+00057 #else // Various unix flavors with pthread support.
+00058   #include <pthread.h>
+00059 
+00060   typedef pthread_t ThreadHandle;
+00061   typedef pthread_mutex_t StreamMutex;
+00062 
+00063 #endif
+00064 
+00065 // This global structure type is used to pass callback information
+00066 // between the private RtAudio stream structure and global callback
+00067 // handling functions.
+00068 struct CallbackInfo {
+00069   void *object;    // Used as a "this" pointer.
+00070   ThreadHandle thread;
+00071   bool usingCallback;
+00072   void *callback;
+00073   void *userData;
+00074   void *apiInfo;   // void pointer for API specific callback information
 00075 
-00076   typedef LPGUID DEVICE_ID;
-00077   typedef unsigned long THREAD_HANDLE;
-00078   typedef CRITICAL_SECTION MUTEX;
-00079 
-00080 #elif defined(__WINDOWS_ASIO__)
-00081   #include <windows.h>
-00082   #include <process.h>
-00083 
-00084   typedef int AUDIO_HANDLE;
-00085   typedef int DEVICE_ID;
-00086   typedef unsigned long THREAD_HANDLE;
-00087   typedef CRITICAL_SECTION MUTEX;
-00088 
-00089 #elif defined(__IRIX_AL__)
-00090   #include <dmedia/audio.h>
-00091   #include <pthread.h>
-00092   #include <unistd.h>
-00093 
-00094   typedef ALport AUDIO_HANDLE;
-00095   typedef long DEVICE_ID;
-00096   typedef pthread_t THREAD_HANDLE;
-00097   typedef pthread_mutex_t MUTEX;
-00098 
-00099 #elif defined(__MACOSX_CORE__)
-00100 
-00101   #include <CoreAudio/AudioHardware.h>
-00102   #include <pthread.h>
-00103 
-00104   typedef unsigned int AUDIO_HANDLE;
-00105   typedef AudioDeviceID DEVICE_ID;
-00106   typedef pthread_t THREAD_HANDLE;
-00107   typedef pthread_mutex_t MUTEX;
-00108 
-00109 #endif
-00110 
-00111 
-00112 /************************************************************************/
-00125 /************************************************************************/
-00126 
-00127 class RtError
-00128 {
-00129 public:
-00131   enum TYPE {
-00132     WARNING,
-00133     DEBUG_WARNING,
-00134     UNSPECIFIED,
-00135     NO_DEVICES_FOUND,
-00136     INVALID_DEVICE,
-00137     INVALID_STREAM,
-00138     MEMORY_ERROR,
-00139     INVALID_PARAMETER,
-00140     DRIVER_ERROR,
-00141     SYSTEM_ERROR,
-00142     THREAD_ERROR
-00143   };
-00144 
-00145 protected:
-00146   char error_message[256];
-00147   TYPE type;
+00076   // Default constructor.
+00077   CallbackInfo()
+00078     :object(0), usingCallback(false), callback(0),
+00079      userData(0), apiInfo(0) {}
+00080 };
+00081 
+00082 // Support for signed integers and floats.  Audio data fed to/from
+00083 // the tickStream() routine is assumed to ALWAYS be in host
+00084 // byte order.  The internal routines will automatically take care of
+00085 // any necessary byte-swapping between the host format and the
+00086 // soundcard.  Thus, endian-ness is not a concern in the following
+00087 // format definitions.
+00088 typedef unsigned long RtAudioFormat;
+00089 static const RtAudioFormat RTAUDIO_SINT8 = 0x1;    
+00090 static const RtAudioFormat RTAUDIO_SINT16 = 0x2;   
+00091 static const RtAudioFormat RTAUDIO_SINT24 = 0x4;   
+00092 static const RtAudioFormat RTAUDIO_SINT32 = 0x8;   
+00093 static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; 
+00094 static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; 
+00096 typedef int (*RtAudioCallback)(char *buffer, int bufferSize, void *userData);
+00097 
+00099 struct RtAudioDeviceInfo {
+00100   std::string name;      
+00101   bool probed;          
+00102   int outputChannels;   
+00103   int inputChannels;    
+00104   int duplexChannels;   
+00105   bool isDefault;       
+00106   std::vector<int> sampleRates; 
+00107   RtAudioFormat nativeFormats;  
+00109   // Default constructor.
+00110   RtAudioDeviceInfo()
+00111     :probed(false), outputChannels(0), inputChannels(0),
+00112        duplexChannels(0), isDefault(false), nativeFormats(0) {}
+00113 };
+00114 
+00115 // **************************************************************** //
+00116 //
+00117 // RtApi class declaration.
+00118 //
+00119 // Note that RtApi is an abstract base class and cannot be
+00120 // explicitly instantiated.  The class RtAudio will create an
+00121 // instance of an RtApi subclass (RtApiOss, RtApiAlsa,
+00122 // RtApiJack, RtApiCore, RtApiAl, RtApiDs, or RtApiAsio).
+00123 //
+00124 // **************************************************************** //
+00125 
+00126 class RtApi
+00127 {
+00128 public:
+00129 
+00130   RtApi();
+00131   virtual ~RtApi();
+00132   void openStream( int outputDevice, int outputChannels,
+00133                    int inputDevice, int inputChannels,
+00134                    RtAudioFormat format, int sampleRate,
+00135                    int *bufferSize, int numberOfBuffers );
+00136   virtual void setStreamCallback( RtAudioCallback callback, void *userData ) = 0;
+00137   virtual void cancelStreamCallback() = 0;
+00138   int getDeviceCount(void);
+00139   RtAudioDeviceInfo getDeviceInfo( int device );
+00140   char * const getStreamBuffer();
+00141   virtual void tickStream() = 0;
+00142   virtual void closeStream();
+00143   virtual void startStream() = 0;
+00144   virtual void stopStream() = 0;
+00145   virtual void abortStream() = 0;
+00146 
+00147 protected:
 00148 
-00149 public:
-00151   RtError(const char *p, TYPE tipe = RtError::UNSPECIFIED);
-00152 
-00154   virtual ~RtError(void);
-00155 
-00157   virtual void printMessage(void);
-00158 
-00160   virtual const TYPE& getType(void) { return type; }
-00161 
-00163   virtual const char *getMessage(void) { return error_message; }
-00164 };
+00149   static const unsigned int MAX_SAMPLE_RATES;
+00150   static const unsigned int SAMPLE_RATES[];
+00151 
+00152   enum { FAILURE, SUCCESS };
+00153 
+00154   enum StreamMode {
+00155     OUTPUT,
+00156     INPUT,
+00157     DUPLEX,
+00158     UNINITIALIZED = -75
+00159   };
+00160 
+00161   enum StreamState {
+00162     STREAM_STOPPED,
+00163     STREAM_RUNNING
+00164   };
 00165 
-00166 
-00167 // This public structure type is used to pass callback information
-00168 // between the private RtAudio stream structure and global callback
-00169 // handling functions.
-00170 typedef struct {
-00171   void *object;  // Used as a "this" pointer.
-00172   int streamId;
-00173   DEVICE_ID device[2];
-00174   THREAD_HANDLE thread;
-00175   void *callback;
-00176   void *buffers;
-00177   unsigned long waitTime;
-00178   bool blockTick;
-00179   bool stopStream;
-00180   bool usingCallback;
-00181   void *userData;
-00182 } CALLBACK_INFO;
-00183 
-00184 
-00185 // *************************************************** //
-00186 //
-00187 // RtAudio class declaration.
-00188 //
-00189 // *************************************************** //
-00190 
-00191 class RtAudio
-00192 {
-00193 public:
-00194 
-00195   // Support for signed integers and floats.  Audio data fed to/from
-00196   // the tickStream() routine is assumed to ALWAYS be in host
-00197   // byte order.  The internal routines will automatically take care of
-00198   // any necessary byte-swapping between the host format and the
-00199   // soundcard.  Thus, endian-ness is not a concern in the following
-00200   // format definitions.
-00201   typedef unsigned long RTAUDIO_FORMAT;
-00202   static const RTAUDIO_FORMAT RTAUDIO_SINT8; 
-00203   static const RTAUDIO_FORMAT RTAUDIO_SINT16; 
-00204   static const RTAUDIO_FORMAT RTAUDIO_SINT24; 
-00205   static const RTAUDIO_FORMAT RTAUDIO_SINT32; 
-00206   static const RTAUDIO_FORMAT RTAUDIO_FLOAT32; 
-00207   static const RTAUDIO_FORMAT RTAUDIO_FLOAT64; 
-00209   //static const int MAX_SAMPLE_RATES = 14;
-00210   enum { MAX_SAMPLE_RATES = 14 };
-00211 
-00212   typedef int (*RTAUDIO_CALLBACK)(char *buffer, int bufferSize, void *userData);
-00213 
-00215   typedef struct {
-00216     char name[128];    
-00217     DEVICE_ID id[2];  /* No value reported by getDeviceInfo(). */
-00218     bool probed;       
-00219     int maxOutputChannels; 
-00220     int maxInputChannels;  
-00221     int maxDuplexChannels; 
-00222     int minOutputChannels; 
-00223     int minInputChannels;  
-00224     int minDuplexChannels; 
-00225     bool hasDuplexSupport; 
-00226     bool isDefault;        
-00227     int nSampleRates;      
-00228     int sampleRates[MAX_SAMPLE_RATES]; 
-00229     RTAUDIO_FORMAT nativeFormats;     
-00230   } RTAUDIO_DEVICE;
+00166   // A protected structure for audio streams.
+00167   struct RtApiStream {
+00168     int device[2];          // Playback and record, respectively.
+00169     void *apiHandle;        // void pointer for API specific stream handle information
+00170     StreamMode mode;         // OUTPUT, INPUT, or DUPLEX.
+00171     StreamState state;       // STOPPED or RUNNING
+00172     char *userBuffer;
+00173     char *deviceBuffer;
+00174     bool doConvertBuffer[2]; // Playback and record, respectively.
+00175     bool deInterleave[2];    // Playback and record, respectively.
+00176     bool doByteSwap[2];      // Playback and record, respectively.
+00177     int sampleRate;
+00178     int bufferSize;
+00179     int nBuffers;
+00180     int nUserChannels[2];    // Playback and record, respectively.
+00181     int nDeviceChannels[2];  // Playback and record channels, respectively.
+00182     RtAudioFormat userFormat;
+00183     RtAudioFormat deviceFormat[2]; // Playback and record, respectively.
+00184     StreamMutex mutex;
+00185     CallbackInfo callbackInfo;
+00186 
+00187     RtApiStream()
+00188       :apiHandle(0), userBuffer(0), deviceBuffer(0) {}
+00189     //      :apiHandle(0), mode(UNINITIALIZED), state(STREAM_STOPPED),
+00190     //       userBuffer(0), deviceBuffer(0) {}
+00191   };
+00192 
+00193   // A protected device structure for audio devices.
+00194   struct RtApiDevice {
+00195     std::string name;      
+00196     bool probed;           
+00197     void *apiDeviceId;     // void pointer for API specific device information
+00198     int maxOutputChannels; 
+00199     int maxInputChannels;  
+00200     int maxDuplexChannels; 
+00201     int minOutputChannels; 
+00202     int minInputChannels;  
+00203     int minDuplexChannels; 
+00204     bool hasDuplexSupport; 
+00205     bool isDefault;        
+00206     std::vector<int> sampleRates; 
+00207     RtAudioFormat nativeFormats;  
+00209     // Default constructor.
+00210     RtApiDevice()
+00211       :probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0),
+00212        maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0),
+00213        minDuplexChannels(0), isDefault(false), nativeFormats(0) {}
+00214   };
+00215 
+00216   typedef signed short Int16;
+00217   typedef signed int Int32;
+00218   typedef float Float32;
+00219   typedef double Float64;
+00220 
+00221   char message_[256];
+00222   int nDevices_;
+00223   std::vector<RtApiDevice> devices_;
+00224   RtApiStream stream_;
+00225 
+00230   virtual void initialize(void) = 0;
 00231 
-00233 
-00239   RtAudio();
-00240 
-00242 
-00253   RtAudio(int *streamId,
-00254           int outputDevice, int outputChannels,
-00255           int inputDevice, int inputChannels,
-00256           RTAUDIO_FORMAT format, int sampleRate,
-00257           int *bufferSize, int numberOfBuffers);
-00258 
-00260 
-00264   ~RtAudio();
+00240   virtual void probeDeviceInfo( RtApiDevice *info );
+00241 
+00250   virtual bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00251                                 int sampleRate, RtAudioFormat format,
+00252                                 int *bufferSize, int numberOfBuffers );
+00253 
+00258   virtual int getDefaultInputDevice(void);
+00259 
+00264   virtual int getDefaultOutputDevice(void);
 00265 
-00267 
-00294   int openStream(int outputDevice, int outputChannels,
-00295                  int inputDevice, int inputChannels,
-00296                  RTAUDIO_FORMAT format, int sampleRate,
-00297                  int *bufferSize, int numberOfBuffers);
-00298 
-00300 
-00319   void setStreamCallback(int streamId, RTAUDIO_CALLBACK callback, void *userData);
-00320 
-00322 
-00329   void cancelStreamCallback(int streamId);
-00330 
-00332   int getDeviceCount(void);
-00333 
-00335 
-00343   void getDeviceInfo(int device, RTAUDIO_DEVICE *info);
-00344 
-00346 
-00351   char * const getStreamBuffer(int streamId);
-00352 
-00354 
-00359   void tickStream(int streamId);
+00267   void clearDeviceInfo( RtApiDevice *info );
+00268 
+00270   void clearStreamInfo();
+00271 
+00273   void error( RtError::Type type );
+00274 
+00279   void verifyStream();
+00280 
+00285   void convertStreamBuffer( StreamMode mode );
+00286 
+00288   void byteSwapBuffer( char *buffer, int samples, RtAudioFormat format );
+00289 
+00291   int formatBytes( RtAudioFormat format );
+00292 };
+00293 
+00294 
+00295 // **************************************************************** //
+00296 //
+00297 // RtAudio class declaration.
+00298 //
+00299 // RtAudio is a "controller" used to select an available audio i/o
+00300 // interface.  It presents a common API for the user to call but all
+00301 // functionality is implemented by the class RtAudioApi and its
+00302 // subclasses.  RtAudio creates an instance of an RtAudioApi subclass
+00303 // based on the user's API choice.  If no choice is made, RtAudio
+00304 // attempts to make a "logical" API selection.
+00305 //
+00306 // **************************************************************** //
+00307 
+00308 class RtAudio
+00309 {
+00310 public:
+00311 
+00313   enum RtAudioApi {
+00314     UNSPECIFIED,    
+00315     LINUX_ALSA,     
+00316     LINUX_OSS,      
+00317     LINUX_JACK,     
+00318     MACOSX_CORE,    
+00319     IRIX_AL,        
+00320     WINDOWS_ASIO,   
+00321     WINDOWS_DS      
+00322   };
+00323 
+00325 
+00335   RtAudio( RtAudioApi api=UNSPECIFIED );
+00336 
+00338 
+00349   RtAudio( int outputDevice, int outputChannels,
+00350            int inputDevice, int inputChannels,
+00351            RtAudioFormat format, int sampleRate,
+00352            int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED );
+00353 
+00355 
+00359   ~RtAudio();
 00360 
 00362 
-00366   void closeStream(int streamId);
-00367 
-00369 
-00373   void startStream(int streamId);
-00374 
-00376 
-00380   void stopStream(int streamId);
-00381 
-00383 
-00387   void abortStream(int streamId);
-00388 
-00390 
-00395   int streamWillBlock(int streamId);
-00396 
-00397 #if (defined(__MACOSX_CORE__) || defined(__WINDOWS_ASIO__))
-00398   // This function is intended for internal use only.  It must be
-00399   // public because it is called by the internal callback handler,
-00400   // which is not a member of RtAudio.  External use of this function
-00401   // will most likely produce highly undesireable results!
-00402   void callbackEvent(int streamId, DEVICE_ID deviceId, void *inData, void *outData);
-00403 #endif
-00404 
-00405 protected:
-00406 
-00407 private:
-00408 
-00409   static const unsigned int SAMPLE_RATES[MAX_SAMPLE_RATES];
-00410 
-00411   enum { FAILURE, SUCCESS };
-00412 
-00413   enum STREAM_MODE {
-00414     OUTPUT,
-00415     INPUT,
-00416     DUPLEX,
-00417     UNINITIALIZED = -75
-00418   };
-00419 
-00420   enum STREAM_STATE {
-00421     STREAM_STOPPED,
-00422     STREAM_RUNNING
-00423   };
+00388   void openStream( int outputDevice, int outputChannels,
+00389                    int inputDevice, int inputChannels,
+00390                    RtAudioFormat format, int sampleRate,
+00391                    int *bufferSize, int numberOfBuffers );
+00392 
+00394 
+00413   void setStreamCallback(RtAudioCallback callback, void *userData) { rtapi_->setStreamCallback( callback, userData ); };
+00414 
+00416 
+00423   void cancelStreamCallback() { rtapi_->cancelStreamCallback(); };
 00424 
-00425   typedef struct {
-00426     int device[2];          // Playback and record, respectively.
-00427     STREAM_MODE mode;       // OUTPUT, INPUT, or DUPLEX.
-00428     AUDIO_HANDLE handle[2]; // Playback and record handles, respectively.
-00429     STREAM_STATE state;     // STOPPED or RUNNING
-00430     char *userBuffer;
-00431     char *deviceBuffer;
-00432     bool doConvertBuffer[2]; // Playback and record, respectively.
-00433     bool deInterleave[2];    // Playback and record, respectively.
-00434     bool doByteSwap[2];      // Playback and record, respectively.
-00435     int sampleRate;
-00436     int bufferSize;
-00437     int nBuffers;
-00438     int nUserChannels[2];    // Playback and record, respectively.
-00439     int nDeviceChannels[2];  // Playback and record channels, respectively.
-00440     RTAUDIO_FORMAT userFormat;
-00441     RTAUDIO_FORMAT deviceFormat[2]; // Playback and record, respectively.
-00442     MUTEX mutex;
-00443     CALLBACK_INFO callbackInfo;
-00444   } RTAUDIO_STREAM;
-00445 
-00446   typedef signed short INT16;
-00447   typedef signed int INT32;
-00448   typedef float FLOAT32;
-00449   typedef double FLOAT64;
-00450 
-00451   char message[256];
-00452   int nDevices;
-00453   RTAUDIO_DEVICE *devices;
+00426   int getDeviceCount(void) { return rtapi_->getDeviceCount(); };
+00427 
+00429 
+00437   RtAudioDeviceInfo getDeviceInfo(int device) { return rtapi_->getDeviceInfo( device ); };
+00438 
+00440 
+00445   char * const getStreamBuffer() { return rtapi_->getStreamBuffer(); };
+00446 
+00448 
+00453   void tickStream() { rtapi_->tickStream(); };
 00454 
-00455   std::map<int, void *> streams;
 00456 
-00458   void error(RtError::TYPE type);
-00459 
-00464   void initialize(void);
-00465 
-00470   int getDefaultInputDevice(void);
-00471 
-00476   int getDefaultOutputDevice(void);
+00460   void closeStream()  { rtapi_->closeStream(); };
+00461 
+00463 
+00467   void startStream() { rtapi_->startStream(); };
+00468 
+00470 
+00474   void stopStream() { rtapi_->stopStream(); };
+00475 
 00477 
-00479   void clearDeviceInfo(RTAUDIO_DEVICE *info);
-00480 
-00488   void probeDeviceInfo(RTAUDIO_DEVICE *info);
-00489 
-00496   bool probeDeviceOpen(int device, RTAUDIO_STREAM *stream,
-00497                        STREAM_MODE mode, int channels, 
-00498                        int sampleRate, RTAUDIO_FORMAT format,
-00499                        int *bufferSize, int numberOfBuffers);
-00500 
-00507   void *verifyStream(int streamId);
-00508 
-00513   void convertStreamBuffer(RTAUDIO_STREAM *stream, STREAM_MODE mode);
-00514 
-00516   void byteSwapBuffer(char *buffer, int samples, RTAUDIO_FORMAT format);
-00517 
-00519   int formatBytes(RTAUDIO_FORMAT format);
-00520 };
-00521 
-00522 // Define the following flag to have extra information spewed to stderr.
-00523 //#define __RTAUDIO_DEBUG__
-00524 
-00525 #endif
-

+00481 void abortStream() { rtapi_->abortStream(); }; +00482 +00483 +00484 protected: +00485 +00486 void initialize( RtAudioApi api ); +00487 +00488 RtApi *rtapi_; +00489 }; +00490 +00491 +00492 // RtApi Subclass prototypes. +00493 +00494 #if defined(__LINUX_ALSA__) +00495 +00496 class RtApiAlsa: public RtApi +00497 { +00498 public: +00499 +00500 RtApiAlsa(); +00501 ~RtApiAlsa(); +00502 void tickStream(); +00503 void closeStream(); +00504 void startStream(); +00505 void stopStream(); +00506 void abortStream(); +00507 int streamWillBlock(); +00508 void setStreamCallback( RtAudioCallback callback, void *userData ); +00509 void cancelStreamCallback(); +00510 +00511 private: +00512 +00513 void initialize(void); +00514 void probeDeviceInfo( RtApiDevice *info ); +00515 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00516 int sampleRate, RtAudioFormat format, +00517 int *bufferSize, int numberOfBuffers ); +00518 }; +00519 +00520 #endif +00521 +00522 #if defined(__LINUX_JACK__) +00523 +00524 class RtApiJack: public RtApi +00525 { +00526 public: +00527 +00528 RtApiJack(); +00529 ~RtApiJack(); +00530 void tickStream(); +00531 void closeStream(); +00532 void startStream(); +00533 void stopStream(); +00534 void abortStream(); +00535 void setStreamCallback( RtAudioCallback callback, void *userData ); +00536 void cancelStreamCallback(); +00537 // This function is intended for internal use only. It must be +00538 // public because it is called by the internal callback handler, +00539 // which is not a member of RtAudio. External use of this function +00540 // will most likely produce highly undesireable results! +00541 void callbackEvent( unsigned long nframes ); +00542 +00543 private: +00544 +00545 void initialize(void); +00546 void probeDeviceInfo( RtApiDevice *info ); +00547 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00548 int sampleRate, RtAudioFormat format, +00549 int *bufferSize, int numberOfBuffers ); +00550 }; +00551 +00552 #endif +00553 +00554 #if defined(__LINUX_OSS__) +00555 +00556 class RtApiOss: public RtApi +00557 { +00558 public: +00559 +00560 RtApiOss(); +00561 ~RtApiOss(); +00562 void tickStream(); +00563 void closeStream(); +00564 void startStream(); +00565 void stopStream(); +00566 void abortStream(); +00567 int streamWillBlock(); +00568 void setStreamCallback( RtAudioCallback callback, void *userData ); +00569 void cancelStreamCallback(); +00570 +00571 private: +00572 +00573 void initialize(void); +00574 void probeDeviceInfo( RtApiDevice *info ); +00575 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00576 int sampleRate, RtAudioFormat format, +00577 int *bufferSize, int numberOfBuffers ); +00578 }; +00579 +00580 #endif +00581 +00582 #if defined(__MACOSX_CORE__) +00583 +00584 #include <CoreAudio/AudioHardware.h> +00585 +00586 class RtApiCore: public RtApi +00587 { +00588 public: +00589 +00590 RtApiCore(); +00591 ~RtApiCore(); +00592 int getDefaultOutputDevice(void); +00593 int getDefaultInputDevice(void); +00594 void tickStream(); +00595 void closeStream(); +00596 void startStream(); +00597 void stopStream(); +00598 void abortStream(); +00599 void setStreamCallback( RtAudioCallback callback, void *userData ); +00600 void cancelStreamCallback(); +00601 +00602 // This function is intended for internal use only. It must be +00603 // public because it is called by the internal callback handler, +00604 // which is not a member of RtAudio. External use of this function +00605 // will most likely produce highly undesireable results! +00606 void callbackEvent( AudioDeviceID deviceId, void *inData, void *outData ); +00607 +00608 private: +00609 +00610 void initialize(void); +00611 void probeDeviceInfo( RtApiDevice *info ); +00612 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00613 int sampleRate, RtAudioFormat format, +00614 int *bufferSize, int numberOfBuffers ); +00615 }; +00616 +00617 #endif +00618 +00619 #if defined(__WINDOWS_DS__) +00620 +00621 class RtApiDs: public RtApi +00622 { +00623 public: +00624 +00625 RtApiDs(); +00626 ~RtApiDs(); +00627 int getDefaultOutputDevice(void); +00628 int getDefaultInputDevice(void); +00629 void tickStream(); +00630 void closeStream(); +00631 void startStream(); +00632 void stopStream(); +00633 void abortStream(); +00634 int streamWillBlock(); +00635 void setStreamCallback( RtAudioCallback callback, void *userData ); +00636 void cancelStreamCallback(); +00637 +00638 private: +00639 +00640 void initialize(void); +00641 void probeDeviceInfo( RtApiDevice *info ); +00642 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00643 int sampleRate, RtAudioFormat format, +00644 int *bufferSize, int numberOfBuffers ); +00645 }; +00646 +00647 #endif +00648 +00649 #if defined(__WINDOWS_ASIO__) +00650 +00651 class RtApiAsio: public RtApi +00652 { +00653 public: +00654 +00655 RtApiAsio(); +00656 ~RtApiAsio(); +00657 void tickStream(); +00658 void closeStream(); +00659 void startStream(); +00660 void stopStream(); +00661 void abortStream(); +00662 void setStreamCallback( RtAudioCallback callback, void *userData ); +00663 void cancelStreamCallback(); +00664 +00665 // This function is intended for internal use only. It must be +00666 // public because it is called by the internal callback handler, +00667 // which is not a member of RtAudio. External use of this function +00668 // will most likely produce highly undesireable results! +00669 void callbackEvent( long bufferIndex ); +00670 +00671 private: +00672 +00673 void initialize(void); +00674 void probeDeviceInfo( RtApiDevice *info ); +00675 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00676 int sampleRate, RtAudioFormat format, +00677 int *bufferSize, int numberOfBuffers ); +00678 }; +00679 +00680 #endif +00681 +00682 #if defined(__IRIX_AL__) +00683 +00684 class RtApiAl: public RtApi +00685 { +00686 public: +00687 +00688 RtApiAl(); +00689 ~RtApiAl(); +00690 int getDefaultOutputDevice(void); +00691 int getDefaultInputDevice(void); +00692 void tickStream(); +00693 void closeStream(); +00694 void startStream(); +00695 void stopStream(); +00696 void abortStream(); +00697 int streamWillBlock(); +00698 void setStreamCallback( RtAudioCallback callback, void *userData ); +00699 void cancelStreamCallback(); +00700 +00701 private: +00702 +00703 void initialize(void); +00704 void probeDeviceInfo( RtApiDevice *info ); +00705 bool probeDeviceOpen( int device, StreamMode mode, int channels, +00706 int sampleRate, RtAudioFormat format, +00707 int *bufferSize, int numberOfBuffers ); +00708 }; +00709 +00710 #endif +00711 +00712 // Define the following flag to have extra information spewed to stderr. +00713 //#define __RTAUDIO_DEBUG__ +00714 +00715 #endif +

-
- ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
- Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

+ +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
diff --git a/doc/html/RtError_8h-source.html b/doc/html/RtError_8h-source.html new file mode 100644 index 0000000..d216750 --- /dev/null +++ b/doc/html/RtError_8h-source.html @@ -0,0 +1,64 @@ + + +The RtAudio Tutorial + + + +

+Tutorial   Class/Enum List   File List   Compound Members  
+
+ +

RtError.h

00001 /************************************************************************/
+00010 /************************************************************************/
+00011 
+00012 #ifndef RTERROR_H
+00013 #define RTERROR_H
+00014 
+00015 #include <iostream>
+00016 #include <string>
+00017 
+00018 class RtError
+00019 {
+00020 public:
+00022   enum Type {
+00023     WARNING,           
+00024     DEBUG_WARNING,     
+00025     UNSPECIFIED,       
+00026     NO_DEVICES_FOUND,  
+00027     INVALID_DEVICE,    
+00028     INVALID_STREAM,    
+00029     MEMORY_ERROR,      
+00030     INVALID_PARAMETER, 
+00031     DRIVER_ERROR,      
+00032     SYSTEM_ERROR,      
+00033     THREAD_ERROR       
+00034   };
+00035 
+00036 protected:
+00037   std::string message_;
+00038   Type type_;
+00039 
+00040 public:
+00042   RtError(const std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type){}
+00043 
+00045   virtual ~RtError(void) {};
+00046 
+00048   virtual void printMessage(void) { std::cerr << '\n' << message_ << "\n\n"; }
+00049 
+00051   virtual const Type& getType(void) { return type_; }
+00052 
+00054   virtual const std::string& getMessage(void) { return message_; }
+00055 
+00057   virtual const char *getMessageString(void) { return message_.c_str(); }
+00058 };
+00059 
+00060 #endif
+

+ + + +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
+ + + diff --git a/doc/html/annotated.html b/doc/html/annotated.html index f298ed2..55c6533 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -7,17 +7,17 @@
Tutorial   Class/Enum List   File List   Compound Members  

- -

RtAudio Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: + +

RtAudio Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + + + +
RtAudioRealtime audio i/o C++ classes
RtAudioDeviceInfoThe public device information structure for returning queried values
RtErrorException handling class for RtAudio & RtMidi

-
- ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
- Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

+ +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
diff --git a/doc/html/classRtAudio-members.html b/doc/html/classRtAudio-members.html index d4fcffb..49997ae 100644 --- a/doc/html/classRtAudio-members.html +++ b/doc/html/classRtAudio-members.html @@ -7,35 +7,36 @@

Tutorial   Class/Enum List   File List   Compound Members  

- -

RtAudio Member List

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

RtAudio Member List

This is the complete list of members for RtAudio, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
abortStream()RtAudio [inline]
cancelStreamCallback()RtAudio [inline]
closeStream()RtAudio [inline]
getDeviceCount(void)RtAudio [inline]
getDeviceInfo(int device)RtAudio [inline]
getStreamBuffer()RtAudio [inline]
IRIX_AL enum valueRtAudio
LINUX_ALSA enum valueRtAudio
LINUX_JACK enum valueRtAudio
LINUX_OSS enum valueRtAudio
MACOSX_CORE enum valueRtAudio
openStream(int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers)RtAudio
RtAudio(RtAudioApi api=UNSPECIFIED)RtAudio
RtAudio(int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED)RtAudio
RtAudioApi enum nameRtAudio
setStreamCallback(RtAudioCallback callback, void *userData)RtAudio [inline]
startStream()RtAudio [inline]
stopStream()RtAudio [inline]
tickStream()RtAudio [inline]
UNSPECIFIED enum valueRtAudio
WINDOWS_ASIO enum valueRtAudio
WINDOWS_DS enum valueRtAudio
~RtAudio()RtAudio

-
- ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
- Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

+ +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
diff --git a/doc/html/classRtAudio.html b/doc/html/classRtAudio.html index 157d97a..a66b7d8 100644 --- a/doc/html/classRtAudio.html +++ b/doc/html/classRtAudio.html @@ -7,83 +7,143 @@

Tutorial   Class/Enum List   File List   Compound Members  

- -

RtAudio Class Reference

Realtime audio i/o C++ class. + +

RtAudio Class Reference

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

#include <RtAudio.h>

List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Methods

 RtAudio ()
 The default constructor. More...

 RtAudio (int *streamId, int outputDevice, int outputChannels, int inputDevice, int inputChannels, RTAUDIO_FORMAT format, int sampleRate, int *bufferSize, int numberOfBuffers)
 A constructor which can be used to open a stream during instantiation. More...

 ~RtAudio ()
 The destructor. More...

int openStream (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RTAUDIO_FORMAT format, int sampleRate, int *bufferSize, int numberOfBuffers)
 A public method for opening a stream with the specified parameters. More...

void setStreamCallback (int streamId, RTAUDIO_CALLBACK callback, void *userData)
 A public method which sets a user-defined callback function for a given stream. More...

void cancelStreamCallback (int streamId)
 A public method which cancels a callback process and function for a given stream. More...

-int getDeviceCount (void)
 A public method which returns the number of audio devices found.

void getDeviceInfo (int device, RTAUDIO_DEVICE *info)
 Fill a user-supplied RTAUDIO_DEVICE structure for a specified device number. More...

char* const getStreamBuffer (int streamId)
 A public method which returns a pointer to the buffer for an open stream. More...

void tickStream (int streamId)
 Public method used to trigger processing of input/output data for a stream. More...

void closeStream (int streamId)
 Public method which closes a stream and frees any associated buffers. More...

void startStream (int streamId)
 Public method which starts a stream. More...

void stopStream (int streamId)
 Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. More...

void abortStream (int streamId)
 Stop a stream, discarding any samples remaining in the input/output queue. More...

int streamWillBlock (int streamId)
 Queries a stream to determine whether a call to the tickStream() method will block. More...


Static Public Attributes

const RTAUDIO_FORMAT RTAUDIO_SINT8
const RTAUDIO_FORMAT RTAUDIO_SINT16
const RTAUDIO_FORMAT RTAUDIO_SINT24
const RTAUDIO_FORMAT RTAUDIO_SINT32
const RTAUDIO_FORMAT RTAUDIO_FLOAT32
const RTAUDIO_FORMAT RTAUDIO_FLOAT64

Public Types

enum  RtAudioApi {
+  UNSPECIFIED, +LINUX_ALSA, +LINUX_OSS, +LINUX_JACK, +
+  MACOSX_CORE, +IRIX_AL, +WINDOWS_ASIO, +WINDOWS_DS +
+ }
 Audio API specifier arguments. More...


Public Member Functions

 RtAudio (RtAudioApi api=UNSPECIFIED)
 The default class constructor.

 RtAudio (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED)
 A constructor which can be used to open a stream during instantiation.

 ~RtAudio ()
 The destructor.

void openStream (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers)
 A public method for opening a stream with the specified parameters.

void setStreamCallback (RtAudioCallback callback, void *userData)
 A public method which sets a user-defined callback function for a given stream.

void cancelStreamCallback ()
 A public method which cancels a callback process and function for the stream.

+int getDeviceCount (void)
 A public method which returns the number of audio devices found.

RtAudioDeviceInfo getDeviceInfo (int device)
 Return an RtAudioDeviceInfo structure for a specified device number.

char *const  getStreamBuffer ()
 A public method which returns a pointer to the buffer for an open stream.

void tickStream ()
 Public method used to trigger processing of input/output data for a stream.

void closeStream ()
 Public method which closes a stream and frees any associated buffers.

void startStream ()
 Public method which starts a stream.

void stopStream ()
 Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.

void abortStream ()
 Stop a stream, discarding any samples remaining in the input/output queue.


Detailed Description

-Realtime audio i/o C++ class. -

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

-RtAudio WWW site: http://www-ccrma.stanford.edu/~gary/rtaudio/ -

-RtAudio: a realtime audio i/o C++ class Copyright (c) 2001-2002 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. +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), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems.

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

+RtAudio: a realtime audio i/o C++ class Copyright (c) 2001-2004 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 requested to send the modifications to the original developer so that they can be incorporated into the canonical version.

+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.

-Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. +


Member Enumeration Documentation

+

+ + + + +
+ + +
enum RtAudio::RtAudioApi +
+
+ + + + + +
+   + +

-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. +Audio API specifier arguments.

+

Enumeration values:
+ + + + + + + + + +
UNSPECIFIED  +Search for a working compiled API.
LINUX_ALSA  +The Advanced Linux Sound Architecture API.
LINUX_OSS  +The Linux Open Sound System API.
LINUX_JACK  +The Linux Jack Low-Latency Audio Server API.
MACOSX_CORE  +Macintosh OS-X Core Audio API.
IRIX_AL  +The Irix Audio Library API.
WINDOWS_ASIO  +The Steinberg Audio Stream I/O API.
WINDOWS_DS  +The Microsoft Direct Sound API.
+
+


Constructor & Destructor Documentation

-

- +

+

- +Probes the system to make sure at least one audio input/output device is available and determines the api-specific identifier for each device found. An RtError error can be thrown if no devices are found or if a memory allocation error occurs.

+If no API argument is specified and multiple API support has been compiled, the default order of use is JACK, ALSA, OSS (Linux systems) and ASIO, DS (Windows systems).

+ - - + + + + + +
-RtAudio::RtAudio ( - -) - RtAudio::RtAudio RtAudioApi  api = UNSPECIFIED  ) 
@@ -98,71 +158,75 @@ RtAudio::RtAudio (

-The default constructor. +The default class constructor.

-Probes the system to make sure at least one audio input/output device is available and determines the api-specific identifier for each device found. An RtError error can be thrown if no devices are found or if a memory allocation error occurs.

-

- +

+

- +The specified output and/or input device identifiers correspond to those enumerated via the getDeviceInfo() method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An RtError can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs.
See also:
openStream()
+
+ - - + + + + + + + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + +
-RtAudio::RtAudio ( - -int * streamId, - RtAudio::RtAudio int  outputDevice,
int  outputChannels,
-int outputDevice, - int  inputDevice,
-int outputChannels, - int  inputChannels,
-int inputDevice, - RtAudioFormat  format,
-int inputChannels, - int  sampleRate,
-RTAUDIO_FORMAT format, - int *  bufferSize,
-int sampleRate, - int  numberOfBuffers,
-int * bufferSize, - RtAudioApi  api = UNSPECIFIED
-int numberOfBuffers ) -
@@ -177,25 +241,23 @@ int numberOfBuffers )

-A constructor which can be used to open a stream during instantiation. +A constructor which can be used to open a stream during instantiation.

-The specified output and/or input device identifiers correspond to those enumerated via the getDeviceInfo() method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An RtError can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs.

-See also:
-openStream()
-

- +

+

- +Stops and closes an open stream and devices and deallocates buffer and structure memory.
+ - - + + + + +
-RtAudio::~RtAudio ( - -) - RtAudio::~RtAudio  ) 
@@ -210,137 +272,69 @@ RtAudio::~RtAudio (

-The destructor. +The destructor.

-Stops and closes any open streams and devices and deallocates buffer and structure memory.


Member Function Documentation

-

- +

+

- - -
+ - - + + + + - - - - + + - - - - + + - + + + - + + + - + + + - -
-int RtAudio::openStream ( - -int outputDevice, - void RtAudio::openStream int  outputDevice,
-int outputChannels, -
-int inputDevice, - int  outputChannels,
-int inputChannels, -
-RTAUDIO_FORMAT format, - int  inputDevice,
-int sampleRate, - int  inputChannels,
-int * bufferSize, - RtAudioFormat  format,
-int numberOfBuffers ) - int  sampleRate,
-
- - - - - -
-   - - -

-A public method for opening a stream with the specified parameters. -

-If successful, the opened stream ID is returned. Otherwise, an RtError is thrown.

-Parameters:
- - - - - - - - - -
outputDevice: -If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the getDeviceInfo() method.
outputChannels: -The desired number of output channels. If equal to zero, the outputDevice identifier is ignored.
inputDevice: -If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the getDeviceInfo() method.
inputChannels: -The desired number of input channels. If equal to zero, the inputDevice identifier is ignored.
format: -An RTAUDIO_FORMAT specifying the desired sample data format.
sampleRate: -The desired sample rate (sample frames per second).
bufferSize: -A pointer 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.
numberOfBuffers: -A value which can be used to help control device latency. More buffers typically result in more robust performance, though at a cost of greater latency. A value of zero can be specified, in which case the lowest allowable value is used.
-
-

- - - - -
- - - + + + + - + + + - + +
-void RtAudio::setStreamCallback ( - -int streamId, - int *  bufferSize,
-RTAUDIO_CALLBACK callback, - int  numberOfBuffers
-void * userData ) -
@@ -355,91 +349,45 @@ void * userData )

-A public method which sets a user-defined callback function for a given stream. +A public method for opening a stream with the specified parameters.

-This method assigns a callback function to a specific, previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the startStream() and stopStream() methods, respectively). The callback process remains active for the duration of the stream and is automatically shutdown when the stream is closed (via the closeStream() method or by object destruction). The callback process can also be shutdown and the user function de-referenced through an explicit call to the cancelStreamCallback() method. Note that a single stream can use only blocking or callback functionality at the same time, though it is possible to alternate modes on the same stream through the use of the setStreamCallback() and cancelStreamCallback() methods (the blocking tickStream() method can be used before a callback is set and/or after a callback is cancelled). An RtError will be thrown for an invalid device argument.

-

- - -
- - - - - - -
-void RtAudio::cancelStreamCallback ( - -int streamId ) -
+An RtError is thrown if a stream cannot be opened.

+

Parameters:
+ + + + + + + + + +
outputDevice: If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the getDeviceInfo() method.
outputChannels: The desired number of output channels. If equal to zero, the outputDevice identifier is ignored.
inputDevice: If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the getDeviceInfo() method.
inputChannels: The desired number of input channels. If equal to zero, the inputDevice identifier is ignored.
format: An RtAudioFormat specifying the desired sample data format.
sampleRate: The desired sample rate (sample frames per second).
*bufferSize: A pointer 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.
numberOfBuffers: A value which can be used to help control device latency. More buffers typically result in more robust performance, though at a cost of greater latency. A value of zero can be specified, in which case the lowest allowable value is used.
+
- +

+

- - - -
-   - - -

-A public method which cancels a callback process and function for a given stream. -

-This method shuts down a callback process and de-references the user function for a specific stream. Callback functionality can subsequently be restarted on the stream via the setStreamCallback() method. An RtError will be thrown for an invalid device argument.

-

- - - - -
+ - - + + + + - + + + - -
-void RtAudio::getDeviceInfo ( - -int device, - void RtAudio::setStreamCallback RtAudioCallback  callback,
-RTAUDIO_DEVICE * info ) - void *  userData
-
- - - - - -
-   - - -

-Fill a user-supplied RTAUDIO_DEVICE structure for a specified device number. -

-Any device integer between 1 and getDeviceCount() is valid. 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 "isDefault" member will have a value of "true". An RtError will be thrown for an invalid device argument.

-

- - - +This method assigns a callback function to a previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the startStream() and stopStream() methods, respectively). The callback process remains active for the duration of the stream and is automatically shutdown when the stream is closed (via the closeStream() method or by object destruction). The callback process can also be shutdown and the user function de-referenced through an explicit call to the cancelStreamCallback() method. Note that the stream can use only blocking or callback functionality at a particular time, though it is possible to alternate modes on the same stream through the use of the setStreamCallback() and cancelStreamCallback() methods (the blocking tickStream() method can be used before a callback is set and/or after a callback is cancelled). An RtError will be thrown if called when no stream is open or a thread errors occurs.
- - - + + +
-char *const RtAudio::getStreamBuffer ( - -int streamId ) - [inline]
@@ -454,23 +402,22 @@ int streamId )

-A public method which returns a pointer to the buffer for an open stream. +A public method which sets a user-defined callback function for a given stream.

-The user should fill and/or read the buffer data in interleaved format and then call the tickStream() method. An RtError will be thrown for an invalid stream identifier.

-

- +

+

- +This method shuts down a callback process and de-references the user function for the stream. Callback functionality can subsequently be restarted on the stream via the setStreamCallback() method. An RtError will be thrown if called when no stream is open.
+ - - + + + + +
-void RtAudio::tickStream ( - -int streamId ) - void RtAudio::cancelStreamCallback  )  [inline]
@@ -485,23 +432,23 @@ int streamId )

-Public method used to trigger processing of input/output data for a stream. +A public method which cancels a callback process and function for the stream.

-This method blocks until all buffer data is read/written. An RtError will be thrown for an invalid stream identifier or if a driver error occurs.

-

- +

+

- +Any device integer between 1 and getDeviceCount() is valid. 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 "isDefault" member will have a value of "true". An RtError will be thrown for an invalid device argument.
+ - - + + + + + +
-void RtAudio::closeStream ( - -int streamId ) - RtAudioDeviceInfo RtAudio::getDeviceInfo int  device  )  [inline]
@@ -516,23 +463,22 @@ int streamId )

-Public method which closes a stream and frees any associated buffers. +Return an RtAudioDeviceInfo structure for a specified device number.

-If an invalid stream identifier is specified, this method issues a warning and returns (an RtError is not thrown).

-

- +

+

- +The user should fill and/or read the buffer data in interleaved format and then call the tickStream() method. An RtError will be thrown if called when no stream is open.
+ - - + + + + +
-void RtAudio::startStream ( - -int streamId ) - char* const RtAudio::getStreamBuffer  )  [inline]
@@ -547,23 +493,22 @@ int streamId )

-Public method which starts a stream. +A public method which returns a pointer to the buffer for an open stream.

-An RtError will be thrown for an invalid stream identifier or if a driver error occurs.

-

- +

+

- +This method blocks until all buffer data is read/written. An RtError will be thrown if a driver error occurs or if called when no stream is open.
+ - - + + + + +
-void RtAudio::stopStream ( - -int streamId ) - void RtAudio::tickStream  )  [inline]
@@ -578,23 +523,22 @@ int streamId )

-Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. +Public method used to trigger processing of input/output data for a stream.

-An RtError will be thrown for an invalid stream identifier or if a driver error occurs.

-

- +

+

- +If a stream is not open, this method issues a warning and returns (an RtError is not thrown).
+ - - + + + + +
-void RtAudio::abortStream ( - -int streamId ) - void RtAudio::closeStream  )  [inline]
@@ -609,23 +553,22 @@ int streamId )

-Stop a stream, discarding any samples remaining in the input/output queue. +Public method which closes a stream and frees any associated buffers.

-An RtError will be thrown for an invalid stream identifier or if a driver error occurs.

-

- +

+

- +An RtError will be thrown if a driver error occurs or if called when no stream is open.
+ - - + + + + +
-int RtAudio::streamWillBlock ( - -int streamId ) - void RtAudio::startStream  )  [inline]
@@ -640,21 +583,22 @@ int streamId )

-Queries a stream to determine whether a call to the tickStream() method will block. +Public method which starts a stream.

-A return value of 0 indicates that the stream will NOT block. A positive return value indicates the number of sample frames that cannot yet be processed without blocking.

-


Member Data Documentation

-

- +

+

- - -
+ - + + + + +
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT8 [static] - void RtAudio::stopStream  )  [inline]
@@ -669,44 +613,22 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT8 [static]

-8-bit signed integer.

-

- - - - -
- - - - - -
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT16 [static] -
-
- - - - +An RtError will be thrown if a driver error occurs or if called when no stream is open.
-   - - +Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.

-16-bit signed integer.

-

- +

+

- - -
+ - + + + + +
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT24 [static] - void RtAudio::abortStream  )  [inline]
@@ -721,94 +643,18 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT24 [static]

-Upper 3 bytes of 32-bit signed integer.

-

- - - - -
- - - - - -
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT32 [static] -
-
- - - - - -
-   - - -

-32-bit signed integer.

-

- - - - -
- - - - - -
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT32 [static] -
-
- - - - - -
-   - - -

-Normalized between plus/minus 1.0.

-

- - - - -
- - - - - -
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT64 [static] -
-
- - - - +An RtError will be thrown if a driver error occurs or if called when no stream is open.
-   - - +Stop a stream, discarding any samples remaining in the input/output queue.

-Normalized between plus/minus 1.0.


The documentation for this class was generated from the following file:
-
- ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
- Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

+ +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
diff --git a/doc/html/classRtError-members.html b/doc/html/classRtError-members.html index e44e39e..85f42a3 100644 --- a/doc/html/classRtError-members.html +++ b/doc/html/classRtError-members.html @@ -7,20 +7,31 @@

Tutorial   Class/Enum List   File List   Compound Members  

- -

RtError Member List

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

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)RtError [inline, virtual]
getMessageString(void)RtError [inline, virtual]
getType(void)RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_STREAM enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void)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
~RtError(void)RtError [inline, virtual]

-
- ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
- Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

+ +
©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary@music.mcgill.ca
diff --git a/doc/html/classRtError.html b/doc/html/classRtError.html index b81582a..7301c2c 100644 --- a/doc/html/classRtError.html +++ b/doc/html/classRtError.html @@ -7,60 +7,122 @@

Tutorial   Class/Enum List   File List   Compound Members  

- -

RtError Class Reference

Exception handling class for RtAudio. + +

RtError Class Reference

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

-#include <RtAudio.h> +#include <RtError.h>

List of all members. + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +

Public Types

enum  TYPE {
-  WARNING, -DEBUG_WARNING, -UNSPECIFIED, -NO_DEVICES_FOUND, +
enum  Type {
+  WARNING, +DEBUG_WARNING, +UNSPECIFIED, +NO_DEVICES_FOUND,
-  INVALID_DEVICE, -INVALID_STREAM, -MEMORY_ERROR, -INVALID_PARAMETER, +  INVALID_DEVICE, +INVALID_STREAM, +MEMORY_ERROR, +INVALID_PARAMETER,
-  DRIVER_ERROR, -SYSTEM_ERROR, -THREAD_ERROR +  DRIVER_ERROR, +SYSTEM_ERROR, +THREAD_ERROR
}
 Defined RtError types.


Public Methods

RtError (const char *p, TYPE tipe=RtError::UNSPECIFIED)
 The constructor.

-virtual ~RtError (void)
 The destructor.

-virtual void printMessage (void)
 Prints "thrown" error message to stdout.

-virtual const TYPEgetType (void)
 Returns the "thrown" error message TYPE.

-virtual const char* getMessage (void)
 Returns the "thrown" error message string.

 Defined RtError types. More...


Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED)
 The constructor.

+virtual ~RtError (void)
 The destructor.

+virtual void printMessage (void)
 Prints thrown error message to stderr.

+virtual const TypegetType (void)
 Returns the thrown error message type.

+virtual const std::string & getMessage (void)
 Returns the thrown error message string.

+virtual const char * getMessageString (void)
 Returns the thrown error message as a C string.


Detailed Description

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

-The RtError class is quite simple but it does allow errors to be "caught" by RtError::TYPE. Almost all RtAudio methods can "throw" an RtError, most typically if an invalid stream identifier is supplied to a method or a driver error occurs. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a private RtAudio method, error(), which can be modified to globally control how these messages are handled and reported. +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

+

+ + + + +
+ + +
enum RtError::Type +
+
+ + + + + +
+   + + +

+Defined RtError types. +

+

Enumeration values:
+ + + + + + + + + + + + +
WARNING  +A non-critical error.
DEBUG_WARNING  +A non-critical error which might be useful for debugging.
UNSPECIFIED  +The default, unspecified error type.
NO_DEVICES_FOUND  +No devices found on system.
INVALID_DEVICE  +An invalid device ID was specified.
INVALID_STREAM  +An invalid stream ID was specified.
MEMORY_ERROR  +An error occured during memory allocation.
INVALID_PARAMETER  +An invalid parameter was specified to a function.
DRIVER_ERROR  +A system driver error occured.
SYSTEM_ERROR  +A system error occured.
THREAD_ERROR  +A thread error occured.
+
+


The documentation for this class was generated from the following file: +
  • RtError.h
    -
    - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
    - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

    + +
    ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
    + Maintained by Gary P. Scavone, gary@music.mcgill.ca
    diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index 7f8e5b8..a89dd24 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,20 +1,169 @@ -H1 { text-align: center; } -A.qindex {} -A.qindexRef {} +H1 { + text-align: center; + font-family: Arial, Helvetica, sans-serif; +} +H2 { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +CAPTION { font-weight: bold } +DIV.qindex { width: 100%; + background-color: #eeeeff; + border: 4px solid #eeeeff; + text-align: center; + margin-bottom: 2px +} +A.qindex { text-decoration: none; font-weight: bold; color: #0000ee } +A.qindex:visited { text-decoration: none; font-weight: bold; color: #0000ee } +A.qindex:hover { text-decoration: none; background-color: #ddddff } +A.qindexHL { text-decoration: none; font-weight: bold; + background-color: #6666cc; + color: #ffffff + } +A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } +A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #eeeeee } -DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } -TD.md { background-color: #f2f2ff } -DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } -DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } -FONT.keyword { color: #008000 } -FONT.keywordtype { color: #604020 } -FONT.keywordflow { color: #e08000 } -FONT.comment { color: #800000 } -FONT.preprocessor { color: #806020 } -FONT.stringliteral { color: #002080 } -FONT.charliteral { color: #008080 } +DIV.fragment { + width: 98%; + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + padding-left: 4px; + margin: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #f2f2ff; font-weight: bold; } +TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } +TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } +DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #eeeeff; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px +} +TD.indexvalue { + background-color: #eeeeff; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #f2f2ff; +} +.mdRow { + padding: 8px 20px; +} +.mdescLeft { + font-size: smaller; + font-family: Arial, Helvetica, sans-serif; + background-color: #FAFAFA; + padding-left: 8px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + font-size: smaller; + font-family: Arial, Helvetica, sans-serif; + font-style: italic; + background-color: #FAFAFA; + padding-left: 4px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; + padding-bottom: 0px; + padding-right: 8px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 12px; +} +.memItemRight { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 13px; +} +.search { color: #0000ee; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #eeeeff; +} +TD.tiny { font-size: 75%; +} diff --git a/doc/html/doxygen.gif b/doc/html/doxygen.gif deleted file mode 100644 index 192c83ce05078f6475c1e81290fdadded6d25467..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2378 zcmV-Q3AOe|Nk%w1VQv650OtSz|Nr8jARx9SCIA26|Nq?I-^TyU%-^!I{`}Lwzp4NK z!AJl$=%to{Pn!Dk|EsHq~G7iKRhfS z91pmqSoh+E_1twJ9~uAt+rPi6_u+;4>Y>o9Ci2iy|NPV1&W%7nHQd#u_u_{7@UK2Q zC_q3tKtMO!(wV!kc>C|K*1%`_>!ID+u=e4G1Ox;A{M1}gCc3O{-`~UU#x(HCLb<7A z|Nh(_8x0>E5g#2C_1$(`Q6}BmuleerKRqwCoITdTXWY`6`s<+8yjR)DfImJmJ~}1- z_{iGMj36K!_vVw=#&tb69{caE{rSkgy`H408y_AP9~%w7zokGx zIN#j4{Pn%`)@AzYq1efR@XJEq-oPFh2KL-_zrU#1#&y=fX7}cj@ybHdvO2!LoQBU|vkZw|@5Fh4$iw4-E!FJ}bVvm)y~rJv0@)w~d&FKADM1?!`1GB^lw+ zgkWG&J~<&iI3ZwPPeepJ?#4A98VdH^cH7dJwVXcO(wK#985kE3(5)_$d?@b5G(0pF z-Py0>vxI<15b0p7VOf*ylGM zmLI?j=JM6&Sb2uIr(S>pw!{Zp1AH*R0}wXI)(37e!QcQ)L?|H>^(@HXT5K_4NXSa)9_?J1IWMk&ArPV+x2A*5hJ`3_9pmOL-8$fD8EQ1jLAnDWmYz6G0N0&Y^=Ub09#f zrBqo_fe00ta6$|mArZp~(TZ?FJdDM+T!|MGV&>46PA|-ed&|C`>Sc3M6#o z&JGh$K*0|6P@wS+Bp~r92`Y$8!7BA&v4hDd&_RJD9dks2B&SS}G0m%B!BHnZQ$R~7 z#mH}6d}F_8m!*E21V3xh%3P) zk_-Am)RV*O8XPjk6k;3?Jnt<<0>J_cAj1MUzyU7^5CZ?ZLp_!Nzy zXPBNRY=8&;8+ZW^I=};Gbl`_HNJc%XaD*e$paVxZf&-@Lhbr{pi7!|KH@Z=V7rfvI z8+bxJq%g)c2$2VC_zNnY&<9F9F^Dtd$P=8{0UG=;h-IipACCA8LP$Xhgm}RQI`D!# zI;0+jZ~zRZC=LgVVu}tRf(zI6VIArP_%gcG0&hC%iG@i_P4+du5gD-+~OMdxX4Yea+k~8<~sMeQwazFJ2OgsC;$Ke diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png new file mode 100644 index 0000000000000000000000000000000000000000..96ae72c2978be48bb081e0795f5e9a5d6905a5b9 GIT binary patch literal 2352 zcmaJ@XHXM}5)Mc=AW}p^5e%RSEsY{YdPy*fgck593B?GZMk&IDB6^_&r6UR=V1t07 zqDYYB{P-jdO973>Gf8e9NRM)Dp)o!g0qM<4Vj=zPe@|Dq666;okhst+uYS@xk zAe#!=^Zln?PyVKr%6E;`S(kqWY=*HsfA1V;)fhQ<$CMos^=cI}FxoX8aHZD(`7N&D z>eW}uY`q&yA(Aq{v|hyY~*BV!IpRizEa^A zSwUf5fG8o|FrCa?7W_ZsbCSbIMfvD5rc2)xa_CE)&3MK>PdiZzPSx=EY{5R=Lw9$W zFB~Q4-_erioglSItWbyFcScK%P|Bx2nok_;7V~gL{^sw)Hmw`$rsv1K}`8Yt2#c0pX2g5sO;y1o~4%iuIyi#qw zFm*RC`MvCuf!1<4v?T_#Q{Sw>Dv=96=Qk`bvEfC+V}+C_G!9f5qp+Mfqpdo&v-7X2 zEsjl=2Zs2jpeR3I^jOrC#EnCRYK7ykw~Y<^$KBzQ$j?=wli)Z_dg%f@3mh@mn~ zY-rW-_)2Tp)x!)>H?E^r>=E{}#T=G-CW-@osY zch;71#~zaaQaCN&u+y;iqyJD$efQ0`ds~0bG7EEg?iz@?@KkW>xdI>kcON*eM-mkj z{Hg4Mq|yM@aKlnN8Ad!tqDiW7k~_vI0!L4-1Z&Wup7|~d>#qjJ0-uA&ia#r&mdx8v zh{Ysj=iMgA&&1A@moF|nsz(e)_;Uiol|tq()vU(gqOB|ji;{rH_>zyt2xSg9h+h{C zv+F5Xy#5KK7P)%}Ck#D|^?1V$N)szVm7J2X#m+w(imL|lM%~vBw^Q~q$CrnXoTf$H zzF~>!<$mS2O?lzwP|kfiF}g8jcl3mUEgkkkh%w!KZMvAFF9^}~ej@k#Gd^V_{0z7E zlS6D1*YZT=yhuXqJ9{VQ#HEDN*DR$8sI6F7<;IiQSrcoeN7g_o#?!`Af^b9`2;50K zitSJI72p0Sb8pZ7DS_NNl_sYR+va{vYOi<{J}UY2dXxVnRvC@qh1F8VTgYH6vT~(% zZ2N{=>^>N0x=jb@(&D^o^RLm}($~_;&Kub{C2Xfmah^5anC-b6$;BEl3*$8jem8}c z3*MM|I(n@y9TAF*ctIWJT!UQdUmM^y{K3@8sQJdNrafkJtINN7ONa1e;w?Mt{_JhM zvRka(c#HYT@E0V`S6xwQ!o-vU4DQhKh-)xd(lG?l6971ya~`Kg%#4-Zl9lG!@VLCj zn%e5Mm!q<2O$UGcRpXu>y%9VED_L9OY%qWuy3i~< z+emnMRoLY#-xm~rEgRP6atqF;dvM1{=%Q7NcKcBg&Z1l zV~6}Z`XPV+=bsYaz2&oFCc3ZEn}yXbvh;enHYUk;@jUTd(xG51%O-4mi-__eW*D%0++`&?dm# zPd_nXLUL4%gBDan;34>)_!5SOs{V7u1HVyR7H*pVx$aUUgqXX95@2i(7j1|H^I|!M zS3hU81OfgU9~=o25UZE}Kn~T?I2_2;b7HMR`%*)h);W}}SN$d(wjY3w22CPf3pSEK z`@JL}GUw`L^lZx+{KurgBTG8o(X~G|(-<9c9%;J8&^(JEc$Oi*N?=TC)Lzw#&F7Nl zHQB3u-YV(8aQrkAK!U7fLifRwqTWQcQt+0@;kmR<&^uK8n9YK;XTuDH?XY{HL*v09 z8svU;%Hhy$AH9$^e+pAEde;2I<;K%f*-dV3{IarZHE-WX1+D)GFP8KnOsc_^ z6q~mV=laSj_m1;^5X}%ECLfW5I$=E3`=TMVtLt?(a30*5=_&F*bvhx?FF`d>rP;x^MFfsMbkCxS5D-e^%!V{JsKKS`i`&ka` z-g#uQghXfa@Au4JFJ6eWrAEFVsOiW@X;hgN@VQgD2(fD=RxXatsl;WS2C1NQ5IP1br%vg@40K^|6=DP_ zk`iN1j)|m@h&uj}I)0bKLPIDz#87e&KcIbI4*IVgDKNyBa(Q1*52cUvH89j85a4h> zq`m Tutorial   Class/Enum List   File List   Compound Members  


    - -

    RtAudio File List

    Here is a list of all documented files with brief descriptions: + +

    RtAudio File List

    Here is a list of all documented files with brief descriptions: + + +
    RtAudio.h [code]
    RtError.h [code]

    -
    - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
    - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

    + +
    ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
    + Maintained by Gary P. Scavone, gary@music.mcgill.ca
    diff --git a/doc/html/functions.html b/doc/html/functions.html index 5da0499..f360f94 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -7,53 +7,97 @@

    Tutorial   Class/Enum List   File List   Compound Members  

    - -

    RtAudio Compound Members

    Here is a list of all documented class members with links to the classes they belong to:
      + + +
      a | c | d | g | i | l | m | n | o | p | r | s | t | u | w | ~
      + +

      + +

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

      - a -

      +

      - c -

      +

      - d -

      +

      - g -

      +

      - i -

      +

      - l -

      +

      - m -

      +

      - n -

      +

      - o -

      +

      - p -

      +

      - r -

      +

      - s -

      +

      - t -

      +

      - u -

      +

      - w -

      +

      - ~ -


      -
      - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
      - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

      + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html new file mode 100644 index 0000000..7c5672a --- /dev/null +++ b/doc/html/functions_enum.html @@ -0,0 +1,26 @@ + + +The RtAudio Tutorial + + + +

      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + + + +

      +

      +
      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html new file mode 100644 index 0000000..6750f37 --- /dev/null +++ b/doc/html/functions_eval.html @@ -0,0 +1,42 @@ + + +The RtAudio Tutorial + + + +
      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + + + +

      +

      +
      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html new file mode 100644 index 0000000..faa8a6a --- /dev/null +++ b/doc/html/functions_func.html @@ -0,0 +1,43 @@ + + +The RtAudio Tutorial + + + +
      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + + + +

      +

      +
      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html new file mode 100644 index 0000000..442d884 --- /dev/null +++ b/doc/html/functions_vars.html @@ -0,0 +1,32 @@ + + +The RtAudio Tutorial + + + +
      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + + + +

      +

      +
      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/index.html b/doc/html/index.html index 5567502..7de36f6 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -7,611 +7,566 @@
      Tutorial   Class/Enum List   File List   Compound Members  

      - -

      The RtAudio Tutorial

      -

      - -

      -

      -

      Introduction

      - -

      -RtAudio is a C++ class which provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), Macintosh OS X, SGI, and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: + +

      The RtAudio Tutorial

      +

      Introduction    What's New (Version 3.0)   Download    Getting Started    Error Handling    Probing Device Capabilities    Device Settings    Playback (blocking functionality)    Playback (callback functionality)    Recording    Duplex Mode    Using Simultaneous Multiple APIs    Summary of Methods    Compiling    Debugging    API Notes    Acknowledgements    License

      +Introduction

      +RtAudio is a set of C++ classes which provide a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, and OSS), Macintosh OS X, SGI, and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals:

        -
      • object oriented C++ design
      • simple, common API across all supported platforms
      • single independent header and source file for easy inclusion in programming projects
      • blocking functionality
      • callback functionality
      • extensive audio device parameter control
      • audio device capability probing
      • automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping
      • control over multiple audio streams and devices with a single instance
      - -

      -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. When allowed by the underlying audio API, multiple streams can run at the same time and a single device can serve multiple streams. See the OS Notes section for information specific to each of the supported audio APIs. -

      -The RtAudio API provides both blocking (synchronous) and callback (asyncronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events. -

      -

      Download

      - -

      -Latest Release (24 October 2002): Version 2.1.1 (165 kB tar/gzipped) -

      -

      Getting Started

      - -

      -The first thing that must be done when using RtAudio is to create an instance of the class. The default constructor RtAudio::RtAudio() scans the underlying audio system to verify that at least one device is available. RtAudio often uses C++ exceptions to report errors, necessitating try/catch blocks around most member functions. The following code example demonstrates default object construction and destruction: -

      -

      #include "RtAudio.h"
      -
      -int main()
      -{
      +
    • +object oriented C++ design
    • +
    • +simple, common API across all supported platforms
    • +
    • +only two header files and one source file for easy inclusion in programming projects
    • +
    • +allow simultaneous multi-api support
    • +
    • +blocking functionality
    • +
    • +callback functionality
    • +
    • +extensive audio device parameter control
    • +
    • +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.

      +The RtAudio API provides both blocking (synchronous) and callback (asynchronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events.

      +What's New (Version 3.0)

      +RtAudio now allows simultaneous multi-api support. For example, you can compile RtAudio to provide both DirectSound and ASIO support on Windows platforms or ALSA, JACK, and OSS support on Linux platforms. This was accomplished by creating an abstract base class, RtApi, with subclasses for each supported API (RtApiAlsa, RtApiJack, RtApiOss, RtApiDs, RtApiAsio, RtApiCore, and RtApiAl). The class RtAudio is now a "controller" which creates an instance of an RtApi subclass based on the user's API choice via an optional RtAudio::RtAudioApi instantiation argument. If no API is specified, RtAudio attempts to make a "logical" API selection.

      +Support for the JACK low-latency audio server has been added with this version of RtAudio. It is necessary to have the JACK server running before creating an instance of RtAudio.

      +Several API changes have been made in version 3.0 of RtAudio in an effort to provide more consistent behavior across all supported audio APIs. The most significant of these changes is that multiple stream support from a single RtAudio instance has been discontinued. As a result, stream identifier input arguments are no longer required. Also, the RtAudio::streamWillBlock() function was poorly supported by most APIs and has been deprecated (though the function still exists in those subclasses of RtApi that do allow it to be implemented).

      +The RtAudio::getDeviceInfo() function was modified to return a globally defined RtAudioDeviceInfo structure. This structure is a simplified version of the previous RTAUDIO_DEVICE structure. In addition, the RTAUDIO_FORMAT structure was renamed RtAudioFormat and defined globally within RtAudio.h. These changes were made for clarity and to better conform with standard C++ programming practices.

      +The RtError class declaration and definition have been extracted to a separate file (RtError.h). This was done in preparation for a new release of the RtMidi class (planned for Summer 2004).

      +Download

      +Latest Release (11 March 2004): Version 3.0 (200 kB tar/gzipped)

      +Getting Started

      +With version 3.0, it is now possible to compile multiple API support on a given platform and to specify an API choice during class instantiation. In the examples that follow, no API will be specified (in which case, RtAudio attempts to select the most "logical" available API).

      +The first thing that must be done when using RtAudio is to create an instance of the class. The default constructor scans the underlying audio system to verify that at least one device is available. RtAudio often uses C++ exceptions to report errors, necessitating try/catch blocks around most member functions. The following code example demonstrates default object construction and destruction:

      +

      #include "RtAudio.h"
      +
      +int main()
      +{
         RtAudio *audio;
       
      -  // Default RtAudio constructor
      -  try {
      -    audio = new RtAudio();
      +  // Default RtAudio constructor
      +  try {
      +    audio = new RtAudio();
         }
      -  catch (RtError &error) {
      -    // Handle the exception here
      +  catch (RtError &error) {
      +    // Handle the exception here
      +    error.printMessage();
         }
       
      -  // Clean up
      -  delete audio;
      -}
      -

      -Obviously, this example doesn't demonstrate any of the real functionality of RtAudio. However, all uses of RtAudio must begin with a constructor (either default or overloaded varieties) and must end with class destruction. Further, it is necessary that all class methods which can throw a C++ exception be called within a try/catch block. -

      -

      Error Handling

      - -

      -RtAudio uses a C++ exception handler called RtError, which is declared and defined within the RtAudio class files. The RtError class is quite simple but it does allow errors to be "caught" by RtError::TYPE. Almost all RtAudio methods can "throw" an RtError, most typically if an invalid stream identifier is supplied to a method or a driver error occurs. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a private RtAudio method, error(), which can be modified to globally control how these messages are handled and reported. -

      -

      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. -

      -

      // probe.cpp
      -
      -#include <iostream>
      -#include "RtAudio.h"
      -
      -int main()
      -{
      +  // Clean up
      +  delete audio;
      +}
      +

      +Obviously, this example doesn't demonstrate any of the real functionality of RtAudio. However, all uses of RtAudio must begin with a constructor (either default or overloaded varieties) and must end with class destruction. Further, it is necessary that all class methods which can throw a C++ exception be called within a try/catch block.

      +Error Handling

      +RtAudio uses a C++ exception handler called RtError, which is declared and defined in RtError.h. The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. Almost all RtAudio methods can "throw" an RtError, most typically if a driver error occurs or a stream function is called when no stream is open. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a protected RtAudio method, error(), which can be modified to globally control how these messages are handled and reported. By default, error messages are not automatically displayed in RtAudio unless the preprocessor definition __RTAUDIO_DEBUG__ is defined. Messages associated with caught exceptions can be displayed with, for example, the RtError::printMessage() function.

      +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.

      +

      // probe.cpp
      +
      +#include <iostream>
      +#include "RtAudio.h"
      +
      +int main()
      +{
         RtAudio *audio;
       
      -  // Default RtAudio constructor
      -  try {
      -    audio = new RtAudio();
      +  // Default RtAudio constructor
      +  try {
      +    audio = new RtAudio();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  // Determine the number of devices available
      -  int devices = audio->getDeviceCount();
      +  // Determine the number of devices available
      +  int devices = audio->getDeviceCount();
       
      -  // Scan through devices for various capabilities
      -  RtAudio::RTAUDIO_DEVICE info;
      -  for (int i=1; i<=devices; i++) {
      +  // Scan through devices for various capabilities
      +  RtAudioDeviceInfo info;
      +  for (int i=1; i<=devices; i++) {
       
      -    try {
      -      audio->getDeviceInfo(i, &info);
      +    try {
      +      info = audio->getDeviceInfo(i);
           }
      -    catch (RtError &error) {
      +    catch (RtError &error) {
             error.printMessage();
      -      break;
      +      break;
           }
       
      -    // Print, for example, the maximum number of output channels for each device
      -    cout << "device = " << i;
      -    cout << ": maximum output channels = " << info.maxOutputChannels << "\n";
      +    // Print, for example, the maximum number of output channels for each device
      +    std::cout << "device = " << i;
      +    std::cout << ": maximum output channels = " << info.outputChannels << "\n";
         }
       
      -  // Clean up
      -  delete audio;
      -
      -  return 0;
      -}
      -

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

      -

        typedef struct {
      -    char name[128];
      -    bool probed;                          // true if the device probe was successful.
      -    int maxOutputChannels;
      -    int maxInputChannels;
      -    int maxDuplexChannels;
      -    int minOutputChannels;
      -    int minInputChannels;
      -    int minDuplexChannels;
      -    bool hasDuplexSupport;                // true if duplex mode is supported.
      -    bool isDefault;                       // true if this is the default output or input device.
      -    int nSampleRates;                     // Number of discrete rates, or -1 if range supported.
      -    double sampleRates[MAX_SAMPLE_RATES]; // Supported sample rates, or {min, max} if range.
      -    RTAUDIO_FORMAT nativeFormats;
      -  } RTAUDIO_DEVICE;
      -

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

      -

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

      -The nativeFormats member of the RtAudio::RTAUDIO_DEVICE 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_DEVICE structure is false, the remaining structure members are undefined and the device is probably unuseable. -

      -In general, the user need not be concerned with the minimum channel values reported in the RTAUDIO_DEVICE structure. While some audio devices may require a minimum channel value > 1, 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 reported values when attempting to open a stream. -

      -

      Device Settings

      + // Clean up + delete audio; -

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

      -

      #include "RtAudio.h"
      -
      -int main()
      -{
      -  int channels = 2;
      -  int sample_rate = 44100;
      -  int buffer_size = 256;  // 256 sample frames
      -  int n_buffers = 4;      // number of internal buffers used by device
      -  int device = 0;         // 0 indicates the default or first available device
      -  int stream;             // our stream identifier
      +  return 0;
      +}
      +

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

      +

        typedef struct RtAudioDeviceInfo{
      +    std::string name;             // Character string device identifier.
      +    bool probed;                  // true if the device capabilities were successfully probed.
      +    int outputChannels;           // Maximum output channels supported by device.
      +    int inputChannels;            // Maximum input channels supported by device.
      +    int duplexChannels;           // Maximum simultaneous input/output channels supported by device.
      +    bool isDefault;               // true if this is the default output or input device.
      +    std::vector<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 (upper 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 RtAudioDeviceInfo 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 RtAudioDeviceInfo structure is false, the remaining structure members are undefined and the device is probably unuseable.

      +While 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 typically rely on the queried values when attempting to open a stream.

      +Device Settings

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

      +

      #include "RtAudio.h"
      +
      +int main()
      +{
      +  int channels = 2;
      +  int sampleRate = 44100;
      +  int bufferSize = 256;  // 256 sample frames
      +  int nBuffers = 4;      // number of internal buffers used by device
      +  int device = 0;        // 0 indicates the default or first available device
         RtAudio *audio;
       
      -  // Instantiate RtAudio and open a stream within a try/catch block
      -  try {
      -    audio = new RtAudio();
      -    stream = audio->openStream(device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32,
      -                               sample_rate, &buffer_size, n_buffers);
      +  // Instantiate RtAudio and open a stream within a try/catch block
      +  try {
      +    audio = new RtAudio();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  // Clean up
      -  delete audio;
      +  try {
      +    audio->openStream(device, channels, 0, 0, RTAUDIO_FLOAT32,
      +                      sampleRate, &bufferSize, nBuffers);
      +  }
      +  catch (RtError &error) {
      +    error.printMessage();
      +    // Perhaps try other parameters?
      +  }
       
      -  return 0;
      -}
      -

      -The RtAudio::openStream() method attempts to open a stream with a specified set of parameter values. When successful, a stream identifier is returned. In this case, we attempt to open a two channel playback stream with the default output device, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, RtAudio first attempts to open the default audio device with the given parameters. If that attempt fails, RtAudio searches through the remaining available devices in an effort to find a device which will meet the given parameters. If all attempts are unsuccessful, an RtError is thrown. When a non-zero device value is specified, an attempt is made to open that device only (device = 1 specifies the first identified device, as reported by RtAudio::getDeviceInfo()). -

      -RtAudio provides four signed integer and two floating point data formats which can be specified using the RtAudio::RTAUDIO_FORMAT 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 bufferSize parameter specifies the desired number of sample frames which will be written to and/or read from a device per write/read operation. The nBuffers parameter is used in setting the underlying device buffer parameters. Both the bufferSize and nBuffers parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device (the nBuffers parameter is ignored when using the OS X CoreAudio and the Windows ASIO APIs). In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The bufferSize parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. bufferSize values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the OS Notes section for general guidelines. -

      -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. -

      -

      Playback (blocking functionality)

      + // Clean up + delete audio; -

      -Once the device is open for playback, there are only a few final steps necessary for realtime audio output. We'll first provide an example (blocking functionality) and then discuss the details. -

      -

      // playback.cpp
      -
      -#include "RtAudio.h"
      -
      -int main()
      -{
      -  int count;
      -  int channels = 2;
      -  int sample_rate = 44100;
      -  int buffer_size = 256;  // 256 sample frames
      -  int n_buffers = 4;      // number of internal buffers used by device
      -  float *buffer;
      -  int device = 0;         // 0 indicates the default or first available device
      -  int stream;             // our stream identifier
      +  return 0;
      +}
      +

      +The RtAudio::openStream() method attempts to open a stream with a specified set of parameter values. In this case, we attempt to open a two channel playback stream with the default output device, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, RtAudio first attempts to open the default audio device with the given parameters. If that attempt fails, RtAudio searches through the remaining available devices in an effort to find a device which will meet the given parameters. If all attempts are unsuccessful, an RtError is thrown. When a non-zero device value is specified, an attempt is made to open that device ONLY (device = 1 specifies the first identified device, as reported by RtAudio::getDeviceInfo()).

      +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 bufferSize parameter specifies the desired number of sample frames which will be written to and/or read from a device per write/read operation. The nBuffers parameter is used in setting the underlying device buffer parameters. Both the bufferSize and nBuffers parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device (the nBuffers parameter is ignored when using the OS X CoreAudio, Linux Jack, and the Windows ASIO APIs). In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The bufferSize parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. bufferSize values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the API Notes section for general guidelines.

      +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.

      +Playback (blocking functionality)

      +Once the device is open for playback, there are only a few final steps necessary for realtime audio output. We'll first provide an example (blocking functionality) and then discuss the details.

      +

      // playback.cpp
      +
      +#include "RtAudio.h"
      +
      +int main()
      +{
      +  int count;
      +  int channels = 2;
      +  int sampleRate = 44100;
      +  int bufferSize = 256;  // 256 sample frames
      +  int nBuffers = 4;      // number of internal buffers used by device
      +  float *buffer;
      +  int device = 0;        // 0 indicates the default or first available device
         RtAudio *audio;
       
      -  // Open a stream during RtAudio instantiation
      -  try {
      -    audio = new RtAudio(&stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32,
      -                        sample_rate, &buffer_size, n_buffers);
      +  // Open a stream during RtAudio instantiation
      +  try {
      +    audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT32,
      +                        sampleRate, &bufferSize, nBuffers);
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  try {
      -    // Get a pointer to the stream buffer
      -    buffer = (float *) audio->getStreamBuffer(stream);
      +  try {
      +    // Get a pointer to the stream buffer
      +    buffer = (float *) audio->getStreamBuffer();
       
      -    // Start the stream
      -    audio->startStream(stream);
      +    // Start the stream
      +    audio->startStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
      -    goto cleanup;
      +    goto cleanup;
         }
       
      -  // An example loop which runs for about 40000 sample frames
      +  // An example loop which runs for 40000 sample frames
         count = 0;
      -  while (count < 40000) {
      -    // Generate your samples and fill the buffer with buffer_size sample frames of data
      +  while (count < 40000) {
      +    // Generate your samples and fill the buffer with bufferSize sample frames of data
           ...
       
      -    // Trigger the output of the data buffer
      -    try {
      -      audio->tickStream(stream);
      +    // Trigger the output of the data buffer
      +    try {
      +      audio->tickStream();
           }
      -    catch (RtError &error) {
      +    catch (RtError &error) {
             error.printMessage();
      -      goto cleanup;
      +      goto cleanup;
           }
       
      -    count += buffer_size;
      +    count += bufferSize;
         }
       
      -  try {
      -    // Stop and close the stream
      -    audio->stopStream(stream);
      -    audio->closeStream(stream);
      +  try {
      +    // Stop and close the stream
      +    audio->stopStream();
      +    audio->closeStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
         }
       
        cleanup:
      -  delete audio;
      -
      -  return 0;
      -}
      -

      -The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the RtAudio::openStream() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. The integer identifier of the opened stream is returned via the stream pointer value. An attempt is made to open the stream with the specified bufferSize value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the RtAudio destructor if an exception is thrown during instantiation. -

      -Because RtAudio can typically be used to simultaneously control more than a single stream, it is necessary that the stream identifier be provided to nearly all public methods. Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by RtAudio, for use in feeding data to/from the opened stream. Note that the user should NOT attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by RtAudio. After starting the stream with RtAudio::startStream(), one simply fills that buffer, which is of length equal to the returned bufferSize value, with interleaved audio data (in the specified format) for playback. Finally, a call to the RtAudio::tickStream() routine triggers a blocking write call for the stream. -

      -In general, one should call the RtAudio::stopStream() and RtAudio::closeStream() methods after finishing with a stream. However, both methods will implicitly be called during object destruction if necessary. -

      -

      Playback (callback functionality)

      + delete audio; -

      -The primary difference in using RtAudio with callback functionality involves the creation of a user-defined callback function. Here is an example which produces a sawtooth waveform for playback. -

      -

      #include <iostream>
      -#include "RtAudio.h"
      -
      -// Two-channel sawtooth wave generator.
      -int sawtooth(char *buffer, int buffer_size, void *data)
      -{
      -  int i, j;
      -  double *my_buffer = (double *) buffer;
      -  double *my_data = (double *) data;
      -
      -  // Write interleaved audio data.
      -  for (i=0; i<buffer_size; i++) {
      -    for (j=0; j<2; j++) {
      +  return 0;
      +}
      +

      +The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the RtAudio::openStream() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. An attempt is made to open the stream with the specified bufferSize value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the RtAudio destructor if an exception is thrown during instantiation.

      +Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by RtAudio, for use in feeding data to/from the opened stream. Note that the user should NOT attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by RtAudio. After starting the stream with RtAudio::startStream(), one simply fills that buffer, which is of length equal to the returned bufferSize value, with interleaved audio data (in the specified format) for playback. Finally, a call to the RtAudio::tickStream() routine triggers a blocking write call for the stream.

      +In general, one should call the RtAudio::stopStream() and RtAudio::closeStream() methods after finishing with a stream. However, both methods will implicitly be called during object destruction if necessary.

      +Playback (callback functionality)

      +The primary difference in using RtAudio with callback functionality involves the creation of a user-defined callback function. Here is an example which produces a sawtooth waveform for playback.

      +

      #include <iostream>
      +#include "RtAudio.h"
      +
      +// Two-channel sawtooth wave generator.
      +int sawtooth(char *buffer, int bufferSize, void *data)
      +{
      +  int i, j;
      +  double *my_buffer = (double *) buffer;
      +  double *my_data = (double *) data;
      +
      +  // Write interleaved audio data.
      +  for (i=0; i<bufferSize; i++) {
      +    for (j=0; j<2; j++) {
             *my_buffer++ = my_data[j];
       
             my_data[j] += 0.005 * (j+1+(j*0.1));
      -      if (my_data[j] >= 1.0) my_data[j] -= 2.0;
      +      if (my_data[j] >= 1.0) my_data[j] -= 2.0;
           }
         }
       
      -  return 0;
      +  return 0;
       }
       
      -int main()
      -{
      -  int channels = 2;
      -  int sample_rate = 44100;
      -  int buffer_size = 256;  // 256 sample frames
      -  int n_buffers = 4;      // number of internal buffers used by device
      -  int device = 0;         // 0 indicates the default or first available device
      -  int stream;             // our stream identifier
      -  double data[2];
      -  char input;
      +int main()
      +{
      +  int channels = 2;
      +  int sampleRate = 44100;
      +  int bufferSize = 256;  // 256 sample frames
      +  int nBuffers = 4;      // number of internal buffers used by device
      +  int device = 0;        // 0 indicates the default or first available device
      +  double data[2];
      +  char input;
         RtAudio *audio;
       
      -  // Open a stream during RtAudio instantiation
      -  try {
      -    audio = new RtAudio(&stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT64,
      -                        sample_rate, &buffer_size, n_buffers);
      +  // Open a stream during RtAudio instantiation
      +  try {
      +    audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT64,
      +                        sampleRate, &bufferSize, nBuffers);
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  try {
      -    // Set the stream callback function
      -    audio->setStreamCallback(stream, &sawtooth, (void *)data);
      +  try {
      +    // Set the stream callback function
      +    audio->setStreamCallback(&sawtooth, (void *)data);
       
      -    // Start the stream
      -    audio->startStream(stream);
      +    // Start the stream
      +    audio->startStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
      -    goto cleanup;
      +    goto cleanup;
         }
       
      -  cout << "\nPlaying ... press <enter> to quit.\n";
      -  cin.get(input);
      +  std::cout << "\nPlaying ... press <enter> to quit.\n";
      +  std::cin.get(input);
       
      -  try {
      -    // Stop and close the stream
      -    audio->stopStream(stream);
      -    audio->closeStream(stream);
      +  try {
      +    // Stop and close the stream
      +    audio->stopStream();
      +    audio->closeStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
         }
       
        cleanup:
      -  delete audio;
      -
      -  return 0;
      -}
      -

      -After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using RtAudio::setStreamCallback(). When the underlying audio API uses blocking calls (OSS, ALSA, SGI, and Windows DirectSound), this method will spawn a new process (or thread) which automatically calls the callback function when more data is needed. Callback-based audio APIs (OS X CoreAudio and ASIO) implement their own event notification schemes. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() methods). The last argument to RtAudio::setStreamCallback() is a pointer to arbitrary data that you wish to access from within your callback function. -

      -In this example, we stop the stream with an explicit call to RtAudio::stopStream(). When using callback functionality, it is also possible to stop a stream by returning a non-zero value from the callback function. -

      -Once set with RtAudio::setStreamCallback, the callback process exists for the life of the stream (until the stream is closed with RtAudio::closeStream() or the RtAudio instance is deleted). It is possible to disassociate a callback function and cancel its process for an open stream using the RtAudio::cancelStreamCallback() method. The stream can then be used with blocking functionality or a new callback can be associated with it. -

      -

      Recording

      + delete audio; -

      -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: -

      -

      // record.cpp
      -
      -#include "RtAudio.h"
      -
      -int main()
      -{
      -  int count;
      -  int channels = 2;
      -  int sample_rate = 44100;
      -  int buffer_size = 256;  // 256 sample frames
      -  int n_buffers = 4;      // number of internal buffers used by device
      -  float *buffer;
      -  int device = 0;         // 0 indicates the default or first available device
      -  int stream;             // our stream identifier
      +  return 0;
      +}
      +

      +After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using RtAudio::setStreamCallback(). When the underlying audio API uses blocking calls (OSS, ALSA, SGI, and Windows DirectSound), this method will spawn a new process (or thread) which automatically calls the callback function when more data is needed. Callback-based audio APIs (OS X CoreAudio Linux Jack, and ASIO) implement their own event notification schemes. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() methods). The last argument to RtAudio::setStreamCallback() is a pointer to arbitrary data that you wish to access from within your callback function.

      +In this example, we stop the stream with an explicit call to RtAudio::stopStream(). When using callback functionality, it is also possible to stop a stream by returning a non-zero value from the callback function.

      +Once set with RtAudio::setStreamCallback, the callback process exists for the life of the stream (until the stream is closed with RtAudio::closeStream() or the RtAudio instance is deleted). It is possible to disassociate a callback function and cancel its process for an open stream using the RtAudio::cancelStreamCallback() method. The stream can then be used with blocking functionality or a new callback can be associated with it.

      +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:

      +

      // record.cpp
      +
      +#include "RtAudio.h"
      +
      +int main()
      +{
      +  int count;
      +  int channels = 2;
      +  int sampleRate = 44100;
      +  int bufferSize = 256;  // 256 sample frames
      +  int nBuffers = 4;      // number of internal buffers used by device
      +  float *buffer;
      +  int device = 0;        // 0 indicates the default or first available device
         RtAudio *audio;
       
      -  // Instantiate RtAudio and open a stream.
      -  try {
      -    audio = new RtAudio(&stream, 0, 0, device, channels,
      -                        RtAudio::RTAUDIO_FLOAT32, sample_rate, &buffer_size, n_buffers);
      +  // Instantiate RtAudio and open a stream.
      +  try {
      +    audio = new RtAudio(&stream, 0, 0, device, channels,
      +                        RTAUDIO_FLOAT32, sampleRate, &bufferSize, nBuffers);
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  try {
      -    // Get a pointer to the stream buffer
      -    buffer = (float *) audio->getStreamBuffer(stream);
      +  try {
      +    // Get a pointer to the stream buffer
      +    buffer = (float *) audio->getStreamBuffer();
       
      -    // Start the stream
      -    audio->startStream(stream);
      +    // Start the stream
      +    audio->startStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
      -    goto cleanup;
      +    goto cleanup;
         }
       
      -  // An example loop which runs for about 40000 sample frames
      +  // An example loop which runs for about 40000 sample frames
         count = 0;
      -  while (count < 40000) {
      +  while (count < 40000) {
       
      -    // Read a buffer of data
      -    try {
      -      audio->tickStream(stream);
      +    // Read a buffer of data
      +    try {
      +      audio->tickStream();
           }
      -    catch (RtError &error) {
      +    catch (RtError &error) {
             error.printMessage();
      -      goto cleanup;
      +      goto cleanup;
           }
       
      -    // Process the input samples (buffer_size sample frames) that were read
      +    // Process the input samples (bufferSize sample frames) that were read
           ...
       
      -    count += buffer_size;
      +    count += bufferSize;
         }
       
      -  try {
      -    // Stop the stream
      -    audio->stopStream(stream);
      +  try {
      +    // Stop the stream
      +    audio->stopStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
         }
       
        cleanup:
      -  delete audio;
      -
      -  return 0;
      -}
      -

      -In this example, the stream was opened for recording with a non-zero inputChannels value. The only other difference between this example and that for playback involves the order of data processing in the loop, where it is necessary to first read a buffer of input data before manipulating it. -

      -

      Duplex Mode

      - -

      -Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we use a callback function and simply scale the input data before sending it back to the output. -

      -

      // duplex.cpp
      -
      -#include <iostream>
      -#include "RtAudio.h"
      -
      -// Pass-through function.
      -int scale(char *buffer, int buffer_size, void *)
      -{
      -  // Note: do nothing here for pass through.
      -  double *my_buffer = (double *) buffer;
      +  delete audio;
       
      -  // Scale input data for output.
      -  for (int i=0; i<buffer_size; i++) {
      -    // Do for two channels.
      +  return 0;
      +}
      +

      +In this example, the stream was opened for recording with a non-zero inputChannels value. The only other difference between this example and that for playback involves the order of data processing in the loop, where it is necessary to first read a buffer of input data before manipulating it.

      +Duplex Mode

      +Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we use a callback function and simply scale the input data before sending it back to the output.

      +

      // duplex.cpp
      +
      +#include <iostream>
      +#include "RtAudio.h"
      +
      +// Pass-through function.
      +int scale(char *buffer, int bufferSize, void *)
      +{
      +  // Note: do nothing here for pass through.
      +  double *my_buffer = (double *) buffer;
      +
      +  // Scale input data for output.
      +  for (int i=0; i<bufferSize; i++) {
      +    // Do for two channels.
           *my_buffer++ *= 0.5;
           *my_buffer++ *= 0.5;
         }
       
      -  return 0;
      +  return 0;
       }
       
      -int main()
      -{
      -  int channels = 2;
      -  int sample_rate = 44100;
      -  int buffer_size = 256;  // 256 sample frames
      -  int n_buffers = 4;      // number of internal buffers used by device
      -  int device = 0;         // 0 indicates the default or first available device
      -  int stream;             // our stream identifier
      -  char input;
      +int main()
      +{
      +  int channels = 2;
      +  int sampleRate = 44100;
      +  int bufferSize = 256;  // 256 sample frames
      +  int nBuffers = 4;      // number of internal buffers used by device
      +  int device = 0;        // 0 indicates the default or first available device
      +  char input;
         RtAudio *audio;
       
      -  // Open a stream during RtAudio instantiation
      -  try {
      -    audio = new RtAudio(&stream, device, channels, device, channels, RtAudio::RTAUDIO_FLOAT64,
      -                        sample_rate, &buffer_size, n_buffers);
      +  // Open a stream during RtAudio instantiation
      +  try {
      +    audio = new RtAudio(device, channels, device, channels, RTAUDIO_FLOAT64,
      +                        sampleRate, &bufferSize, nBuffers);
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
           exit(EXIT_FAILURE);
         }
       
      -  try {
      -    // Set the stream callback function
      -    audio->setStreamCallback(stream, &scale, NULL);
      +  try {
      +    // Set the stream callback function
      +    audio->setStreamCallback(&scale, NULL);
       
      -    // Start the stream
      -    audio->startStream(stream);
      +    // Start the stream
      +    audio->startStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
      -    goto cleanup;
      +    goto cleanup;
         }
       
      -  cout << "\nRunning duplex ... press <enter> to quit.\n";
      -  cin.get(input);
      +  std::cout << "\nRunning duplex ... press <enter> to quit.\n";
      +  std::cin.get(input);
       
      -  try {
      -    // Stop and close the stream
      -    audio->stopStream(stream);
      -    audio->closeStream(stream);
      +  try {
      +    // Stop and close the stream
      +    audio->stopStream();
      +    audio->closeStream();
         }
      -  catch (RtError &error) {
      +  catch (RtError &error) {
           error.printMessage();
         }
       
        cleanup:
      -  delete audio;
      -
      -  return 0;
      -}
      -

      -When an RtAudio stream is running in duplex mode (nonzero input AND output channels), the audio write (playback) operation always occurs before the audio read (record) operation. This sequence allows the use of a single buffer to store both output and input data. -

      -As we see with this example, the write-read sequence of operations does not preclude the use of RtAudio in situations where input data is first processed and then output through a duplex stream. When the stream buffer is first allocated, it is initialized with zeros, which produces no audible result when output to the device. In this example, anything recorded by the audio stream input will be scaled and played out during the next round of audio processing. -

      -Note that duplex operation can also be achieved by opening one output stream and one input stream using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations, unless a common external "sync" is provided. This becomes even more difficult to achieve using two separate callback streams because it is not possible to explicitly control the calling order of the callback functions. -

      -

      Summary of Methods

      + delete audio; -

      -The following is short summary of public methods (not including constructors and the destructor) provided by RtAudio: -

      + return 0; +} +

      +When an RtAudio stream is running in duplex mode (nonzero input AND output channels), the audio write (playback) operation always occurs before the audio read (record) operation. This sequence allows the use of a single buffer to store both output and input data.

      +As we see with this example, the write-read sequence of operations does not preclude the use of RtAudio in situations where input data is first processed and then output through a duplex stream. When the stream buffer is first allocated, it is initialized with zeros, which produces no audible result when output to the device. In this example, anything recorded by the audio stream input will be scaled and played out during the next round of audio processing.

      +Note that duplex operation can also be achieved by opening one output stream instance and one input stream instance using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations, unless a common external "sync" is provided. This becomes even more difficult to achieve using two separate callback streams because it is not possible to explicitly control the calling order of the callback functions.

      +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 an RtError is thrown (indicating no available drivers), 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 ASIO drivers and then DirectSound drivers (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 most unlikely that the same device could be simultaneously controlled with two different audio APIs.

      +Summary of Methods

      +The following is a short summary of public methods (not including constructors and the destructor) provided by RtAudio:

        -
      • RtAudio::openStream(): opens a stream with the specified parameters.
      • RtAudio::setStreamCallback(): sets a user-defined callback function for a given stream.
      • RtAudio::cancelStreamCallback(): cancels a callback process and function for a given stream.
      • RtAudio::getDeviceCount(): returns the number of audio devices available.
      • RtAudio::getDeviceInfo(): fills a user-supplied RTAUDIO_DEVICE structure for a specified device.
      • RtAudio::getStreamBuffer(): returns a pointer to the stream buffer.
      • RtAudio::tickStream(): triggers processing of input/output data for a stream (blocking).
      • RtAudio::closeStream(): closes the specified stream (implicitly called during object destruction). Once a stream is closed, the stream identifier is invalid and should not be used in calling any other RtAudio methods.
      • RtAudio::startStream(): (re)starts the specified stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream.
      • RtAudio::stopStream(): stops the specified stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call RtAudio::closeStream().
      • RtAudio::abortStream(): stops the specified stream, discarding any remaining samples in the queue. This does not implicitly call closeStream().
      • RtAudio::streamWillBlock(): queries a stream to determine whether a call to the tickStream() method will block. A return value of 0 indicates that the stream will NOT block. A positive return value indicates the number of sample frames that cannot yet be processed without blocking.
      - -

      -

      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: -

      - -

      - - - - - - -
      OS: Audio API: Preprocessor Definition: Library or Framework: Example Compiler Statement:
      Linux ALSA __LINUX_ALSA__ asound, pthread g++ -Wall -D__LINUX_ALSA__ -o probe probe.cpp RtAudio.cpp -lasound -lpthread
      Linux OSS __LINUX_OSS__ pthread g++ -Wall -D__LINUX_OSS__ -o probe probe.cpp RtAudio.cpp -lpthread
      Macintosh OS X CoreAudio __MACOSX_CORE__ pthread, stdc++, CoreAudio CC -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lstdc++ -lpthread
      Irix AL __IRIX_AL__ audio, pthread CC -Wall -D__IRIX_AL__ -o probe probe.cpp RtAudio.cpp -laudio -lpthread
      Windows Direct Sound __WINDOWS_DS__ dsound.lib (ver. 5.0 or higher), multithreaded compiler specific
      Windows ASIO __WINDOWS_ASIO__ various ASIO header and source files compiler specific
      - -

      - -

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

      -

      Debugging

      - -

      -If you are having problems getting RtAudio to run on your system, try passing the preprocessor definition __RTAUDIO_DEBUG__ to the compiler (or uncomment the definition at the bottom of RtAudio.h). A variety of warning messages will be displayed which may help in determining the problem. -

      -

      OS Notes

      - -

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

      -

      Linux:

      - -

      -RtAudio for Linux was developed under Redhat distributions 7.0 - 7.2. Two different audio APIs are supported on Linux platforms: OSS and ALSA. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support. The ALSA API, although relatively new, is now part of the Linux development kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 0.9 and higher versions of ALSA. Input/output latency on the order of 15 milliseconds can typically be achieved under both OSS or ALSA 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):

      - -

      -The Apple CoreAudio API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. CoreAudio 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. This same functionality can be achieved with better synchrony by opening two separate streams for the devices and using RtAudio blocking calls (i.e. RtAudio::tickStream()). The numberOfBuffers parameter to the RtAudio::openStream() function has no affect in this implementation. It is not currently possible to have multiple simultaneous RtAudio streams accessing the same device. -

      -

      Irix (SGI):

      - -

      -The Irix version of RtAudio was written and tested on an SGI Indy running Irix version 6.5.4 and the newer "al" audio library. RtAudio does not compile under Irix version 6.3, mainly because the C++ compiler is too old. Despite the relatively slow speed of the Indy, RtAudio was found to behave quite well and input/output latency was very good. No problems were found with respect to using the pthread library. -

      -

      Windows (DirectSound):

      - -

      -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 (on the order of 20 milliseconds). On the other hand, input audio latency tends to be terrible (100 milliseconds or more). Further, DirectSound drivers tend to crash easily when experimenting with buffer parameters. On my system, I found it necessary to use values around nBuffers = 8 and bufferSize = 512 to avoid crashes. RtAudio was developed with Visual C++ version 6.0. I was forced in several instances to modify code in order to get it to compile under the non-standard version of C++ that Microsoft so unprofessionally implemented. Unfortunately, it appears they are continuing to undermine the C++ standard with more recent compiler releases. -

      -

      Windows (ASIO):

      - -

      -The Steinberg ASIO audio API is based on a callback scheme. In addition, the API allows only a single device driver to be loaded and accessed at a time. Therefore, it is not possible to have multiple simultaneous RtAudio streams running concurrently with this API. 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. See the /tests/asio/ directory for example Visual C++ 6.0 projects. -

      -

      Acknowledgements

      - -

      -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. -

      -RtAudio, version 2.0, was slowly developed over the course of many months while in residence at the Institut Universitari de L'Audiovisual (IUA) in Barcelona, Spain, the Laboratory of Acoustics and Audio Signal Processing at the Helsinki University of Technology, Finland, and the Center for Computer Research in Music and Acoustics (CCRMA) at Stanford University. This work was supported in part by the United States Air Force Office of Scientific Research (grant #F49620-99-1-0293). -

      -

      License

      - -

      -RtAudio: a realtime audio i/o C++ class
      - Copyright (c) 2001-2002 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 requested to send the modifications to the original developer so that they can be incorporated into the canonical version. -

      -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. +

    • +RtAudio::openStream(): opens a stream with the specified parameters.
    • +
    • +RtAudio::setStreamCallback(): sets a user-defined callback function for the stream.
    • +
    • +RtAudio::cancelStreamCallback(): cancels a callback process and function for the stream.
    • +
    • +RtAudio::getDeviceCount(): returns the number of audio devices available.
    • +
    • +RtAudio::getDeviceInfo(): returns an RtAudioDeviceInfo structure for a specified device.
    • +
    • +RtAudio::getStreamBuffer(): returns a pointer to the stream buffer.
    • +
    • +RtAudio::tickStream(): triggers processing of input/output data for the stream (blocking).
    • +
    • +RtAudio::closeStream(): closes the stream (implicitly called during object destruction).
    • +
    • +RtAudio::startStream(): (re)starts the stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream.
    • +
    • +RtAudio::stopStream(): stops the stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call RtAudio::closeStream().
    • +
    • +RtAudio::abortStream(): stops the stream, discarding any remaining samples in the queue. This does not implicitly call closeStream().
    • + +

      +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:

      + + + + + + + + + + + + + + + + + +
      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 probe probe.cpp RtAudio.cpp -lasound -lpthread
      Linux Jack Audio Server RtApiJack __LINUX_JACK__ jack, pthread g++ -Wall -D__LINUX_JACK__ -o probe probe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread
      Linux OSS RtApiOss __LINUX_OSS__ pthread g++ -Wall -D__LINUX_OSS__ -o probe probe.cpp RtAudio.cpp -lpthread
      Macintosh OS X CoreAudio RtApiCore __MACOSX_CORE__ pthread, stdc++, CoreAudio g++ -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lpthread
      Irix AL RtApiAl __IRIX_AL__ audio, pthread CC -Wall -D__IRIX_AL__ -o probe probe.cpp RtAudio.cpp -laudio -lpthread
      Windows Direct Sound RtApiDs __WINDOWS_DS__ dsound.lib (ver. 5.0 or higher), multithreaded compiler specific
      Windows ASIO RtApiAsio __WINDOWS_ASIO__ various ASIO header and source files compiler specific

      -


      - -
      - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
      - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

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

      +Debugging

      +If you are having problems getting RtAudio to run on your system, try passing the preprocessor definition __RTAUDIO_DEBUG__ to the compiler (or uncomment the definition at the bottom of RtAudio.h). A variety of warning messages will be displayed which may help in determining the problem. Also try using the programs included in the test directory. The program info displays the queried capabilities of all hardware devices found.

      +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 for Linux was developed under Redhat distributions 7.0 - Fedora. Three different audio APIs are supported on Linux platforms: OSS, ALSA, and Jack. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support (though the availability and quality of OSS drivers for new hardware is decreasing). The ALSA API, although relatively new, is now part of the Linux development kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack, which is still in development, 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.

      +The Jack API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. It should be noted, however, that the best performance is achieved when using RtAudio's callback functionality with the Jack API. At the moment, only one RtAudio instance can be connected to the Jack server. Because RtAudio does not provide a mechanism for allowing the user to specify particular channels (or ports) of a device, it simply opens the first N enumerated Jack ports for input/output.

      +Macintosh OS X (CoreAudio):

      +The Apple CoreAudio API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. CoreAudio 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. This same functionality might be achieved with better synchrony by creating separate instances of RtAudio for each device and making use of RtAudio blocking calls (i.e. RtAudio::tickStream()). 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.

      +Irix (SGI):

      +The Irix version of RtAudio was written and tested on an SGI Indy running Irix version 6.5.4 and the newer "al" audio library. RtAudio does not compile under Irix version 6.3, mainly because the C++ compiler is too old. Despite the relatively slow speed of the Indy, RtAudio was found to behave quite well and input/output latency was very good. No problems were found with respect to using the pthread library.

      +Windows (DirectSound):

      +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 (on the order of 20 milliseconds). On the other hand, input audio latency tends to be terrible (100 milliseconds or more). Further, DirectSound drivers tend to crash easily when experimenting with buffer parameters. On my system, I found it necessary to use values around nBuffers = 8 and bufferSize = 512 to avoid crashes. RtAudio was originally developed with Visual C++ version 6.0.

      +Windows (ASIO):

      +The Steinberg ASIO audio API is based on a callback scheme. In addition, the 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. The Visual C++ projects found in /tests/Windows/ compile both ASIO and DirectSound support.

      +Acknowledgements

      +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. The most recent version of RtAudio was finished while working as an assistant 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).

      +License

      +RtAudio: a realtime audio i/o C++ classes
      + Copyright (c) 2001-2004 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 requested to send the modifications to the original developer so that they can be incorporated into the canonical version.

      +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-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      diff --git a/doc/html/structRtAudioDeviceInfo-members.html b/doc/html/structRtAudioDeviceInfo-members.html new file mode 100644 index 0000000..41f4924 --- /dev/null +++ b/doc/html/structRtAudioDeviceInfo-members.html @@ -0,0 +1,28 @@ + + +The RtAudio Tutorial + + + +
      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + +

      RtAudioDeviceInfo Member List

      This is the complete list of members for RtAudioDeviceInfo, including all inherited members. + + + + + + + + +
      duplexChannelsRtAudioDeviceInfo
      inputChannelsRtAudioDeviceInfo
      isDefaultRtAudioDeviceInfo
      nameRtAudioDeviceInfo
      nativeFormatsRtAudioDeviceInfo
      outputChannelsRtAudioDeviceInfo
      probedRtAudioDeviceInfo
      sampleRatesRtAudioDeviceInfo

      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/structRtAudioDeviceInfo.html b/doc/html/structRtAudioDeviceInfo.html new file mode 100644 index 0000000..9039a18 --- /dev/null +++ b/doc/html/structRtAudioDeviceInfo.html @@ -0,0 +1,226 @@ + + +The RtAudio Tutorial + + + +
      +Tutorial   Class/Enum List   File List   Compound Members  
      +
      + +

      RtAudioDeviceInfo Struct Reference

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

      +#include <RtAudio.h> +

      +List of all members. + + + + + + + + + + + + + + + + + + +

      Public Attributes

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


      Detailed Description

      +The public device information structure for returning queried values. +

      +


      Member Data Documentation

      +

      + + + + +
      + + +
      std::string RtAudioDeviceInfo::name +
      +
      + + + + + +
      +   + + +

      +Character string device identifier.

      +

      + + + + +
      + + +
      bool RtAudioDeviceInfo::probed +
      +
      + + + + + +
      +   + + +

      +true if the device capabilities were successfully probed.

      +

      + + + + +
      + + +
      int RtAudioDeviceInfo::outputChannels +
      +
      + + + + + +
      +   + + +

      +Maximum output channels supported by device.

      +

      + + + + +
      + + +
      int RtAudioDeviceInfo::inputChannels +
      +
      + + + + + +
      +   + + +

      +Maximum input channels supported by device.

      +

      + + + + +
      + + +
      int RtAudioDeviceInfo::duplexChannels +
      +
      + + + + + +
      +   + + +

      +Maximum simultaneous input/output channels supported by device.

      +

      + + + + +
      + + +
      bool RtAudioDeviceInfo::isDefault +
      +
      + + + + + +
      +   + + +

      +true if this is the default output or input device.

      +

      + + + + +
      + + +
      std::vector<int> RtAudioDeviceInfo::sampleRates +
      +
      + + + + + +
      +   + + +

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

      +

      + + + + +
      + + +
      RtAudioFormat RtAudioDeviceInfo::nativeFormats +
      +
      + + + + + +
      +   + + +

      +Bit mask of supported data formats.

      +


      The documentation for this struct was generated from the following file: +
      + + + +
      ©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.
      + Maintained by Gary P. Scavone, gary@music.mcgill.ca
      + + + diff --git a/doc/html/structRtAudio_1_1RTAUDIO__DEVICE-members.html b/doc/html/structRtAudio_1_1RTAUDIO__DEVICE-members.html deleted file mode 100644 index 21141e9..0000000 --- a/doc/html/structRtAudio_1_1RTAUDIO__DEVICE-members.html +++ /dev/null @@ -1,34 +0,0 @@ - - -The RtAudio Tutorial - - - -
      -Tutorial   Class/Enum List   File List   Compound Members  
      -
      - -

      RtAudio::RTAUDIO_DEVICE Member List

      This is the complete list of members for RtAudio::RTAUDIO_DEVICE, including all inherited members. -
      - -
      - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
      - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

      -

      - - - diff --git a/doc/html/structRtAudio_1_1RTAUDIO__DEVICE.html b/doc/html/structRtAudio_1_1RTAUDIO__DEVICE.html deleted file mode 100644 index 837c218..0000000 --- a/doc/html/structRtAudio_1_1RTAUDIO__DEVICE.html +++ /dev/null @@ -1,384 +0,0 @@ - - -The RtAudio Tutorial - - - -
      -Tutorial   Class/Enum List   File List   Compound Members  
      -
      - -

      RtAudio::RTAUDIO_DEVICE Struct Reference

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

      -#include <RtAudio.h> -

      -List of all members. - - - - - - - - - - - - - - -

      Public Attributes

      char name [128]
      bool probed
      int maxOutputChannels
      int maxInputChannels
      int maxDuplexChannels
      int minOutputChannels
      int minInputChannels
      int minDuplexChannels
      bool hasDuplexSupport
      bool isDefault
      int nSampleRates
      int sampleRates [MAX_SAMPLE_RATES]
      RTAUDIO_FORMAT nativeFormats
      -


      Detailed Description

      -The public device information structure for passing queried values. -

      -


      Member Data Documentation

      -

      - - - - -
      - - - - - -
      -char RtAudio::RTAUDIO_DEVICE::name -
      -
      - - - - - -
      -   - - -

      -Character string device identifier.

      -

      - - - - -
      - - - - - -
      -bool RtAudio::RTAUDIO_DEVICE::probed -
      -
      - - - - - -
      -   - - -

      -true if the device capabilities were successfully probed.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::maxOutputChannels -
      -
      - - - - - -
      -   - - -

      -Maximum output channels supported by device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::maxInputChannels -
      -
      - - - - - -
      -   - - -

      -Maximum input channels supported by device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::maxDuplexChannels -
      -
      - - - - - -
      -   - - -

      -Maximum simultaneous input/output channels supported by device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::minOutputChannels -
      -
      - - - - - -
      -   - - -

      -Minimum output channels supported by device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::minInputChannels -
      -
      - - - - - -
      -   - - -

      -Minimum input channels supported by device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::minDuplexChannels -
      -
      - - - - - -
      -   - - -

      -Minimum simultaneous input/output channels supported by device.

      -

      - - - - -
      - - - - - -
      -bool RtAudio::RTAUDIO_DEVICE::hasDuplexSupport -
      -
      - - - - - -
      -   - - -

      -true if device supports duplex mode.

      -

      - - - - -
      - - - - - -
      -bool RtAudio::RTAUDIO_DEVICE::isDefault -
      -
      - - - - - -
      -   - - -

      -true if this is the default output or input device.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::nSampleRates -
      -
      - - - - - -
      -   - - -

      -Number of discrete rates or -1 if range supported.

      -

      - - - - -
      - - - - - -
      -int RtAudio::RTAUDIO_DEVICE::sampleRates -
      -
      - - - - - -
      -   - - -

      -Supported rates or (min, max) if range.

      -

      - - - - -
      - - - - - -
      -RTAUDIO_FORMAT RtAudio::RTAUDIO_DEVICE::nativeFormats -
      -
      - - - - - -
      -   - - -

      -Bit mask of supported data formats.

      -


      The documentation for this struct was generated from the following file: -
      - -
      - ©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
      - Maintained by Gary P. Scavone, gary@ccrma.stanford.edu

      -

      - - -