[Freeswitch-branches] [commit] r5663 - in freeswitch/branches/cseket/libs/portmixer: . CVS include include/CVS macproj macproj/CVS px_common px_common/CVS px_mac px_mac/CVS px_mac_core px_mac_core/CVS px_none px_none/CVS px_tests px_tests/CVS px_unix_oss px_unix_oss/CVS px_win_wmme px_win_wmme/CVS src src/CVS winproj winproj/CVS
Freeswitch SVN
cseket at freeswitch.org
Fri Aug 24 13:53:54 EDT 2007
Author: cseket
Date: Fri Aug 24 13:53:53 2007
New Revision: 5663
Added:
freeswitch/branches/cseket/libs/portmixer/
freeswitch/branches/cseket/libs/portmixer/.update
freeswitch/branches/cseket/libs/portmixer/CVS/
freeswitch/branches/cseket/libs/portmixer/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/CVS/Entries.Log
freeswitch/branches/cseket/libs/portmixer/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/CVS/Root
freeswitch/branches/cseket/libs/portmixer/LICENSE.txt
freeswitch/branches/cseket/libs/portmixer/Makefile
freeswitch/branches/cseket/libs/portmixer/Makefile.in
freeswitch/branches/cseket/libs/portmixer/README.txt
freeswitch/branches/cseket/libs/portmixer/configure (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/configure.ac
freeswitch/branches/cseket/libs/portmixer/include/
freeswitch/branches/cseket/libs/portmixer/include/CVS/
freeswitch/branches/cseket/libs/portmixer/include/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/include/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/include/CVS/Root
freeswitch/branches/cseket/libs/portmixer/include/portmixer.h
freeswitch/branches/cseket/libs/portmixer/macproj/
freeswitch/branches/cseket/libs/portmixer/macproj/CVS/
freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Root
freeswitch/branches/cseket/libs/portmixer/portaudio.patch
freeswitch/branches/cseket/libs/portmixer/px_common/
freeswitch/branches/cseket/libs/portmixer/px_common/CVS/
freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_common/portmixer.h (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_mac/
freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/
freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_mac/px_mac.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_mac_core/
freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/
freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_mac_core/Makefile
freeswitch/branches/cseket/libs/portmixer/px_mac_core/px_mac_core.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_none/
freeswitch/branches/cseket/libs/portmixer/px_none/CVS/
freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_none/Makefile
freeswitch/branches/cseket/libs/portmixer/px_none/px_none.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_tests/
freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/
freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_tests/Makefile (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_tests/px_test.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/Makefile
freeswitch/branches/cseket/libs/portmixer/px_unix_oss/px_unix_oss.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Root
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/Makefile
freeswitch/branches/cseket/libs/portmixer/px_win_wmme/px_win_wmme.c (contents, props changed)
freeswitch/branches/cseket/libs/portmixer/src/
freeswitch/branches/cseket/libs/portmixer/src/CVS/
freeswitch/branches/cseket/libs/portmixer/src/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/src/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/src/CVS/Root
freeswitch/branches/cseket/libs/portmixer/src/px_example_api.c
freeswitch/branches/cseket/libs/portmixer/src/px_linux_alsa.c
freeswitch/branches/cseket/libs/portmixer/src/px_mac_coreaudio.c
freeswitch/branches/cseket/libs/portmixer/src/px_mixer.c
freeswitch/branches/cseket/libs/portmixer/src/px_mixer.h
freeswitch/branches/cseket/libs/portmixer/src/px_unix_oss.c
freeswitch/branches/cseket/libs/portmixer/src/px_win_common.c
freeswitch/branches/cseket/libs/portmixer/src/px_win_common.h
freeswitch/branches/cseket/libs/portmixer/src/px_win_ds.c
freeswitch/branches/cseket/libs/portmixer/src/px_win_wmme.c
freeswitch/branches/cseket/libs/portmixer/winproj/
freeswitch/branches/cseket/libs/portmixer/winproj/CVS/
freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Entries
freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Repository
freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Root
freeswitch/branches/cseket/libs/portmixer/winproj/portmixer.vcproj
Log:
add portmixer for setting voulme in mod_portaudio
Added: freeswitch/branches/cseket/libs/portmixer/.update
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/.update Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+Thu Aug 21 13.01.02 UTC 2007
\ No newline at end of file
Added: freeswitch/branches/cseket/libs/portmixer/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,7 @@
+/LICENSE.txt/1.1.1.1/Mon Dec 2 01:14:03 2002//
+/Makefile.in/1.1/Mon Oct 2 00:27:51 2006//
+/README.txt/1.1/Mon Oct 2 00:27:51 2006//
+/configure/1.3/Sun Jun 3 08:30:36 2007//
+/configure.ac/1.2/Sun Jun 3 08:30:36 2007//
+/portaudio.patch/1.2/Sun Jun 3 08:30:36 2007//
+D
Added: freeswitch/branches/cseket/libs/portmixer/CVS/Entries.Log
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/CVS/Entries.Log Fri Aug 24 13:53:53 2007
@@ -0,0 +1,11 @@
+A D/include////
+A D/macproj////
+A D/px_common////
+A D/px_mac////
+A D/px_mac_core////
+A D/px_none////
+A D/px_tests////
+A D/px_unix_oss////
+A D/px_win_wmme////
+A D/src////
+A D/winproj////
Added: freeswitch/branches/cseket/libs/portmixer/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer
Added: freeswitch/branches/cseket/libs/portmixer/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/LICENSE.txt
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/LICENSE.txt Fri Aug 24 13:53:53 2007
@@ -0,0 +1,75 @@
+Portable header file to contain:
+/*
+ * PortMixer
+ * PortMixer API Header File
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+Implementation files to contain:
+/*
+ * PortMixer
+ * <platform> Implementation
+ *
+ * <copyright message>
+ *
+ * <author>
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
Added: freeswitch/branches/cseket/libs/portmixer/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,42 @@
+### PortMixer library Makefile
+
+OBJECTS = px_mixer.o
+
+LIBRARY = libportmixer.a
+
+CC = gcc
+AR = /usr/bin/ar
+RANLIB = ranlib
+
+DEFS += -DPACKAGE_NAME=\"PortMixer\" -DPACKAGE_TARNAME=\"portmixer\" -DPACKAGE_VERSION=\"2.0\" -DPACKAGE_STRING=\"PortMixer\ 2.0\" -DPACKAGE_BUGREPORT=\"audacity.sourceforge.net\" -DSTDC_HEADERS=1
+CFLAGS += -O2 -I
+CFLAGS += -Iinclude
+
+all : $(LIBRARY)
+
+tests:
+ cd tests && $(MAKE) all
+
+$(LIBRARY): $(OBJECTS)
+ $(AR) ruv $(LIBRARY) $(OBJECTS)
+ $(RANLIB) $(LIBRARY)
+
+%.o : src/%.c
+ $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
+
+clean :
+ -rm -f $(LIBRARY)
+ -rm -f $(OBJECTS)
+
+distclean: clean
+ -$(RM) -rf config.log config.status autom4te.cache Makefile portmixer-v2
+
+dist:
+ rm -rf portmixer-v2
+ mkdir portmixer-v2
+ cp -pr include src LICENSE.txt README.txt portaudio.patch Makefile.in configure.ac configure portmixer-v2
+ tar -zcf ../portmixer-v2.tar.gz portmixer-v2
+
+strip :
+ strip $(LIBRARY)
+ ranlib $(LIBRARY)
Added: freeswitch/branches/cseket/libs/portmixer/Makefile.in
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/Makefile.in Fri Aug 24 13:53:53 2007
@@ -0,0 +1,42 @@
+### PortMixer library Makefile
+
+OBJECTS = @objects@
+
+LIBRARY = libportmixer.a
+
+CC = @CC@
+AR = @AR@
+RANLIB = @RANLIB@
+
+DEFS += @DEFS@
+CFLAGS += @cflags@
+CFLAGS += @include@
+
+all : $(LIBRARY)
+
+tests:
+ cd tests && $(MAKE) all
+
+$(LIBRARY): $(OBJECTS)
+ $(AR) ruv $(LIBRARY) $(OBJECTS)
+ $(RANLIB) $(LIBRARY)
+
+%.o : src/%.c
+ $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
+
+clean :
+ -rm -f $(LIBRARY)
+ -rm -f $(OBJECTS)
+
+distclean: clean
+ -$(RM) -rf config.log config.status autom4te.cache Makefile portmixer-v2
+
+dist:
+ rm -rf portmixer-v2
+ mkdir portmixer-v2
+ cp -pr include src LICENSE.txt README.txt portaudio.patch Makefile.in configure.ac configure portmixer-v2
+ tar -zcf ../portmixer-v2.tar.gz portmixer-v2
+
+strip :
+ strip $(LIBRARY)
+ ranlib $(LIBRARY)
Added: freeswitch/branches/cseket/libs/portmixer/README.txt
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/README.txt Fri Aug 24 13:53:53 2007
@@ -0,0 +1,6 @@
+This is where some sort of README should be...but this is all there is for now.
+
+As of October 1st, 2006, Portaudio v2.0 (or v1.9) doesn't have the required support
+to use this version of Portmixer. To add the support, apply the portaudio.patch
+found in this direcotry.
+
Added: freeswitch/branches/cseket/libs/portmixer/configure
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/configure Fri Aug 24 13:53:53 2007
@@ -0,0 +1,4415 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for PortMixer 2.0.
+#
+# Report bugs to <audacity.sourceforge.net>.
+#
+# Copyright (C) 2003 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
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/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 -z "`(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'
+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: 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
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='PortMixer'
+PACKAGE_TARNAME='portmixer'
+PACKAGE_VERSION='2.0'
+PACKAGE_STRING='PortMixer 2.0'
+PACKAGE_BUGREPORT='audacity.sourceforge.net'
+
+ac_unique_file="src"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB AR CPP EGREP cflags include objects LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { 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: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+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_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=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { 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 ($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
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+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 <<_ACEOF
+\`configure' configures PortMixer 2.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of PortMixer 2.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-debug enable debug compilation
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pa-include specify path to portaudio v2.0 include directory
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <audacity.sourceforge.net>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ 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
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ 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_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+PortMixer configure 2.0
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&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 PortMixer $as_me 2.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 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`
+
+_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 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# 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=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ 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
+
+ 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
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ 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 &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+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
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { 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:$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:$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:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { 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.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ 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:$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:$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
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_files="$ac_config_files Makefile"
+
+
+#
+# Checks for programs.
+#
+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
+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:$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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+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:$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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:$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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+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:$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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:$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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+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
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # 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
+ 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:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ 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:$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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+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:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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:$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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+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:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+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:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+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:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ 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.
+
+# 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 | *.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
+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:$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:$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:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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:$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'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+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:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+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:$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 conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { 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:$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:$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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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); }; 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 | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+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:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+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:$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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+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>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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.err 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
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+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
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+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_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+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_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+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_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $AR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_AR="$AR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_AR" && ac_cv_path_AR="no"
+ ;;
+esac
+fi
+AR=$ac_cv_path_AR
+
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if [ $AR = "no" ] ; then
+ { { echo "$as_me:$LINENO: error: \"Could not find ar - needed to create a library\"" >&5
+echo "$as_me: error: \"Could not find ar - needed to create a library\"" >&2;}
+ { (exit 1); exit 1; }; };
+fi
+
+#
+# Checks for libraries.
+#
+
+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:$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
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { 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
+
+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:$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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#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') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f 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='./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
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+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 <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+#
+# Check for debug
+#
+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
+ enableval="$enable_debug"
+ cflags="$cflags -g"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ cflags="$cflags -O2"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
+#
+# Check for portaudio path
+#
+
+# Check whether --with-pa-include or --without-pa-include was given.
+if test "${with_pa_include+set}" = set; then
+ withval="$with_pa_include"
+ with_portaudio=$withval
+else
+ with_portaudio=""
+fi;
+
+#
+#
+#
+if [ with_portaudio != "" ] ; then
+ CPPFLAGS="$CPPFLAGS -I$withval"
+ cflags="$cflags -I$withval"
+
+fi
+
+#
+# Make sure the support is there
+#
+have_support=yes
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pa_win_ds.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "PaWinDS_GetStreamInputGUID" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pa_linux_alsa.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "PaAlsa_GetStreamInputCard" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pa_win_wmme.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "PaWinMME_GetStreamInputHandle" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pa_mac_core.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "PaMacCore_GetStreamInputDevice" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pa_unix_oss.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "PaOSS_GetStreamInputDevice" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <portaudio.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Pa_GetStreamHostApiType" >/dev/null 2>&1; then
+ :
+#else
+# have_support=no
+fi
+rm -f conftest*
+
+if [ $have_support = "no" ] ; then
+ { { echo "$as_me:$LINENO: error: \"You're version of portaudio does not include required functions\"" >&5
+echo "$as_me: error: \"You're version of portaudio does not include required functions\"" >&2;}
+ { (exit 1); exit 1; }; };
+fi
+
+#
+#
+#
+include=-Iinclude
+
+objects=px_mixer.o
+
+
+#
+# Check which APIs are available
+#
+# 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:$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
+/* 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>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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.err 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
+
+
+if test "${ac_cv_header_linux_soundcard_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5
+echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_soundcard_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking linux/soundcard.h usability" >&5
+echo $ECHO_N "checking linux/soundcard.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <linux/soundcard.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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.err 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 linux/soundcard.h presence" >&5
+echo $ECHO_N "checking linux/soundcard.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <linux/soundcard.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: linux/soundcard.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: linux/soundcard.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to audacity.sourceforge.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5
+echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_soundcard_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_linux_soundcard_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6
+
+fi
+if test $ac_cv_header_linux_soundcard_h = yes; then
+ have_oss=yes
+else
+ have_oss=no
+fi
+
+
+if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5
+echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5
+echo $ECHO_N "checking alsa/asoundlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <alsa/asoundlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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.err 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 alsa/asoundlib.h presence" >&5
+echo $ECHO_N "checking alsa/asoundlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <alsa/asoundlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to audacity.sourceforge.net ##
+## --------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5
+echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_alsa_asoundlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6
+
+fi
+if test $ac_cv_header_alsa_asoundlib_h = yes; then
+ have_alsa=yes
+else
+ have_alsa=no
+fi
+
+
+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
+ # 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <CoreAudio/CoreAudio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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.err 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <CoreAudio/CoreAudio.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ 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
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$ac_c_preproc_warn_flag 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 compiler's result" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ 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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&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;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to audacity.sourceforge.net ##
+## --------------------------------------- ##
+_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:$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
+ have_coreaudio=yes
+else
+ have_coreaudio=no
+fi
+
+
+
+#
+# Set up to use the identified ones
+#
+{ echo "$as_me:$LINENO: ---------------------------------------" >&5
+echo "$as_me: ---------------------------------------" >&6;};
+if [ $have_oss = "yes" ] ; then
+ { echo "$as_me:$LINENO: Including support for OSS" >&5
+echo "$as_me: Including support for OSS" >&6;};
+ cat >>confdefs.h <<\_ACEOF
+#define PX_USE_UNIX_OSS 1
+_ACEOF
+
+ objects="$objects px_unix_oss.o"
+fi
+
+if [ $have_alsa = "yes" ] ; then
+ { echo "$as_me:$LINENO: Including support for ALSA" >&5
+echo "$as_me: Including support for ALSA" >&6;};
+ cat >>confdefs.h <<\_ACEOF
+#define PX_USE_LINUX_ALSA 1
+_ACEOF
+
+ objects="$objects px_linux_alsa.o"
+fi
+
+if [ $have_coreaudio = "yes" ] ; then
+ { echo "$as_me:$LINENO: Including support for Coreaudio" >&5
+echo "$as_me: Including support for Coreaudio" >&6;};
+ cat >>confdefs.h <<\_ACEOF
+#define PX_USE_MAC_COREAUDIO 1
+_ACEOF
+
+ objects="$objects px_mac_coreaudio.o"
+fi
+{ echo "$as_me:$LINENO: ---------------------------------------" >&5
+echo "$as_me: ---------------------------------------" >&6;};
+
+#
+# Write it all out
+#
+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
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# 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 overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# 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 <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_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
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+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:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# 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}
+_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
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/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 -z "`(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'
+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
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# 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 PortMixer $as_me 2.0, which was
+generated by GNU Autoconf 2.59. 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.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+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]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+PortMixer config.status 2.0
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 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
+_ACEOF
+
+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=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ 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 $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { 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;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $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:$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;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_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
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { 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
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+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 ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at AR@,$AR,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at cflags@,$cflags,;t t
+s, at include@,$include,;t t
+s, at objects@,$objects,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ 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
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_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
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ 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\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ 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; }; }; }
+
+ 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
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+
+ if test x"$ac_file" != x-; then
+ { 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 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.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ 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";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { 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; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at 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
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_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
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# 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_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.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Added: freeswitch/branches/cseket/libs/portmixer/configure.ac
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/configure.ac Fri Aug 24 13:53:53 2007
@@ -0,0 +1,104 @@
+#
+# PortMixer 2.0
+#
+
+AC_INIT(PortMixer, 2.0, audacity.sourceforge.net, portmixer)
+AC_CONFIG_SRCDIR(src)
+AC_CONFIG_FILES([Makefile])
+
+#
+# Checks for programs.
+#
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PATH_PROG(AR, ar, no)
+if [[ $AR = "no" ]] ; then
+ AC_MSG_ERROR("Could not find ar - needed to create a library");
+fi
+
+#
+# Checks for libraries.
+#
+AC_HEADER_STDC
+
+#
+# Check for debug
+#
+AC_MSG_CHECKING(whether to compile debug version)
+AC_ARG_ENABLE([debug],
+ AC_HELP_STRING([--enable-debug],
+ [enable debug compilation]),
+ [AC_SUBST( cflags, ["$cflags -g"] ) AC_MSG_RESULT(yes)],
+ [AC_SUBST( cflags, ["$cflags -O2"] ) AC_MSG_RESULT(no)])
+
+#
+# Check for portaudio path
+#
+AC_ARG_WITH([pa-include],
+ AC_HELP_STRING([--with-pa-include],
+ [specify path to portaudio v2.0 include directory]),
+ [with_portaudio=$withval],
+ [with_portaudio=""])
+
+#
+#
+#
+if [[ with_portaudio != "" ]] ; then
+ CPPFLAGS="$CPPFLAGS -I$withval"
+ AC_SUBST(cflags, ["$cflags -I$withval"] )
+fi
+
+#
+# Make sure the support is there
+#
+have_support=yes
+AC_EGREP_HEADER([PaWinDS_GetStreamInputGUID], [pa_win_ds.h], , [have_support=no])
+AC_EGREP_HEADER([PaAlsa_GetStreamInputCard], [pa_linux_alsa.h], , [have_support=no])
+AC_EGREP_HEADER([PaWinMME_GetStreamInputHandle], [pa_win_wmme.h], , [have_support=no])
+AC_EGREP_HEADER([PaMacCore_GetStreamInputDevice], [pa_mac_core.h], , [have_support=no])
+AC_EGREP_HEADER([PaOSS_GetStreamInputDevice], [pa_unix_oss.h], , [have_support=no])
+AC_EGREP_HEADER([Pa_GetStreamHostApiType], [portaudio.h], , [have_support=no])
+#if [[ $have_support = "no" ]] ; then
+# AC_MSG_ERROR("You're version of portaudio does not include required functions");
+#fi
+
+#
+#
+#
+AC_SUBST( include, [-Iinclude] )
+AC_SUBST( objects, [px_mixer.o] )
+
+#
+# Check which APIs are available
+#
+AC_CHECK_HEADER(linux/soundcard.h, have_oss=yes, have_oss=no)
+AC_CHECK_HEADER(alsa/asoundlib.h, have_alsa=yes, have_alsa=no)
+AC_CHECK_HEADER(CoreAudio/CoreAudio.h, have_coreaudio=yes, have_coreaudio=no)
+
+#
+# Set up to use the identified ones
+#
+AC_MSG_NOTICE(---------------------------------------);
+if [[ $have_oss = "yes" ]] ; then
+ AC_MSG_NOTICE(Including support for OSS);
+ AC_DEFINE(PX_USE_UNIX_OSS)
+ objects="$objects px_unix_oss.o"
+fi
+
+if [[ $have_alsa = "yes" ]] ; then
+ AC_MSG_NOTICE(Including support for ALSA);
+ AC_DEFINE(PX_USE_LINUX_ALSA)
+ objects="$objects px_linux_alsa.o"
+fi
+
+if [[ $have_coreaudio = "yes" ]] ; then
+ AC_MSG_NOTICE(Including support for Coreaudio);
+ AC_DEFINE(PX_USE_MAC_COREAUDIO)
+ objects="$objects px_mac_coreaudio.o"
+fi
+AC_MSG_NOTICE(---------------------------------------);
+
+#
+# Write it all out
+#
+AC_OUTPUT
Added: freeswitch/branches/cseket/libs/portmixer/include/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/include/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,2 @@
+/portmixer.h/1.2/Wed Jul 11 06:16:15 2007//
+D
Added: freeswitch/branches/cseket/libs/portmixer/include/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/include/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/include
Added: freeswitch/branches/cseket/libs/portmixer/include/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/include/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/include/portmixer.h
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/include/portmixer.h Fri Aug 24 13:53:53 2007
@@ -0,0 +1,139 @@
+#ifndef PORT_MIXER_H
+#define PORT_MIXER_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/*
+ * PortMixer
+ * PortMixer API Header File
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include "portaudio.h"
+
+typedef void PxMixer;
+
+typedef float PxVolume; /* 0.0 (min) --> 1.0 (max) */
+typedef float PxBalance; /* -1.0 (left) --> 1.0 (right) */
+
+/*
+ Px_OpenMixer() returns a mixer which will work with the given PortAudio
+ audio device. Pass 0 as the index for the first (default) mixer.
+*/
+
+PxMixer *Px_OpenMixer( void *pa_stream, int i );
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer( PxMixer *mixer );
+
+/*
+ Px_GetNumMixers returns the number of mixers which could be
+ used with the given PortAudio device. On most systems, there
+ will be only one mixer for each device; however there may be
+ multiple mixers for each device, or possibly multiple mixers
+ which are independent of any particular PortAudio device.
+*/
+
+int Px_GetNumMixers( PxMixer *mixer );
+const char *Px_GetMixerName( PxMixer *mixer, int i );
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer );
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume );
+
+/*
+ Main output volume
+*/
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer );
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume );
+int Px_SupportsPCMOutputVolume( PxMixer* mixer ) ;
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer );
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i );
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i );
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume );
+
+/*
+ Input source
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer );
+const char *Px_GetInputSourceName( PxMixer *mixer, int i);
+int Px_GetCurrentInputSource( PxMixer *mixer ); /* may return -1 == none */
+void Px_SetCurrentInputSource( PxMixer *mixer, int i );
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer );
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume );
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer );
+PxBalance Px_GetOutputBalance( PxMixer *mixer );
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance );
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer );
+PxVolume Px_GetPlaythrough( PxMixer *mixer );
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PORT_AUDIO_H */
Added: freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+D
Added: freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/macproj
Added: freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/macproj/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/portaudio.patch
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/portaudio.patch Fri Aug 24 13:53:53 2007
@@ -0,0 +1,1239 @@
+#
+# This patch applies to portaudio v19 source as of 2007-jun-01.
+#
+diff -ruN pa/build/msvc/PAStaticWMMEv19.vcproj pam/build/msvc/PAStaticWMMEv19.vcproj
+--- pa/build/msvc/PAStaticWMMEv19.vcproj 1969-12-31 18:00:00.000000000 -0600
++++ pam/build/msvc/PAStaticWMMEv19.vcproj 2007-06-03 06:23:38.000000000 -0500
+@@ -0,0 +1,774 @@
++<?xml version="1.0" encoding="Windows-1252"?>
++<VisualStudioProject
++ ProjectType="Visual C++"
++ Version="8.00"
++ Name="PAStaticWMMEv19"
++ ProjectGUID="{7ABA0F80-94AE-4E82-AB89-2E1258212D59}"
++ RootNamespace="PAStaticWMMEv19"
++ >
++ <Platforms>
++ <Platform
++ Name="Win32"
++ />
++ </Platforms>
++ <ToolFiles>
++ </ToolFiles>
++ <Configurations>
++ <Configuration
++ Name="Release|Win32"
++ OutputDirectory="$(ConfigurationName)"
++ IntermediateDirectory="$(ConfigurationName)"
++ ConfigurationType="4"
++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
++ UseOfMFC="0"
++ ATLMinimizesCRunTimeLibraryUsage="false"
++ CharacterSet="2"
++ >
++ <Tool
++ Name="VCPreBuildEventTool"
++ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF "%DXSDK_DIR%" == "" echo #define PA_NO_DS >>".\$(ConfigurationName)\config.h"
IF "%ASIOSDK_DIR%" == "" echo #define PA_NO_ASIO >>".\$(ConfigurationName)\config.h"
"
++ />
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ <Tool
++ Name="VCXMLDataGeneratorTool"
++ />
++ <Tool
++ Name="VCWebServiceProxyGeneratorTool"
++ />
++ <Tool
++ Name="VCMIDLTool"
++ />
++ <Tool
++ Name="VCCLCompilerTool"
++ AdditionalOptions="/O2"
++ Optimization="2"
++ InlineFunctionExpansion="1"
++ AdditionalIncludeDirectories="../../include;../../src/common"
++ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
++ StringPooling="true"
++ RuntimeLibrary="0"
++ EnableFunctionLevelLinking="true"
++ UsePrecompiledHeader="0"
++ PrecompiledHeaderFile=".\$(ConfigurationName)/PA19StaticWMME.pch"
++ AssemblerListingLocation=".\$(ConfigurationName)/"
++ ObjectFile=".\$(ConfigurationName)/"
++ ProgramDataBaseFileName=".\$(ConfigurationName)/"
++ WarningLevel="3"
++ SuppressStartupBanner="true"
++ CompileAs="0"
++ DisableSpecificWarnings="4996"
++ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
++ />
++ <Tool
++ Name="VCManagedResourceCompilerTool"
++ />
++ <Tool
++ Name="VCResourceCompilerTool"
++ PreprocessorDefinitions="NDEBUG"
++ Culture="1032"
++ />
++ <Tool
++ Name="VCPreLinkEventTool"
++ />
++ <Tool
++ Name="VCLibrarianTool"
++ OutputFile="$(SolutionDir)\$(ConfigurationName)\pastaticwmmev19.lib"
++ SuppressStartupBanner="true"
++ />
++ <Tool
++ Name="VCALinkTool"
++ />
++ <Tool
++ Name="VCXDCMakeTool"
++ />
++ <Tool
++ Name="VCBscMakeTool"
++ />
++ <Tool
++ Name="VCFxCopTool"
++ />
++ <Tool
++ Name="VCPostBuildEventTool"
++ CommandLine="set CFLAGS=/I "../../include" /I "../../src/common" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /O2 /Ob1 /GF /FD /EHsc /MT /Gy /W3 /c /wd4996 /nologo /Fo".\$(OutDir)/" /Fd".\$(OutDir)/"
set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds.c"
cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

if "%ASIOSDK_DIR%"=="" goto NoASIO

cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\pa_asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\iasiothiscallresolver.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\common\asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\asiodrivers.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\pc\asiolist.cpp"

:NoASIO

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
++ />
++ </Configuration>
++ <Configuration
++ Name="Debug|Win32"
++ OutputDirectory="$(ConfigurationName)"
++ IntermediateDirectory="$(ConfigurationName)"
++ ConfigurationType="4"
++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
++ UseOfMFC="0"
++ ATLMinimizesCRunTimeLibraryUsage="false"
++ CharacterSet="2"
++ >
++ <Tool
++ Name="VCPreBuildEventTool"
++ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF "%DXSDK_DIR%" == "" echo #define PA_NO_DS >>".\$(ConfigurationName)\config.h"
IF "%ASIOSDK_DIR%" == "" echo #define PA_NO_ASIO >>".\$(ConfigurationName)\config.h"
"
++ />
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ <Tool
++ Name="VCXMLDataGeneratorTool"
++ />
++ <Tool
++ Name="VCWebServiceProxyGeneratorTool"
++ />
++ <Tool
++ Name="VCMIDLTool"
++ />
++ <Tool
++ Name="VCCLCompilerTool"
++ Optimization="0"
++ AdditionalIncludeDirectories="../../include;../../src/common"
++ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
++ BasicRuntimeChecks="3"
++ RuntimeLibrary="1"
++ UsePrecompiledHeader="0"
++ PrecompiledHeaderFile=".\$(ConfigurationName)/PA19StaticWMME.pch"
++ AssemblerListingLocation=".\$(ConfigurationName)/"
++ ObjectFile=".\$(ConfigurationName)/"
++ ProgramDataBaseFileName=".\$(ConfigurationName)/"
++ WarningLevel="3"
++ SuppressStartupBanner="true"
++ DebugInformationFormat="4"
++ CompileAs="0"
++ DisableSpecificWarnings="4996"
++ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
++ />
++ <Tool
++ Name="VCManagedResourceCompilerTool"
++ />
++ <Tool
++ Name="VCResourceCompilerTool"
++ PreprocessorDefinitions="_DEBUG"
++ Culture="1032"
++ />
++ <Tool
++ Name="VCPreLinkEventTool"
++ />
++ <Tool
++ Name="VCLibrarianTool"
++ OutputFile="$(SolutionDir)\$(ConfigurationName)\pastaticwmmev19d.lib"
++ SuppressStartupBanner="true"
++ />
++ <Tool
++ Name="VCALinkTool"
++ />
++ <Tool
++ Name="VCXDCMakeTool"
++ />
++ <Tool
++ Name="VCBscMakeTool"
++ />
++ <Tool
++ Name="VCFxCopTool"
++ />
++ <Tool
++ Name="VCPostBuildEventTool"
++ CommandLine="set CFLAGS= /I "../../include" /I "../../src/common" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /Od /FD /EHsc /RTC1 /MTd /W3 /c /ZI /wd4996 /nologo /Fo".\$(OutDir)/" /Fd".\$(OutDir)/"
set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds.c"
cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

if "%ASIOSDK_DIR%"=="" goto NoASIO

cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\pa_asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\iasiothiscallresolver.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\common\asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\asiodrivers.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\pc\asiolist.cpp"

:NoASIO

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
++ />
++ </Configuration>
++ <Configuration
++ Name="Unicode_Debug|Win32"
++ OutputDirectory="$(ConfigurationName)"
++ IntermediateDirectory="$(ConfigurationName)"
++ ConfigurationType="4"
++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
++ UseOfMFC="0"
++ ATLMinimizesCRunTimeLibraryUsage="false"
++ CharacterSet="0"
++ >
++ <Tool
++ Name="VCPreBuildEventTool"
++ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF "%DXSDK_DIR%" == "" echo #define PA_NO_DS >>".\$(ConfigurationName)\config.h"
IF "%ASIOSDK_DIR%" == "" echo #define PA_NO_ASIO >>".\$(ConfigurationName)\config.h"
"
++ />
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ <Tool
++ Name="VCXMLDataGeneratorTool"
++ />
++ <Tool
++ Name="VCWebServiceProxyGeneratorTool"
++ />
++ <Tool
++ Name="VCMIDLTool"
++ />
++ <Tool
++ Name="VCCLCompilerTool"
++ Optimization="0"
++ AdditionalIncludeDirectories="../../include;../../src/common"
++ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
++ BasicRuntimeChecks="3"
++ RuntimeLibrary="1"
++ UsePrecompiledHeader="0"
++ PrecompiledHeaderFile=".\$(ConfigurationName)/PA19StaticWMME.pch"
++ AssemblerListingLocation=".\$(ConfigurationName)/"
++ ObjectFile=".\$(ConfigurationName)/"
++ ProgramDataBaseFileName=".\$(ConfigurationName)/"
++ WarningLevel="3"
++ SuppressStartupBanner="true"
++ DebugInformationFormat="4"
++ CompileAs="0"
++ DisableSpecificWarnings="4996"
++ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
++ />
++ <Tool
++ Name="VCManagedResourceCompilerTool"
++ />
++ <Tool
++ Name="VCResourceCompilerTool"
++ PreprocessorDefinitions="_DEBUG"
++ Culture="1032"
++ />
++ <Tool
++ Name="VCPreLinkEventTool"
++ />
++ <Tool
++ Name="VCLibrarianTool"
++ OutputFile="$(SolutionDir)\$(ConfigurationName)\pastaticwmmev19ud.lib"
++ SuppressStartupBanner="true"
++ />
++ <Tool
++ Name="VCALinkTool"
++ />
++ <Tool
++ Name="VCXDCMakeTool"
++ />
++ <Tool
++ Name="VCBscMakeTool"
++ />
++ <Tool
++ Name="VCFxCopTool"
++ />
++ <Tool
++ Name="VCPostBuildEventTool"
++ CommandLine="set CFLAGS= /I "../../include" /I "../../src/common" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /Od /FD /EHsc /RTC1 /MTd /W3 /c /ZI /wd4996 /nologo /Fo".\$(OutDir)/" /Fd".\$(OutDir)/"
set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds.c"
cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

if "%ASIOSDK_DIR%"=="" goto NoASIO

cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\pa_asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\iasiothiscallresolver.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\common\asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\asiodrivers.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\pc\asiolist.cpp"

:NoASIO

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
++ />
++ </Configuration>
++ <Configuration
++ Name="Unicode_Release|Win32"
++ OutputDirectory="$(ConfigurationName)"
++ IntermediateDirectory="$(ConfigurationName)"
++ ConfigurationType="4"
++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
++ UseOfMFC="0"
++ ATLMinimizesCRunTimeLibraryUsage="false"
++ CharacterSet="0"
++ >
++ <Tool
++ Name="VCPreBuildEventTool"
++ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF "%DXSDK_DIR%" == "" echo #define PA_NO_DS >>".\$(ConfigurationName)\config.h"
IF "%ASIOSDK_DIR%" == "" echo #define PA_NO_ASIO >>".\$(ConfigurationName)\config.h"
"
++ />
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ <Tool
++ Name="VCXMLDataGeneratorTool"
++ />
++ <Tool
++ Name="VCWebServiceProxyGeneratorTool"
++ />
++ <Tool
++ Name="VCMIDLTool"
++ />
++ <Tool
++ Name="VCCLCompilerTool"
++ AdditionalOptions="/O2"
++ Optimization="2"
++ InlineFunctionExpansion="1"
++ AdditionalIncludeDirectories="../../include;../../src/common"
++ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
++ StringPooling="true"
++ RuntimeLibrary="0"
++ EnableFunctionLevelLinking="true"
++ UsePrecompiledHeader="0"
++ PrecompiledHeaderFile=".\$(ConfigurationName)/PA19StaticWMME.pch"
++ AssemblerListingLocation=".\$(ConfigurationName)/"
++ ObjectFile=".\$(ConfigurationName)/"
++ ProgramDataBaseFileName=".\$(ConfigurationName)/"
++ WarningLevel="3"
++ SuppressStartupBanner="true"
++ CompileAs="0"
++ DisableSpecificWarnings="4996"
++ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
++ />
++ <Tool
++ Name="VCManagedResourceCompilerTool"
++ />
++ <Tool
++ Name="VCResourceCompilerTool"
++ PreprocessorDefinitions="NDEBUG"
++ Culture="1032"
++ />
++ <Tool
++ Name="VCPreLinkEventTool"
++ />
++ <Tool
++ Name="VCLibrarianTool"
++ OutputFile="$(SolutionDir)\$(ConfigurationName)\pastaticwmmev19u.lib"
++ SuppressStartupBanner="true"
++ />
++ <Tool
++ Name="VCALinkTool"
++ />
++ <Tool
++ Name="VCXDCMakeTool"
++ />
++ <Tool
++ Name="VCBscMakeTool"
++ />
++ <Tool
++ Name="VCFxCopTool"
++ />
++ <Tool
++ Name="VCPostBuildEventTool"
++ CommandLine="set CFLAGS=/I "../../include" /I "../../src/common" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /O2 /Ob1 /GF /FD /EHsc /MT /Gy /W3 /c /wd4996 /nologo /Fo".\$(OutDir)/" /Fd".\$(OutDir)/"
set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds.c"
cl %CFLAGS% /I "%DXSDK_DIR%include" "..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

if "%ASIOSDK_DIR%"=="" goto NoASIO

cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\pa_asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "..\..\src\hostapi\asio\iasiothiscallresolver.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\common\asio.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\asiodrivers.cpp"
cl %CFLAGS% /I "%ASIOSDK_DIR%/common" /I "%ASIOSDK_DIR%/host" /I "%ASIOSDK_DIR%/host/pc" "%ASIOSDK_DIR%\host\pc\asiolist.cpp"

:NoASIO

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
++ />
++ </Configuration>
++ </Configurations>
++ <References>
++ </References>
++ <Files>
++ <Filter
++ Name="Source Files"
++ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
++ >
++ <Filter
++ Name="common"
++ >
++ <File
++ RelativePath="..\..\src\common\pa_allocation.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_allocation.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_converters.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_converters.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_cpuload.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_cpuload.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_dither.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_dither.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_endianness.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_front.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_hostapi.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_process.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_process.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_skeleton.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_stream.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_stream.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_trace.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_trace.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_types.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\common\pa_util.h"
++ >
++ </File>
++ </Filter>
++ <Filter
++ Name="hostapi"
++ >
++ <Filter
++ Name="wmme"
++ >
++ <File
++ RelativePath="..\..\src\hostapi\wmme\pa_win_wmme.c"
++ >
++ </File>
++ </Filter>
++ <Filter
++ Name="wdmks"
++ >
++ <File
++ RelativePath="..\..\src\hostapi\wdmks\pa_win_wdmks.c"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ </File>
++ </Filter>
++ <Filter
++ Name="dsound"
++ >
++ <File
++ RelativePath="..\..\src\hostapi\dsound\pa_win_ds.c"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ </File>
++ <File
++ RelativePath="..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ </File>
++ <File
++ RelativePath="..\..\src\hostapi\dsound\pa_win_ds_dynlink.h"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ </File>
++ </Filter>
++ <Filter
++ Name="asio"
++ >
++ <File
++ RelativePath="..\..\src\hostapi\asio\iasiothiscallresolver.cpp"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ </File>
++ <File
++ RelativePath="..\..\src\hostapi\asio\iasiothiscallresolver.h"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ </File>
++ <File
++ RelativePath="..\..\src\hostapi\asio\pa_asio.cpp"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCLCompilerTool"
++ />
++ </FileConfiguration>
++ </File>
++ </Filter>
++ </Filter>
++ <Filter
++ Name="os"
++ >
++ <File
++ RelativePath="..\..\src\os\win\pa_win_hostapis.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\os\win\pa_win_util.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\os\win\pa_x86_plain_converters.c"
++ >
++ </File>
++ <File
++ RelativePath="..\..\src\os\win\pa_x86_plain_converters.h"
++ >
++ </File>
++ </Filter>
++ </Filter>
++ <Filter
++ Name="Public Headers"
++ Filter="h;hpp;hxx;hm;inl"
++ >
++ <File
++ RelativePath="..\..\include\pa_win_ds.h"
++ >
++ <FileConfiguration
++ Name="Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Debug|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ <FileConfiguration
++ Name="Unicode_Release|Win32"
++ ExcludedFromBuild="true"
++ >
++ <Tool
++ Name="VCCustomBuildTool"
++ />
++ </FileConfiguration>
++ </File>
++ <File
++ RelativePath="..\..\include\pa_win_wmme.h"
++ >
++ </File>
++ <File
++ RelativePath="..\..\include\portaudio.h"
++ >
++ </File>
++ </Filter>
++ </Files>
++ <Globals>
++ </Globals>
++</VisualStudioProject>
+diff -ruN pa/include/pa_unix_oss.h pam/include/pa_unix_oss.h
+--- pa/include/pa_unix_oss.h 1969-12-31 18:00:00.000000000 -0600
++++ pam/include/pa_unix_oss.h 2007-06-03 06:41:57.000000000 -0500
+@@ -0,0 +1,104 @@
++#ifndef PA_UNIX_OSS_H
++#define PA_UNIX_OSS_H
++
++/*
++ * $Id: portaudio.patch,v 1.2 2007/06/03 08:30:36 llucius Exp $
++ * PortAudio Portable Real-Time Audio Library
++ * OSS-specific extensions
++ *
++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
++ *
++ * 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.
++ *
++ */
++
++/** @file
++ * OSS-specific PortAudio API extension header file.
++ */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++const char *PaOSS_GetStreamInputDevice( PaStream *s );
++
++const char *PaOSS_GetStreamOutputDevice( PaStream *s );
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
++#ifndef PA_UNIX_OSS_H
++#define PA_UNIX_OSS_H
++
++/*
++ * $Id: portaudio.patch,v 1.2 2007/06/03 08:30:36 llucius Exp $
++ * PortAudio Portable Real-Time Audio Library
++ * OSS-specific extensions
++ *
++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
++ *
++ * 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.
++ *
++ */
++
++/** @file
++ * OSS-specific PortAudio API extension header file.
++ */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++const char *PaOSS_GetStreamInputDevice( PaStream *s );
++
++const char *PaOSS_GetStreamOutputDevice( PaStream *s );
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -ruN pa/include/pa_win_ds.h pam/include/pa_win_ds.h
+--- pa/include/pa_win_ds.h 1969-12-31 18:00:00.000000000 -0600
++++ pam/include/pa_win_ds.h 2007-06-03 06:41:57.000000000 -0500
+@@ -0,0 +1,138 @@
++#ifndef PA_WIN_DS_H
++#define PA_WIN_DS_H
++/*
++ * $Id: portaudio.patch,v 1.2 2007/06/03 08:30:36 llucius Exp $
++ * PortAudio Portable Real-Time Audio Library
++ * DirectSound specific extensions
++ *
++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
++ *
++ * 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.
++ *
++ */
++
++/** @file
++ @brief DirectSound-specific PortAudio API extension header file.
++*/
++
++
++#include "portaudio.h"
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif /* __cplusplus */
++
++
++/** Retrieve the GUID of the input device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
++
++
++/** Retrieve the GUID of the output device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* PA_WIN_DS_H */
++#ifndef PA_WIN_DS_H
++#define PA_WIN_DS_H
++/*
++ * $Id: portaudio.patch,v 1.2 2007/06/03 08:30:36 llucius Exp $
++ * PortAudio Portable Real-Time Audio Library
++ * DirectSound specific extensions
++ *
++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
++ *
++ * 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.
++ *
++ */
++
++/** @file
++ @brief DirectSound-specific PortAudio API extension header file.
++*/
++
++
++#include "portaudio.h"
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif /* __cplusplus */
++
++
++/** Retrieve the GUID of the input device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
++
++
++/** Retrieve the GUID of the output device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* PA_WIN_DS_H */
+diff -ruN pa/include/portaudio.h pam/include/portaudio.h
+--- pa/include/portaudio.h 2007-06-03 05:55:55.000000000 -0500
++++ pam/include/portaudio.h 2007-06-03 06:41:57.000000000 -0500
+@@ -1106,6 +1106,15 @@
+ signed long Pa_GetStreamWriteAvailable( PaStream* stream );
+
+
++/** Retrieve the host type handling an open stream.
++
++ @return Returns a non-negative value representing the host API type
++ handling an open stream or, a PaErrorCode (which are always negative)
++ if PortAudio is not initialized or an error is encountered.
++*/
++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
++
++
+ /* Miscellaneous utilities */
+
+
+diff -ruN pa/src/common/pa_front.c pam/src/common/pa_front.c
+--- pa/src/common/pa_front.c 2007-06-03 05:56:15.000000000 -0500
++++ pam/src/common/pa_front.c 2007-06-03 06:41:57.000000000 -0500
+@@ -1315,8 +1315,10 @@
+ hostApiInputParametersPtr, hostApiOutputParametersPtr,
+ sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
+
+- if( result == paNoError )
++ if( result == paNoError ) {
+ AddOpenStream( *stream );
++ PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
++ }
+
+
+ #ifdef PA_LOG_API_CALLS
+@@ -1908,6 +1910,32 @@
+ return result;
+ }
+
++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
++{
++ PaError error = PaUtil_ValidateStreamPointer( stream );
++ PaHostApiTypeId result;
++
++#ifdef PA_LOG_API_CALLS
++ PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
++ PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
++#endif
++
++ if( error == paNoError )
++ {
++ result = PA_STREAM_REP(stream)->hostApiType;
++ }
++ else
++ {
++ result = (PaHostApiTypeId) error;
++ }
++
++#ifdef PA_LOG_API_CALLS
++ PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
++ PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
++#endif
++
++ return result;
++}
+
+ PaError Pa_GetSampleSize( PaSampleFormat format )
+ {
+diff -ruN pa/src/common/pa_stream.c pam/src/common/pa_stream.c
+--- pa/src/common/pa_stream.c 2007-06-03 05:56:15.000000000 -0500
++++ pam/src/common/pa_stream.c 2007-06-03 06:41:57.000000000 -0500
+@@ -93,6 +93,8 @@
+ streamRepresentation->streamInfo.inputLatency = 0.;
+ streamRepresentation->streamInfo.outputLatency = 0.;
+ streamRepresentation->streamInfo.sampleRate = 0.;
++
++ streamRepresentation->hostApiType = 0;
+ }
+
+
+diff -ruN pa/src/common/pa_stream.h pam/src/common/pa_stream.h
+--- pa/src/common/pa_stream.h 2007-06-03 05:56:15.000000000 -0500
++++ pam/src/common/pa_stream.h 2007-06-03 06:41:57.000000000 -0500
+@@ -152,6 +152,7 @@
+ PaStreamFinishedCallback *streamFinishedCallback;
+ void *userData;
+ PaStreamInfo streamInfo;
++ PaHostApiTypeId hostApiType;
+ } PaUtilStreamRepresentation;
+
+
+diff -ruN pa/src/hostapi/coreaudio/pa_mac_core_blocking.c pam/src/hostapi/coreaudio/pa_mac_core_blocking.c
+--- pa/src/hostapi/coreaudio/pa_mac_core_blocking.c 2007-06-03 05:56:06.000000000 -0500
++++ pam/src/hostapi/coreaudio/pa_mac_core_blocking.c 2007-06-03 06:41:57.000000000 -0500
+@@ -66,6 +66,9 @@
+ #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
+ # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
+ # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
++#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
++# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
++# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
+ #else
+ # include <libkern/OSAtomic.h>
+ #endif
+diff -ruN pa/src/hostapi/dsound/pa_win_ds.c pam/src/hostapi/dsound/pa_win_ds.c
+--- pa/src/hostapi/dsound/pa_win_ds.c 2007-06-03 05:56:11.000000000 -0500
++++ pam/src/hostapi/dsound/pa_win_ds.c 2007-06-03 06:41:57.000000000 -0500
+@@ -198,6 +198,7 @@
+ /* DirectSound specific data. */
+
+ /* Output */
++ LPGUID pOutputGuid;
+ LPDIRECTSOUND pDirectSound;
+ LPDIRECTSOUNDBUFFER pDirectSoundOutputBuffer;
+ DWORD outputBufferWriteOffsetBytes; /* last write position */
+@@ -213,6 +214,7 @@
+ double dsw_framesWritten;
+ double framesPlayed;
+ /* Input */
++ LPGUID pInputGuid;
+ LPDIRECTSOUNDCAPTURE pDirectSoundCapture;
+ LPDIRECTSOUNDCAPTUREBUFFER pDirectSoundInputBuffer;
+ INT bytesPerInputFrame;
+@@ -1267,8 +1269,8 @@
+ PaWinDsHostApiRepresentation *winDsHostApi = (PaWinDsHostApiRepresentation*)hostApi;
+ PaWinDsStream *stream = 0;
+ int inputChannelCount, outputChannelCount;
+- PaSampleFormat inputSampleFormat, outputSampleFormat;
+- PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
++ PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;
++ PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;
+ unsigned long suggestedInputLatencyFrames, suggestedOutputLatencyFrames;
+
+ if( inputParameters )
+@@ -1486,6 +1488,11 @@
+ goto error;
+ }
+
++ stream->pOutputGuid = winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID;
++ if( stream->pOutputGuid == NULL )
++ {
++ stream->pOutputGuid = (GUID *) &DSDEVID_DefaultPlayback;
++ }
+
+ hr = paWinDsDSoundEntryPoints.DirectSoundCreate( winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID,
+ &stream->pDirectSound, NULL );
+@@ -1532,6 +1539,12 @@
+ goto error;
+ }
+
++ stream->pInputGuid = winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID;
++ if( stream->pInputGuid == NULL )
++ {
++ stream->pInputGuid = (GUID *)&DSDEVID_DefaultCapture;
++ }
++
+ hr = paWinDsDSoundEntryPoints.DirectSoundCaptureCreate( winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID,
+ &stream->pDirectSoundCapture, NULL );
+ if( hr != DS_OK )
+@@ -2193,4 +2206,19 @@
+ }
+
+
++/***********************************************************************************/
++LPGUID PaWinDS_GetStreamInputGUID( PaStream* s )
++{
++ PaWinDsStream *stream = (PaWinDsStream*)s;
+
++ return stream->pInputGuid;
++}
++
++
++/***********************************************************************************/
++LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s )
++{
++ PaWinDsStream *stream = (PaWinDsStream*)s;
++
++ return stream->pOutputGuid;
++}
+diff -ruN pa/src/hostapi/oss/pa_unix_oss.c pam/src/hostapi/oss/pa_unix_oss.c
+--- pa/src/hostapi/oss/pa_unix_oss.c 2007-06-03 05:55:58.000000000 -0500
++++ pam/src/hostapi/oss/pa_unix_oss.c 2007-06-03 06:41:57.000000000 -0500
+@@ -1942,3 +1942,26 @@
+ return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );
+ }
+
++const char *PaOSS_GetStreamInputDevice( PaStream* s )
++{
++ PaOssStream *stream = (PaOssStream*)s;
++
++ if( stream->capture )
++ {
++ return stream->capture->devName;
++ }
++
++ return NULL;
++}
++
++const char *PaOSS_GetStreamOutputDevice( PaStream* s )
++{
++ PaOssStream *stream = (PaOssStream*)s;
++
++ if( stream->playback )
++ {
++ return stream->playback->devName;
++ }
++
++ return NULL;
++}
Added: freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,2 @@
+/portmixer.h/1.2/Tue Jun 15 07:59:34 2004//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_common
Added: freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_common/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_common/portmixer.h
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_common/portmixer.h Fri Aug 24 13:53:53 2007
@@ -0,0 +1,138 @@
+#ifndef PORT_MIXER_H
+#define PORT_MIXER_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/*
+ * PortMixer
+ * PortMixer API Header File
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include "portaudio.h"
+
+typedef void PxMixer;
+
+typedef float PxVolume; /* 0.0 (min) --> 1.0 (max) */
+typedef float PxBalance; /* -1.0 (left) --> 1.0 (right) */
+
+/*
+ Px_GetNumMixers returns the number of mixers which could be
+ used with the given PortAudio device. On most systems, there
+ will be only one mixer for each device; however there may be
+ multiple mixers for each device, or possibly multiple mixers
+ which are independent of any particular PortAudio device.
+*/
+
+int Px_GetNumMixers( void *pa_stream );
+const char *Px_GetMixerName( void *pa_stream, int i );
+
+/*
+ Px_OpenMixer() returns a mixer which will work with the given PortAudio
+ audio device. Pass 0 as the index for the first (default) mixer.
+*/
+
+PxMixer *Px_OpenMixer( void *pa_stream, int i );
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer);
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer );
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume );
+
+/*
+ Main output volume
+*/
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer );
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume );
+int Px_SupportsPCMOutputVolume( PxMixer* mixer ) ;
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer );
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i );
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i );
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume );
+
+/*
+ Input source
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer );
+const char *Px_GetInputSourceName( PxMixer *mixer, int i);
+int Px_GetCurrentInputSource( PxMixer *mixer ); /* may return -1 == none */
+void Px_SetCurrentInputSource( PxMixer *mixer, int i );
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer );
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume );
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer );
+PxBalance Px_GetOutputBalance( PxMixer *mixer );
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance );
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer );
+PxVolume Px_GetPlaythrough( PxMixer *mixer );
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PORT_AUDIO_H */
Added: freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,2 @@
+/px_mac.c/1.2/Tue Jun 15 07:59:35 2004//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_mac
Added: freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_mac/px_mac.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac/px_mac.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,406 @@
+/*
+ * PortMixer
+ * Mac OS 9 implementation
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "portaudio.h"
+#include "pa_host.h"
+#include "portmixer.h"
+
+#define PA_MAX_NUM_HOST_BUFFERS (16) /* Do not exceed!! */
+
+typedef struct MultiBuffer
+{
+ char *buffers[PA_MAX_NUM_HOST_BUFFERS];
+ int numBuffers;
+ int nextWrite;
+ int nextRead;
+}
+MultiBuffer;
+
+/* Define structure to contain all Macintosh specific data. */
+typedef struct PaHostSoundControl
+{
+ UInt64 pahsc_EntryCount;
+ double pahsc_InverseMicrosPerHostBuffer; /* 1/Microseconds of real-time audio per user buffer. */
+
+ /* Use char instead of Boolean for atomic operation. */
+ volatile char pahsc_IsRecording; /* Recording in progress. Set by foreground. Cleared by background. */
+ volatile char pahsc_StopRecording; /* Signal sent to background. */
+ volatile char pahsc_IfInsideCallback;
+ /* Input */
+ SPB pahsc_InputParams;
+ SICompletionUPP pahsc_InputCompletionProc;
+ MultiBuffer pahsc_InputMultiBuffer;
+ int32 pahsc_BytesPerInputHostBuffer;
+ int32 pahsc_InputRefNum;
+ /* Output */
+ CmpSoundHeader pahsc_SoundHeaders[PA_MAX_NUM_HOST_BUFFERS];
+ int32 pahsc_BytesPerOutputHostBuffer;
+ SndChannelPtr pahsc_Channel;
+ SndCallBackUPP pahsc_OutputCompletionProc;
+ int32 pahsc_NumOutsQueued;
+ int32 pahsc_NumOutsPlayed;
+ PaTimestamp pahsc_NumFramesDone;
+ UInt64 pahsc_WhenFramesDoneIncremented;
+ /* Init Time -------------- */
+ int32 pahsc_NumHostBuffers;
+ int32 pahsc_FramesPerHostBuffer;
+ int32 pahsc_UserBuffersPerHostBuffer;
+ int32 pahsc_MinFramesPerHostBuffer; /* Can vary depending on virtual memory usage. */
+}
+PaHostSoundControl;
+
+typedef struct PxSource
+{
+ char name[256];
+} PxSource;
+
+typedef struct PxInfo
+{
+ SPB *input;
+ int32 inputRefNum;
+ SndChannelPtr output;
+ int32 numSources;
+ PxSource *sources;
+} PxInfo;
+
+int Px_GetNumMixers( void *pa_stream )
+{
+ return 0;
+}
+
+const char *Px_GetMixerName( void *pa_stream, int index )
+{
+ return "Mac Sound Manager";
+}
+
+PxMixer *Px_OpenMixer( void *pa_stream, int index )
+{
+ PxInfo *info;
+ internalPortAudioStream *past;
+ PaHostSoundControl *macInfo;
+ OSErr err;
+ int i, j;
+ Handle h;
+ unsigned char *data;
+
+ info = (PxInfo *)malloc(sizeof(PxInfo));
+ past = (internalPortAudioStream *) pa_stream;
+ macInfo = (PaHostSoundControl *) past->past_DeviceData;
+
+ info->input = &macInfo->pahsc_InputParams;
+ info->inputRefNum = macInfo->pahsc_InputRefNum;
+ info->output = macInfo->pahsc_Channel;
+
+ info->numSources = 0;
+ info->sources = NULL;
+
+ err = SPBGetDeviceInfo (info->inputRefNum, siInputSourceNames, &h);
+ if (err)
+ return (PxMixer *)info;
+
+ HLock(h);
+ HNoPurge(h);
+
+ data = (unsigned char *)*h;
+ info->numSources = ((short *)data)[0];
+ if (info->numSources <= 0 || info->numSources > 50) {
+ HUnlock(h);
+ return (PxMixer *)info;
+ }
+
+ info->sources = (PxSource *)malloc(info->numSources * sizeof(PxSource));
+ data += 2;
+ for(i=0; i<info->numSources; i++) {
+ int len = *data++;
+
+ if (len > 63) {
+ info->numSources = 0;
+ free(info->sources);
+ info->sources = NULL;
+ HUnlock(h);
+ return (PxMixer *)info;
+ }
+
+ for(j=0; j<len; j++)
+ info->sources[i].name[j] = *data++;
+
+ info->sources[i].name[len] = 0;
+ }
+ HUnlock(h);
+
+ return (PxMixer *)info;
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (info->sources)
+ free(info->sources);
+ free(info);
+}
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0.0;
+}
+
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ PCM output volume
+*/
+
+int Px_SupportsPCMOutputVolume( PxMixer* mixer )
+{
+ return 1 ;
+}
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSErr err;
+ long packedVol;
+ SndCommand cmd;
+
+ cmd.cmd = getVolumeCmd;
+ cmd.param1 = 0;
+ cmd.param2 = (long)&packedVol;
+
+ err = SndDoImmediate(info->output, &cmd);
+ if (err)
+ return 0.0;
+
+ return ((packedVol & 0xFFFF) + ((packedVol & 0xFFFF0000) >> 16) / 2.0) / 256.0;
+}
+
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSErr err;
+ long packedVol;
+ SndCommand cmd;
+
+ packedVol = (unsigned long)volume * 256.0;
+ packedVol += (packedVol << 16);
+
+ cmd.cmd = volumeCmd;
+ cmd.param1 = 0;
+ cmd.param2 = packedVol;
+ err = SndDoImmediate(info->output, &cmd);
+}
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0;
+}
+
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return NULL;
+}
+
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return NULL;
+}
+
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ Input sources
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return info->numSources;
+}
+
+const char *Px_GetInputSourceName( PxMixer *mixer, int i)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (i >= 0 && i < info->numSources)
+ return info->sources[i].name;
+ else
+ return "";
+}
+
+int Px_GetCurrentInputSource( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ short selected;
+ OSErr err;
+
+ err = SPBGetDeviceInfo (info->inputRefNum, siInputSource, &selected);
+ if (err)
+ return 0;
+
+ return selected - 1;
+}
+
+void Px_SetCurrentInputSource( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ short selected = i+1;
+ OSErr err;
+
+ err = SPBSetDeviceInfo (info->inputRefNum, siInputSource, &selected);
+}
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ Fixed fixedGain;
+ PxVolume vol;
+ OSErr err;
+
+ if (info->input) {
+ err = SPBGetDeviceInfo(info->inputRefNum, siInputGain, (Ptr)&fixedGain);
+ if (err)
+ return 0.0;
+
+ vol = (fixedGain / 65536.0) - 0.5;
+ return vol;
+ }
+
+ return 0.0;
+}
+
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ Fixed fixedGain;
+ OSErr err;
+
+ if (info->input) {
+ fixedGain = (Fixed)((volume + 0.5) * 65536.0);
+ err = SPBSetDeviceInfo(info->inputRefNum, siInputGain, (Ptr)&fixedGain);
+ }
+}
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetOutputBalance( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance )
+{
+}
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return (info->input != NULL);
+}
+
+PxVolume Px_GetPlaythrough( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSErr err;
+ short level;
+
+ err = SPBGetDeviceInfo(info->inputRefNum, siPlayThruOnOff, (Ptr)&level);
+ if (err)
+ return 0.0;
+
+ if (level < 0)
+ level = 0;
+ if (level > 7)
+ level = 7;
+
+ return (PxVolume)(level / 7.0);
+}
+
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSErr err;
+ short level = (int)(volume * 7.0 + 0.5);
+
+ err = SPBSetDeviceInfo(info->inputRefNum, siPlayThruOnOff, (Ptr)&level);
+}
Added: freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,3 @@
+/Makefile/1.3/Sat Jun 10 21:39:08 2006//
+/px_mac_core.c/1.8/Sat Aug 26 06:45:54 2006//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_mac_core
Added: freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac_core/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_mac_core/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac_core/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,25 @@
+# Make PortMixer Library for Mac OS X / CoreAudio
+
+CC = cc
+CFLAGS = -g -I../px_common
+PA = ../../portaudio$(PA_VER)
+
+ifeq ($(PA_VER),-v19)
+CFLAGS += -I$(PA)/include -I$(PA)/src/common -I$(PA)/src/hostapi/coreaudio
+else
+CFLAGS += -I$(PA)/pa_common
+endif
+
+PASRC = px_mac_core.c
+PAINC = ../px_common/portmixer.h
+PAOBJ = px_mac_core.o
+
+portmixer.a: $(PAOBJ)
+ ar ruv portmixer.a $(PAOBJ)
+ ranlib portmixer.a
+
+clean:
+ rm -f portmixer.a *.o
+
+%.o: %.c $(PAINC) Makefile
+ $(CC) -c $(CFLAGS) $< -o $@
Added: freeswitch/branches/cseket/libs/portmixer/px_mac_core/px_mac_core.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_mac_core/px_mac_core.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,528 @@
+/*
+ * PortMixer
+ * Mac OS X / CoreAudio implementation
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <CoreServices/CoreServices.h>
+#include <CoreAudio/CoreAudio.h>
+#include <AudioToolbox/AudioConverter.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "portaudio.h"
+#include "portmixer.h"
+
+#if defined(PaStream)
+#define PA_V18
+#include "pa_host.h"
+#else
+#define PA_V19
+#include "pa_mac_core_internal.h"
+#endif
+
+typedef enum PaDeviceMode
+{
+ PA_MODE_OUTPUT_ONLY,
+ PA_MODE_INPUT_ONLY,
+ PA_MODE_IO_ONE_DEVICE,
+ PA_MODE_IO_TWO_DEVICES
+} PaDeviceMode;
+
+typedef struct PaHostInOut_s
+{
+ AudioDeviceID audioDeviceID; /* CoreAudio specific ID */
+ int bytesPerUserNativeBuffer; /* User buffer size in native host format. Depends on numChannels. */
+ AudioConverterRef converter;
+ void *converterBuffer;
+ int numChannels;
+} PaHostInOut;
+
+/**************************************************************
+ * Structure for internal host specific stream data.
+ * This is allocated on a per stream basis.
+ */
+typedef struct PaHostSoundControl
+{
+ PaHostInOut input;
+ PaHostInOut output;
+ AudioDeviceID primaryDeviceID;
+} PaHostSoundControl;
+
+// define value of isInput passed to CoreAudio routines
+#define IS_INPUT (true)
+#define IS_OUTPUT (false)
+
+typedef struct PxInfo
+{
+ AudioDeviceID input;
+ AudioDeviceID output;
+ UInt32 *srcids;
+ char **srcnames;
+ int numsrcs;
+} PxInfo;
+
+static PxInfo *Px_FreeInfo( PxInfo *info )
+{
+ int i;
+
+ if (info) {
+ if (info->srcids) {
+ free(info->srcids);
+ }
+
+ if (info->srcnames) {
+ for (i = 0; i < info->numsrcs; i++) {
+ if (info->srcnames[i]) {
+ free(info->srcnames[i]);
+ }
+ }
+ free(info->srcnames);
+ }
+ free(info);
+ }
+
+ return NULL;
+}
+
+int Px_GetNumMixers( void *pa_stream )
+{
+ return 1;
+}
+
+const char *Px_GetMixerName( void *pa_stream, int index )
+{
+ return "CoreAudio";
+}
+
+PxMixer *Px_OpenMixer( void *pa_stream, int index )
+{
+ PxInfo *info;
+ PaHostSoundControl *macInfo;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 inID;
+ int i;
+
+ info = (PxInfo *)calloc(1, sizeof(PxInfo));
+ if (!info) {
+ return (PxMixer *)info;
+ }
+
+#if defined(PA_V18)
+ internalPortAudioStream *past;
+
+ past = (internalPortAudioStream *) pa_stream;
+ macInfo = (PaHostSoundControl *) past->past_DeviceData;
+
+ info->input = macInfo->input.audioDeviceID;
+ info->output = macInfo->output.audioDeviceID;
+#endif
+
+#if defined(PA_V19)
+ PaMacCoreStream *pamcs;
+
+ pamcs = (PaMacCoreStream *) pa_stream;
+
+ info->input = pamcs->inputDevice;
+ info->output = pamcs->outputDevice;
+#endif
+
+ if (info->input == kAudioDeviceUnknown) {
+ outSize = sizeof(AudioDeviceID);
+ err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
+ &outSize,
+ &info->input);
+ if (err) {
+ return Px_FreeInfo(info);
+ }
+ }
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetPropertyInfo(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSources,
+ &outSize,
+ NULL);
+ if (err) {
+ return Px_FreeInfo(info);
+ }
+
+ info->numsrcs = outSize / sizeof(UInt32);
+ info->srcids = (UInt32 *)malloc(outSize);
+ info->srcnames = (char **)calloc(info->numsrcs, sizeof(char *));
+
+ if (info->srcids == NULL || info->srcnames == NULL) {
+ return Px_FreeInfo(info);
+ }
+
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSources,
+ &outSize,
+ info->srcids);
+ if (err) {
+ return Px_FreeInfo(info);
+ }
+
+ for (i = 0; i < info->numsrcs; i++) {
+ AudioValueTranslation trans;
+ CFStringRef name;
+ Boolean ok;
+
+ trans.mInputData = &info->srcids[i];
+ trans.mInputDataSize = sizeof(UInt32);
+ trans.mOutputData = &name;
+ trans.mOutputDataSize = sizeof(CFStringRef);
+
+ outSize = sizeof(AudioValueTranslation);
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSourceNameForIDCFString,
+ &outSize,
+ &trans);
+ if (err) {
+ return Px_FreeInfo(info);
+ }
+
+ info->srcnames[i] = malloc(CFStringGetLength(name)+1);
+ if (info->srcnames[i] == NULL) {
+ return Px_FreeInfo(info);
+ }
+
+ ok = CFStringGetCString(name,
+ info->srcnames[i],
+ CFStringGetLength(name)+1,
+ kCFStringEncodingISOLatin1);
+ if (!ok) {
+ return Px_FreeInfo(info);
+ }
+ }
+
+ return (PxMixer *)info;
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ Px_FreeInfo(info);
+}
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0.0;
+}
+
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ PCM output volume
+*/
+
+static PxVolume Px_GetVolume(AudioDeviceID device, Boolean isInput)
+{
+ OSStatus err;
+ UInt32 outSize;
+ Float32 vol, maxvol=0.0;
+ UInt32 mute, anymuted=0;
+ int ch;
+ PxVolume max;
+
+ for(ch=0; ch<=2; ch++) {
+ outSize = sizeof(Float32);
+ err = AudioDeviceGetProperty(device, ch, isInput,
+ kAudioDevicePropertyVolumeScalar,
+ &outSize, &vol);
+ if (!err) {
+ if (vol > maxvol)
+ maxvol = vol;
+ }
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(device, ch, isInput,
+ kAudioDevicePropertyMute,
+ &outSize, &mute);
+
+ if (!err) {
+ if (mute)
+ anymuted = 1;
+ }
+ }
+
+ if (anymuted)
+ maxvol = 0.0;
+
+ return maxvol;
+}
+
+static void Px_SetVolume(AudioDeviceID device, Boolean isInput,
+ PxVolume volume)
+{
+ Float32 vol = volume;
+ UInt32 mute = 0;
+ int ch;
+ OSStatus err;
+
+ /* Implement a passive attitude towards muting. If they
+ drag the volume above 0.05, unmute it. But if they
+ drag the volume down below that, just set the volume,
+ don't actually mute.
+ */
+
+ for(ch=0; ch<=2; ch++) {
+ err = AudioDeviceSetProperty(device, 0, ch, isInput,
+ kAudioDevicePropertyVolumeScalar,
+ sizeof(Float32), &vol);
+ if (vol > 0.05) {
+ err = AudioDeviceSetProperty(device, 0, ch, isInput,
+ kAudioDevicePropertyMute,
+ sizeof(UInt32), &mute);
+ }
+ }
+}
+
+int Px_SupportsPCMOutputVolume( PxMixer* mixer )
+{
+ return 1 ;
+}
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return Px_GetVolume(info->output, IS_OUTPUT);
+}
+
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ Px_SetVolume(info->output, IS_OUTPUT, volume);
+}
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 1;
+}
+
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i )
+{
+ if (i == 0)
+ return "PCM";
+ else
+ return "";
+}
+
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i )
+{
+ return Px_GetPCMOutputVolume(mixer);
+}
+
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume )
+{
+ Px_SetPCMOutputVolume(mixer, volume);
+}
+
+/*
+ Input sources
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSStatus err;
+ UInt32 outSize;
+
+ return info->numsrcs;
+}
+
+const char *Px_GetInputSourceName( PxMixer *mixer, int i)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (i >= info->numsrcs)
+ return "";
+
+ return info->srcnames[i];
+}
+
+int Px_GetCurrentInputSource( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 outID = 0;
+ int i;
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSource,
+ &outSize,
+ &outID);
+
+ if (!err) {
+ for (i = 0; i < info->numsrcs; i++) {
+ if (info->srcids[i] == outID) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+void Px_SetCurrentInputSource( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSStatus err;
+
+ if (i >= info->numsrcs) {
+ return;
+ }
+
+ err = AudioDeviceSetProperty(info->input,
+ 0,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSource,
+ sizeof(UInt32),
+ &info->srcids[i]);
+
+ return;
+}
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return Px_GetVolume(info->input, IS_INPUT);
+}
+
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ Px_SetVolume(info->input, IS_INPUT, volume);
+}
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetOutputBalance( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance )
+{
+}
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer )
+{
+ return 1;
+}
+
+PxVolume Px_GetPlaythrough( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 flag;
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(info->output, 0, IS_OUTPUT,
+ kAudioDevicePropertyPlayThru,
+ &outSize, &flag);
+ if (err)
+ return 0.0;
+
+ if (flag)
+ return 1.0;
+ else
+ return 0.0;
+}
+
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ UInt32 flag = (volume > 0.01);
+ OSStatus err;
+
+ err = AudioDeviceSetProperty(info->output, 0, 0, IS_OUTPUT,
+ kAudioDevicePropertyPlayThru,
+ sizeof(UInt32), &flag);
+}
+
Added: freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,3 @@
+/Makefile/1.1.1.1/Mon Dec 2 01:14:03 2002//
+/px_none.c/1.1.1.1/Mon Dec 2 01:14:03 2002//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_none
Added: freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_none/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_none/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_none/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,18 @@
+# Make PortMixer Library for Mac OS X / CoreMixer
+
+CC = cc
+
+CFLAGS = -g -I../px_common -I../../portaudio/pa_common
+PASRC = px_none.c
+PAINC = ../px_common/portmixer.h
+PAOBJ = px_none.o
+
+portmixer.a: $(PAOBJ)
+ ar ruv portmixer.a $(PAOBJ)
+ ranlib portmixer.a
+
+clean:
+ rm -f portmixer.a *.o
+
+%.o: %.c $(PAINC) Makefile
+ $(CC) -c $(CFLAGS) $< -o $@
Added: freeswitch/branches/cseket/libs/portmixer/px_none/px_none.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_none/px_none.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,216 @@
+/*
+ * PortMixer
+ * Empty implementation (as a placeholder on platforms where
+ * it hasn't been implemented yet)
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <stdlib.h>
+
+#include "portaudio.h"
+#include "portmixer.h"
+
+typedef struct PxInfo
+{
+ int dummy;
+} PxInfo;
+
+int Px_GetNumMixers( void *pa_stream )
+{
+ return 0;
+}
+
+const char *Px_GetMixerName( void *pa_stream, int index )
+{
+ return NULL;
+}
+
+PxMixer *Px_OpenMixer( void *pa_stream, int index )
+{
+ return NULL;
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+}
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0.0;
+}
+
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ PCM output volume
+*/
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0.0;
+}
+
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0;
+}
+
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return NULL;
+}
+
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return NULL;
+}
+
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ Input sources
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0;
+}
+
+const char *Px_GetInputSourceName( PxMixer *mixer, int i)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return NULL;
+}
+
+int Px_GetCurrentInputSource( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return -1; /* none */
+}
+
+void Px_SetCurrentInputSource( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 0.0;
+}
+
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+}
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetOutputBalance( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance )
+{
+}
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetPlaythrough( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetPlaythrough( PxMixer *mixer, PxBalance balance )
+{
+}
+
Added: freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,3 @@
+/Makefile/1.2/Sun Mar 9 04:04:53 2003//
+/px_test.c/1.2/Sun Mar 9 04:04:53 2003//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_tests
Added: freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_tests/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_tests/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_tests/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,16 @@
+all: px_test
+
+CFLAGS = -g -Wall -O -I../../portaudio/pa_common -I../px_common
+
+px_test: px_test.o px_unix_oss.o ../px_common/portmixer.h
+ gcc -g -o px_test px_test.o px_unix_oss.o -lm \
+ -L../../portaudio/pa_unix_oss -lportaudio -lpthread
+
+px_test.o: px_test.c ../px_common/portmixer.h
+ gcc $(CFLAGS) -c px_test.c
+
+
+px_unix_oss.o: ../px_unix_oss/px_unix_oss.c ../px_common/portmixer.h
+ gcc $(CFLAGS) -c ../px_unix_oss/px_unix_oss.c
+
+
Added: freeswitch/branches/cseket/libs/portmixer/px_tests/px_test.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_tests/px_test.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,80 @@
+#include <stdio.h>
+
+#include "portmixer.h"
+#include "portaudio.h"
+
+static int DummyCallbackFunc(void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ PaTimestamp outTime, void *userData)
+{
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int num_mixers;
+ int i;
+ PaError error;
+ PortAudioStream *stream;
+ int recDeviceNum;
+ int playDeviceNum;
+ int inputChannels = 2;
+
+ recDeviceNum = Pa_GetDefaultInputDeviceID();
+ playDeviceNum = Pa_GetDefaultOutputDeviceID();
+
+ error = Pa_OpenStream(&stream, recDeviceNum, inputChannels, paFloat32, NULL,
+ paNoDevice, 0, paFloat32, NULL,
+ 44101, 512, 1, paClipOff | paDitherOff,
+ DummyCallbackFunc, NULL);
+
+ if (error) {
+ printf("PortAudio error %d: %s\n", error,
+ Pa_GetErrorText(error));
+ return -1;
+ }
+
+ num_mixers = Px_GetNumMixers(stream);
+ printf("Number of mixers: %d\n", num_mixers);
+ for(i=0; i<num_mixers; i++) {
+ PxMixer *mixer;
+ int num;
+ int j;
+
+ printf("Mixer %d: %s\n", i, Px_GetMixerName(stream, i));
+ mixer = Px_OpenMixer(stream, i);
+ if (!mixer) {
+ printf(" Could not open mixer!\n");
+ continue;
+ }
+
+ printf(" Master volume: %.2f\n", Px_GetMasterVolume(mixer));
+ printf(" PCM output volume: %.2f\n", Px_GetPCMOutputVolume(mixer));
+
+ num = Px_GetNumOutputVolumes(mixer);
+ printf(" Num outputs: %d\n", num);
+ for(j=0; j<num; j++) {
+ printf(" Output %d (%s): %.2f\n",
+ j,
+ Px_GetOutputVolumeName(mixer, j),
+ Px_GetOutputVolume(mixer, j));
+ }
+
+ num = Px_GetNumInputSources(mixer);
+ printf(" Num input sources: %d\n", num);
+ for(j=0; j<num; j++) {
+ printf(" Input %d (%s) %s\n",
+ j,
+ Px_GetInputSourceName(mixer, j),
+ (Px_GetCurrentInputSource(mixer)==j?
+ "SELECTED": ""));
+ }
+ printf(" Input volume: %.2f\n", Px_GetInputVolume(mixer));
+
+ Px_CloseMixer(mixer);
+ }
+
+ Pa_CloseStream(stream);
+
+ return 0;
+}
Added: freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,3 @@
+/Makefile/1.1/Mon Dec 2 06:22:32 2002//
+/px_unix_oss.c/1.5/Fri Dec 2 10:23:45 2005//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_unix_oss
Added: freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_unix_oss/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_unix_oss/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_unix_oss/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,18 @@
+# Make PortMixer Library for Unix / OSS
+
+CC = gcc
+
+CFLAGS = -g -I../px_common -I../../portaudio/pa_common
+PASRC = px_unix_oss.c
+PAINC = ../px_common/portmixer.h
+PAOBJ = px_unix_oss.o
+
+portmixer.a: $(PAOBJ)
+ ar ruv portmixer.a $(PAOBJ)
+ ranlib portmixer.a
+
+clean:
+ rm -f portmixer.a *.o
+
+%.o: %.c $(PAINC) Makefile
+ $(CC) -c $(CFLAGS) $< -o $@
Added: freeswitch/branches/cseket/libs/portmixer/px_unix_oss/px_unix_oss.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_unix_oss/px_unix_oss.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,385 @@
+/*
+ * PortMixer
+ * Unix OSS Implementation
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#if defined(__linux__)
+#include <linux/soundcard.h>
+#elif defined(__FreeBSD__)
+#include <sys/soundcard.h>
+#else
+#include <machine/soundcard.h> /* JH20010905 */
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+
+#include "portaudio.h"
+#include "portmixer.h"
+
+typedef struct PxInfo
+{
+ int index;
+ int fd;
+
+ int num_out;
+ int outs[SOUND_MIXER_NRDEVICES];
+ int num_rec;
+ int recs[SOUND_MIXER_NRDEVICES];
+} PxInfo;
+
+char PxDevice[20] = "/dev/mixerX";
+
+int PxNumDevices = 0;
+int PxDevices[10];
+
+int Px_GetNumMixers( void *pa_stream )
+{
+ int i;
+ int fd;
+
+ PxNumDevices = 0;
+
+ for(i=0; i<11; i++) {
+ if (i==0)
+ PxDevice[10] = 0;
+ else
+ PxDevice[10] = '0'+(i-1);
+ fd = open(PxDevice, O_RDWR);
+ if (fd >= 0) {
+ PxDevices[PxNumDevices] = i;
+ PxNumDevices++;
+ close(fd);
+ }
+ }
+
+ return PxNumDevices;
+}
+
+const char *Px_GetMixerName( void *pa_stream, int index )
+{
+ if (PxNumDevices <= 0)
+ Px_GetNumMixers(pa_stream);
+
+ if (index < 0 || index >= PxNumDevices)
+ return NULL;
+
+ if (PxDevices[index]==0)
+ PxDevice[10] = 0;
+ else
+ PxDevice[10] = '0'+(PxDevices[index]-1);
+ return PxDevice;
+}
+
+PxMixer *Px_OpenMixer( void *pa_stream, int index )
+{
+ PxInfo *info;
+ int devmask, recmask, outmask;
+ int i;
+
+ if (PxNumDevices <= 0)
+ Px_GetNumMixers(pa_stream);
+
+ if (index < 0 || index >= PxNumDevices)
+ return NULL;
+
+ info = (PxInfo *)malloc(sizeof(PxInfo));
+ info->index = PxDevice[index];
+
+ if (PxDevices[index]==0)
+ PxDevice[10] = 0;
+ else
+ PxDevice[10] = '0'+(PxDevices[index]-1);
+ info->fd = open(PxDevice, O_RDWR);
+ if (info->fd < 0)
+ goto bad;
+
+ if (ioctl(info->fd, MIXER_READ(SOUND_MIXER_READ_DEVMASK),
+ &devmask) == -1)
+ goto bad;
+ if (ioctl(info->fd, MIXER_READ(SOUND_MIXER_READ_RECMASK),
+ &recmask) == -1)
+ goto bad;
+ outmask = devmask ^ recmask;
+
+ info->num_out = 0;
+ info->num_rec = 0;
+
+ for(i=0; i<SOUND_MIXER_NRDEVICES; i++)
+ if (recmask & (1<<i))
+ info->recs[info->num_rec++] = i;
+ else if (devmask & (1<<i))
+ info->outs[info->num_out++] = i;
+
+ return (PxMixer *)info;
+
+ bad:
+ free(info);
+ return NULL;
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ close(info->fd);
+
+ free(info);
+}
+
+PxVolume GetVolume(int fd, int channel)
+{
+ int vol;
+ int stereo;
+
+ if (ioctl(fd, SOUND_MIXER_READ_STEREODEVS, &stereo) == 0)
+ stereo = ((stereo & (1 << channel)) != 0);
+ else
+ stereo = 0;
+
+ if (ioctl(fd, MIXER_READ(channel), &vol) == -1)
+ return 0.0;
+
+ if (stereo)
+ return ((vol & 0xFF)/200.0) + (((vol>>8) & 0xFF)/200.0);
+ else
+ return (vol & 0xFF)/100.0;
+}
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return GetVolume(info->fd, SOUND_MIXER_VOLUME);
+}
+
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ int vol = (int)((volume * 100.0) + 0.5);
+ vol = (vol | (vol<<8));
+ ioctl(info->fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &vol);
+}
+
+/*
+ PCM output volume
+*/
+
+int Px_SupportsPCMOutputVolume( PxMixer* mixer )
+{
+ return 1 ;
+}
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return GetVolume(info->fd, SOUND_MIXER_PCM);
+}
+
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ int vol = (int)((volume * 100.0) + 0.5);
+ vol = (vol | (vol<<8));
+ ioctl(info->fd, MIXER_WRITE(SOUND_MIXER_PCM), &vol);
+}
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return info->num_out;
+}
+
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ const char *labels[] = SOUND_DEVICE_LABELS;
+
+ return labels[info->outs[i]];
+}
+
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return GetVolume(info->fd, info->outs[i]);
+}
+
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ int vol = (int)((volume * 100.0) + 0.5);
+ vol = (vol | (vol<<8));
+ ioctl(info->fd, MIXER_WRITE(info->outs[i]), &vol);
+}
+
+/*
+ Input sources
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return info->num_rec;
+}
+
+const char *Px_GetInputSourceName( PxMixer *mixer, int i)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ const char *labels[] = SOUND_DEVICE_LABELS;
+ return labels[info->recs[i]];
+}
+
+int Px_GetCurrentInputSource( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ int recmask;
+ int i;
+
+ /* Note that there may be more than one in OSS; we pick
+ the first one */
+
+ if (ioctl(info->fd, MIXER_READ(SOUND_MIXER_READ_RECSRC),
+ &recmask) == -1)
+ return -1; /* none / error */
+
+ for(i=0; i<info->num_rec; i++)
+ if (recmask & (1 << (info->recs[i])))
+ return i;
+
+ return -1; /* none */
+}
+
+void Px_SetCurrentInputSource( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ int newrecsrcmask = (1 << (info->recs[i]));
+
+ ioctl(info->fd, MIXER_WRITE(SOUND_MIXER_READ_RECSRC),
+ &newrecsrcmask);
+}
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ int i;
+
+ i = Px_GetCurrentInputSource(mixer);
+ if (i < 0)
+ return 0.0;
+
+ return GetVolume(info->fd, info->recs[i]);
+}
+
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ int vol;
+ int i;
+
+ i = Px_GetCurrentInputSource(mixer);
+ if (i < 0)
+ return;
+
+ vol = (int)((volume * 100.0) + 0.5);
+ vol = (vol | (vol<<8));
+ ioctl(info->fd, MIXER_WRITE(info->recs[i]), &vol);
+}
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetOutputBalance( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance )
+{
+}
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxVolume Px_GetPlaythrough( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume )
+{
+}
+
Added: freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,3 @@
+/Makefile/1.1/Mon Sep 22 09:01:06 2003//
+/px_win_wmme.c/1.8/Sat Jun 10 21:39:08 2006//
+D
Added: freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/px_win_wmme
Added: freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_win_wmme/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/px_win_wmme/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_win_wmme/Makefile Fri Aug 24 13:53:53 2007
@@ -0,0 +1,18 @@
+# Make PortMixer Library for Windows / Cygwin
+
+CC = gcc
+
+override CFLAGS = -g -I../px_common -I../../portaudio/pa_common
+PASRC = px_win_wmme.c
+PAINC = ../px_common/portmixer.h
+PAOBJ = px_win_wmme.o
+
+portmixer.a: $(PAOBJ)
+ ar ruv portmixer.a $(PAOBJ)
+ ranlib portmixer.a
+
+clean:
+ rm -f portmixer.a *.o
+
+%.o: %.c $(PAINC) Makefile
+ $(CC) -c $(CFLAGS) $< -o $@
Added: freeswitch/branches/cseket/libs/portmixer/px_win_wmme/px_win_wmme.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/px_win_wmme/px_win_wmme.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,622 @@
+/*
+ * PortMixer
+ * Windows WMME Implementation
+ *
+ * Copyright (c) 2002
+ *
+ * Written by Dominic Mazzoni and Augustus Saunders
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <Windows.h>
+
+#include "portaudio.h"
+#include "portmixer.h"
+
+#if defined(PaStream)
+#define PA_V18
+#else
+#define PA_V19
+#endif
+
+#if defined(PA_V18)
+#include "pa_host.h"
+
+typedef struct PaWMMEStreamData
+{
+ /* Input -------------- */
+ HWAVEIN hWaveIn;
+ WAVEHDR *inputBuffers;
+ int currentInputBuffer;
+ int bytesPerHostInputBuffer;
+ int bytesPerUserInputBuffer; /* native buffer size in bytes */
+ /* Output -------------- */
+ HWAVEOUT hWaveOut;
+} PaWMMEStreamData;
+#endif
+
+#if defined(PA_V19)
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "pa_stream.h"
+
+typedef struct
+{
+ HANDLE bufferEvent;
+ void *waveHandles;
+ unsigned int deviceCount;
+ /* unsigned int channelCount; */
+ WAVEHDR **waveHeaders; /* waveHeaders[device][buffer] */
+ unsigned int bufferCount;
+ unsigned int currentBufferIndex;
+ unsigned int framesPerBuffer;
+ unsigned int framesUsedInCurrentBuffer;
+}PaWinMmeSingleDirectionHandlesAndBuffers;
+
+/* PaWinMmeStream - a stream data structure specifically for this implementation */
+/* note that struct PaWinMmeStream is typedeffed to PaWinMmeStream above. */
+struct PaWinMmeStream
+{
+ PaUtilStreamRepresentation streamRepresentation;
+ PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+ PaUtilBufferProcessor bufferProcessor;
+
+ int primeStreamUsingCallback;
+
+ PaWinMmeSingleDirectionHandlesAndBuffers input;
+ PaWinMmeSingleDirectionHandlesAndBuffers output;
+
+ /* Processing thread management -------------- */
+ HANDLE abortEvent;
+ HANDLE processingThread;
+ DWORD processingThreadId;
+
+ char throttleProcessingThreadOnOverload; /* 0 -> don't throtte, non-0 -> throttle */
+ int processingThreadPriority;
+ int highThreadPriority;
+ int throttledThreadPriority;
+ unsigned long throttledSleepMsecs;
+
+ int isStopped;
+ volatile int isActive;
+ volatile int stopProcessing; /* stop thread once existing buffers have been returned */
+ volatile int abortProcessing; /* stop thread immediately */
+
+ DWORD allBuffersDurationMs; /* used to calculate timeouts */
+};
+#endif
+
+typedef struct PxSrcInfo
+{
+ char name[256];
+ DWORD lineID;
+ DWORD controlID;
+} PxSrcInfo;
+
+typedef struct PxInfo
+{
+ HMIXEROBJ hInputMixer;
+ HMIXEROBJ hOutputMixer;
+ int numInputs;
+ PxSrcInfo src[32];
+ DWORD muxID;
+ DWORD speakerID;
+ DWORD waveID;
+} PxInfo;
+
+int Px_GetNumMixers( void *pa_stream )
+{
+ return 1;
+}
+
+const char *Px_GetMixerName( void *pa_stream, int index )
+{
+ return "Mixer";
+}
+
+PxMixer *Px_OpenMixer( void *pa_stream, int index )
+{
+#if defined(PA_V18)
+ internalPortAudioStream *past;
+ PaWMMEStreamData *wmmeStreamData;
+#endif
+
+#if defined(PA_V19)
+ struct PaWinMmeStream *past;
+#endif
+
+ HWAVEIN hWaveIn;
+ HWAVEOUT hWaveOut;
+ PxInfo *mixer;
+ MMRESULT result;
+ MIXERLINE line;
+ MIXERLINECONTROLS controls;
+ MIXERCONTROL control;
+ MIXERCONTROLDETAILS details;
+ MIXERCONTROLDETAILS_LISTTEXT mixList[32];
+ int j;
+
+ if (!pa_stream)
+ return NULL;
+
+ mixer = (PxMixer *)malloc(sizeof(PxInfo));
+ mixer->hInputMixer = NULL;
+ mixer->hOutputMixer = NULL;
+
+#if defined(PA_V18)
+ past = (internalPortAudioStream *) pa_stream;
+ wmmeStreamData = (PaWMMEStreamData *) past->past_DeviceData;
+
+ hWaveIn = wmmeStreamData->hWaveIn;
+ hWaveOut = wmmeStreamData->hWaveOut;
+#endif
+
+#if defined(PA_V19)
+ past = (struct PaWinMmeStream *) pa_stream;
+
+ hWaveIn = 0;
+ if (past->input.waveHandles) {
+ hWaveIn = ((HWAVEIN *)past->input.waveHandles)[0];
+ }
+
+ hWaveOut = 0;
+ if (past->output.waveHandles) {
+ hWaveOut = ((HWAVEOUT *)past->output.waveHandles)[0];
+ }
+#endif
+
+ if (hWaveIn) {
+ result = mixerOpen((HMIXER *)&mixer->hInputMixer, (UINT)hWaveIn, 0, 0, MIXER_OBJECTF_HWAVEIN);
+ if (result != MMSYSERR_NOERROR) {
+ free(mixer);
+ return NULL;
+ }
+ }
+
+ if (hWaveOut) {
+ result = mixerOpen((HMIXER *)&mixer->hOutputMixer, (UINT)hWaveOut, 0, 0, MIXER_OBJECTF_HWAVEOUT);
+ if (result != MMSYSERR_NOERROR) {
+ free(mixer);
+ return NULL;
+ }
+ }
+
+ mixer->numInputs = 0;
+ mixer->muxID = 0;
+
+ /* ??? win32 default for wave control seems to be 0 ??? */
+ mixer->waveID = 0 ;
+
+ /*
+ * Find the input source selector (mux or mixer) and
+ * get the names and IDs of all of the input sources
+ */
+
+ if (mixer->hInputMixer) {
+ line.cbStruct = sizeof(MIXERLINE);
+ line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;
+ result = mixerGetLineInfo(mixer->hInputMixer,
+ &line,
+ MIXER_GETLINEINFOF_COMPONENTTYPE);
+ if (result == MMSYSERR_NOERROR) {
+
+ controls.cbStruct = sizeof(MIXERLINECONTROLS);
+ controls.dwLineID = line.dwLineID;
+ controls.dwControlType = MIXERCONTROL_CONTROLTYPE_MUX;
+ controls.cbmxctrl = sizeof(MIXERCONTROL);
+ controls.pamxctrl = &control;
+
+ control.cbStruct = sizeof(MIXERCONTROL);
+
+ result = mixerGetLineControls(mixer->hInputMixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+
+ if (result != MMSYSERR_NOERROR) {
+ controls.dwControlType = MIXERCONTROL_CONTROLTYPE_MIXER;
+ result = mixerGetLineControls(mixer->hInputMixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+ }
+
+ if (result == MMSYSERR_NOERROR) {
+ mixer->numInputs = control.cMultipleItems;
+ mixer->muxID = control.dwControlID;
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = mixer->muxID;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_LISTTEXT);
+ details.paDetails = (LPMIXERCONTROLDETAILS_LISTTEXT)&mixList[0];
+ details.cMultipleItems = mixer->numInputs;
+
+ result = mixerGetControlDetails(mixer->hInputMixer,
+ (LPMIXERCONTROLDETAILS)&details,
+ MIXER_GETCONTROLDETAILSF_LISTTEXT);
+
+ if (result != MMSYSERR_NOERROR)
+ mixer->numInputs = 0;
+
+ for(j=0; j<mixer->numInputs; j++) {
+ mixer->src[j].lineID = mixList[j].dwParam1;
+ strcpy(mixer->src[j].name, mixList[j].szName);
+ }
+ }
+
+ /*
+ * We've found the names - now we need to find the volume
+ * controls for each one
+ */
+
+ for(j=0; j<mixer->numInputs; j++) {
+ controls.cbStruct = sizeof(MIXERLINECONTROLS);
+ controls.dwLineID = mixer->src[j].lineID;
+ controls.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
+ controls.cbmxctrl = sizeof(MIXERCONTROL);
+ controls.pamxctrl = &control;
+
+ control.cbStruct = sizeof(MIXERCONTROL);
+
+ result = mixerGetLineControls(mixer->hInputMixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+ if (result == MMSYSERR_NOERROR)
+ mixer->src[j].controlID = control.dwControlID;
+ else
+ mixer->src[j].controlID = 0;
+ }
+ }
+ }
+
+ /*
+ * Find the ID of the output speaker volume control
+ */
+
+ mixer->speakerID = 0;
+
+ if (mixer->hOutputMixer) {
+ line.cbStruct = sizeof(MIXERLINE);
+ line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
+ result = mixerGetLineInfo(mixer->hOutputMixer,
+ &line,
+ MIXER_GETLINEINFOF_COMPONENTTYPE);
+ if (result == MMSYSERR_NOERROR) {
+ controls.cbStruct = sizeof(MIXERLINECONTROLS);
+ controls.dwLineID = line.dwLineID;
+ controls.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
+ controls.cbmxctrl = sizeof(MIXERCONTROL);
+ controls.pamxctrl = &control;
+
+ control.cbStruct = sizeof(MIXERCONTROL);
+
+ result = mixerGetLineControls(mixer->hOutputMixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+
+ if (result == MMSYSERR_NOERROR)
+ mixer->speakerID = control.dwControlID;
+ }
+ }
+
+ return (PxMixer *)mixer;
+}
+
+void VolumeFunction(HMIXEROBJ hMixer, DWORD controlID, PxVolume *volume)
+{
+ MIXERCONTROLDETAILS details;
+ MMRESULT result;
+ MIXERCONTROLDETAILS_UNSIGNED value;
+
+ memset(&value, 0, sizeof(MIXERCONTROLDETAILS_UNSIGNED));
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = controlID;
+ details.cChannels = 1; /* all channels */
+ details.cMultipleItems = 0;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
+ details.paDetails = &value;
+
+ result = mixerGetControlDetails(hMixer, &details,
+ MIXER_GETCONTROLDETAILSF_VALUE);
+
+ if (*volume < 0.0) {
+ *volume = (PxVolume)(value.dwValue / 65535.0);
+ }
+ else {
+ if (result != MMSYSERR_NOERROR)
+ return;
+ value.dwValue = (unsigned short)(*volume * 65535.0);
+ mixerSetControlDetails(hMixer, &details,
+ MIXER_GETCONTROLDETAILSF_VALUE);
+ }
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (info->hInputMixer)
+ mixerClose((HMIXER)info->hInputMixer);
+ if (info->hOutputMixer)
+ mixerClose((HMIXER)info->hOutputMixer);
+ free( mixer );
+}
+
+/*
+ Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ PxVolume vol;
+
+ vol = -1.0;
+ VolumeFunction(info->hOutputMixer, info->speakerID, &vol);
+ return vol;
+}
+
+void Px_SetMasterVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ VolumeFunction(info->hOutputMixer, info->speakerID, &volume);
+}
+
+/*
+ PCM output volume
+*/
+
+int Px_SupportsPCMOutputVolume( PxMixer* mixer )
+{
+ PxInfo* info = ( PxInfo* )( mixer ) ;
+ return ( info->waveID == -1 ) ? 0 : 1 ;
+}
+
+PxVolume Px_GetPCMOutputVolume( PxMixer *mixer )
+{
+ MMRESULT result;
+ DWORD vol = 0;
+ unsigned short mono_vol = 0;
+ PxInfo *info = (PxInfo *)mixer;
+
+ /* invalid waveID, return zero */
+ if ( info->waveID == -1 )
+ return 0.0 ;
+
+ /* get the wave output volume */
+ result = waveOutGetVolume( (HWAVEOUT)( info->waveID ), &vol);
+
+ /* on failure, mark waveID as invalid and return zero */
+ if ( result != MMSYSERR_NOERROR )
+ {
+ info->waveID = -1 ;
+ return 0.0 ;
+ }
+
+ mono_vol = (unsigned short)vol;
+ return (PxVolume)mono_vol/65535.0;
+}
+
+void Px_SetPCMOutputVolume( PxMixer *mixer, PxVolume volume )
+{
+ MMRESULT result;
+ PxInfo *info = (PxInfo *)mixer;
+
+ /* invalid waveID */
+ if ( info->waveID == -1 )
+ return ;
+
+ /* set the wave output volume */
+ result = waveOutSetVolume( (HWAVEOUT)( info->waveID ), MAKELONG(volume*0xFFFF, volume*0xFFFF));
+
+ /* on failure, mark waveID as invalid */
+ if ( result != MMSYSERR_NOERROR )
+ {
+ info->waveID = -1 ;
+ }
+
+ return ;
+}
+
+/*
+ All output volumes
+*/
+
+int Px_GetNumOutputVolumes( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return 2;
+}
+
+const char *Px_GetOutputVolumeName( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (i==1)
+ return "Wave Out";
+ else
+ return "Master Volume";
+}
+
+PxVolume Px_GetOutputVolume( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (i==1)
+ return Px_GetPCMOutputVolume(mixer);
+ else
+ return Px_GetMasterVolume(mixer);
+}
+
+void Px_SetOutputVolume( PxMixer *mixer, int i, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ if (i==1)
+ Px_SetPCMOutputVolume(mixer, volume);
+ else
+ Px_SetMasterVolume(mixer, volume);
+}
+
+/*
+ Input sources
+*/
+
+int Px_GetNumInputSources( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return info->numInputs;
+}
+
+const char *Px_GetInputSourceName( PxMixer *mixer, int i)
+{
+ PxInfo *info = (PxInfo *)mixer;
+
+ return info->src[i].name;
+}
+
+int Px_GetCurrentInputSource( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ MIXERCONTROLDETAILS details;
+ MIXERCONTROLDETAILS_BOOLEAN flags[32];
+ MMRESULT result;
+ int i;
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
+ details.paDetails = (LPMIXERCONTROLDETAILS_BOOLEAN)&flags[0];
+
+ result = mixerGetControlDetails(info->hInputMixer,
+ (LPMIXERCONTROLDETAILS)&details,
+ MIXER_GETCONTROLDETAILSF_VALUE);
+
+ if (result == MMSYSERR_NOERROR) {
+ for(i=0; i<info->numInputs; i++)
+ if (flags[i].fValue)
+ return i;
+ }
+
+ return 0;
+}
+
+void Px_SetCurrentInputSource( PxMixer *mixer, int i )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ MIXERCONTROLDETAILS details;
+ MIXERCONTROLDETAILS_BOOLEAN flags[32];
+ MMRESULT result;
+ int j;
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
+ details.paDetails = (LPMIXERCONTROLDETAILS_BOOLEAN)&flags[0];
+
+ for(j=0; j<info->numInputs; j++)
+ flags[j].fValue = (i == j);
+
+ result = mixerSetControlDetails(info->hInputMixer,
+ (LPMIXERCONTROLDETAILS)&details,
+ MIXER_SETCONTROLDETAILSF_VALUE);
+}
+
+/*
+ Input volume
+*/
+
+PxVolume Px_GetInputVolume( PxMixer *mixer )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ PxVolume vol;
+ int src = Px_GetCurrentInputSource(mixer);
+
+ vol = -1.0;
+ VolumeFunction(info->hInputMixer, info->src[src].controlID, &vol);
+ return vol;
+}
+
+void Px_SetInputVolume( PxMixer *mixer, PxVolume volume )
+{
+ PxInfo *info = (PxInfo *)mixer;
+ int src = Px_GetCurrentInputSource(mixer);
+
+ VolumeFunction(info->hInputMixer, info->src[src].controlID, &volume);
+}
+
+/*
+ Balance
+*/
+
+int Px_SupportsOutputBalance( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxBalance Px_GetOutputBalance( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetOutputBalance( PxMixer *mixer, PxBalance balance )
+{
+}
+
+/*
+ Playthrough
+*/
+
+int Px_SupportsPlaythrough( PxMixer *mixer )
+{
+ return 0;
+}
+
+PxVolume Px_GetPlaythrough( PxMixer *mixer )
+{
+ return 0.0;
+}
+
+void Px_SetPlaythrough( PxMixer *mixer, PxVolume volume )
+{
+}
+
Added: freeswitch/branches/cseket/libs/portmixer/src/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,11 @@
+/px_example_api.c/1.1/Mon Oct 2 00:27:52 2006//
+/px_linux_alsa.c/1.2/Sun Jun 3 08:30:36 2007//
+/px_mac_coreaudio.c/1.1/Mon Oct 2 00:27:52 2006//
+/px_mixer.c/1.4/Wed Jul 11 06:16:16 2007//
+/px_mixer.h/1.1/Mon Oct 2 00:27:52 2006//
+/px_unix_oss.c/1.3/Sun Jun 3 09:39:32 2007//
+/px_win_common.c/1.2/Thu Oct 5 22:59:44 2006//
+/px_win_common.h/1.1/Mon Oct 2 00:27:52 2006//
+/px_win_ds.c/1.2/Sun Oct 22 05:55:10 2006//
+/px_win_wmme.c/1.2/Thu Oct 5 22:59:44 2006//
+D
Added: freeswitch/branches/cseket/libs/portmixer/src/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/src
Added: freeswitch/branches/cseket/libs/portmixer/src/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/src/px_example_api.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_example_api.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,304 @@
+/*
+ * PortMixer
+ * Example API Implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+#include "portaudio.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+
+typedef struct PxInfo
+{
+ int example;
+} PxInfo;
+
+int OpenMixer_Platform_API(px_mixer *Px, int index)
+{
+ PxInfo *info;
+
+ if (!initialize(Px)) {
+ return FALSE;
+ }
+
+ info = (PxInfo *) Px->info;
+
+ return TRUE;
+}
+
+static int initialize(px_mixer *Px)
+{
+ Px->info = calloc(1, sizeof(PxInfo));
+ if (Px->info == NULL) {
+ return FALSE;
+ }
+
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+ Px->GetMasterVolume = get_master_volume;
+ Px->SetMasterVolume = set_master_volume;
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+
+ Px->SupportsOutputBalance = supports_output_balance;
+ Px->GetOutputBalance = get_output_balance;
+ Px->SetOutputBalance = set_output_balance;
+
+ Px->SupportsPlaythrough = supports_play_through;
+ Px->GetPlaythrough = get_play_through;
+ Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static int cleanup(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info) {
+ free(info);
+ Px->info = NULL;
+ }
+
+ return FALSE;
+}
+
+static void close_mixer(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0;
+}
+
+static const char *get_mixer_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return NULL;
+}
+
+/*
+|| Master volume
+*/
+
+static PxVolume get_master_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+static void set_master_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return FALSE;
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| All output volumes
+*/
+
+static int get_num_output_volumes(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0;
+}
+
+static const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return NULL;
+}
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return NULL;
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return -1;
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| Balance
+*/
+
+static int supports_output_balance(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return FALSE;
+}
+
+static PxBalance get_output_balance(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+static void set_output_balance(px_mixer *Px, PxBalance balance)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
+
+/*
+|| Playthrough
+*/
+
+static int supports_play_through(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return FALSE;
+}
+
+static PxVolume get_play_through(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return 0.0;
+}
+
+void set_play_through(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_linux_alsa.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_linux_alsa.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,671 @@
+/*
+ * PortMixer
+ * Linux ALSA Implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <alsa/asoundlib.h>
+
+#include "portaudio.h"
+#include "pa_unix_oss.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+
+#if !defined(TRUE)
+#define TRUE 1
+#endif
+
+typedef struct PxSelem
+{
+ snd_mixer_selem_id_t *sid;
+ snd_mixer_elem_t *elem;
+ char *name;
+} PxSelem;
+
+typedef struct PxDev
+{
+ snd_mixer_t *handle;
+ int card;
+
+ int numselems;
+ PxSelem *selems;
+} PxDev;
+
+typedef struct PxInfo
+{
+ int numMixers;
+ char *mixers;
+
+ PxDev capture;
+ PxDev playback;
+} PxInfo;
+
+static int open_mixer(PxDev *dev, int card, int playback)
+{
+ snd_mixer_elem_t *elem;
+ char name[256];
+ int err;
+ int i;
+
+ sprintf(name, "hw:%d", card);
+
+ dev->card = card;
+ dev->handle = NULL;
+
+ do {
+ err = snd_mixer_open(&dev->handle, 0);
+ if (err < 0) {
+ break;
+ }
+
+ err = snd_mixer_attach(dev->handle, name);
+ if (err < 0) {
+ break;
+ }
+
+ err = snd_mixer_selem_register(dev->handle, NULL, NULL);
+ if (err < 0) {
+ break;
+ }
+
+ err = snd_mixer_load(dev->handle);
+ if (err < 0) {
+ break;
+ }
+
+ for (elem = snd_mixer_first_elem(dev->handle);
+ elem != NULL;
+ elem = snd_mixer_elem_next(elem))
+ {
+ if (!playback) {
+ if (!snd_mixer_selem_has_capture_volume(elem) &&
+ !snd_mixer_selem_has_capture_switch(elem) &&
+ !snd_mixer_selem_has_common_volume(elem)) {
+ continue;
+ }
+ }
+ else {
+ if (!snd_mixer_selem_has_playback_volume(elem) &&
+ !snd_mixer_selem_has_playback_switch(elem) &&
+ !snd_mixer_selem_has_common_volume(elem)) {
+ continue;
+ }
+ }
+ dev->numselems++;
+ }
+
+ dev->selems = calloc(dev->numselems, sizeof(PxSelem));
+ if (dev->selems == NULL) {
+ break;
+ }
+
+ i = 0;
+ for (elem = snd_mixer_first_elem(dev->handle);
+ elem != NULL;
+ elem = snd_mixer_elem_next(elem))
+ {
+ if (!playback) {
+ if (!snd_mixer_selem_has_capture_volume(elem) &&
+ !snd_mixer_selem_has_capture_switch(elem) &&
+ !snd_mixer_selem_has_common_volume(elem)) {
+ continue;
+ }
+ }
+ else {
+ if (!snd_mixer_selem_has_playback_volume(elem) &&
+ !snd_mixer_selem_has_playback_switch(elem) &&
+ !snd_mixer_selem_has_common_volume(elem)) {
+ continue;
+ }
+ }
+
+ if (snd_mixer_selem_id_malloc(&dev->selems[i].sid) < 0) {
+ break;
+ }
+
+ snd_mixer_selem_get_id(elem, dev->selems[i].sid);
+ dev->selems[i].elem = elem;
+
+ snprintf(name,
+ sizeof(name),
+ "%s:%d",
+ snd_mixer_selem_id_get_name(dev->selems[i].sid),
+ snd_mixer_selem_id_get_index(dev->selems[i].sid));
+
+ dev->selems[i].name = strdup(name);
+ if (!dev->selems[i].name) {
+ break;
+ }
+ i++;
+ }
+
+ if (i == dev->numselems) {
+ return TRUE;
+ }
+
+ } while (FALSE);
+
+ if (dev->selems) {
+ for (i = 0; i < dev->numselems; i++) {
+ if (dev->selems[i].sid) {
+ snd_mixer_selem_id_free(dev->selems[i].sid);
+ }
+ if (dev->selems[i].name) {
+ free(dev->selems[i].name);
+ }
+ }
+ free(dev->selems);
+ dev->selems = NULL;
+ }
+
+ if (dev->handle) {
+ snd_mixer_close(dev->handle);
+ dev->handle = NULL;
+ }
+
+ return FALSE;
+}
+
+int OpenMixer_Linux_ALSA(px_mixer *Px, int index)
+{
+ PxInfo *info;
+ int card;
+
+ if (!initialize(Px)) {
+ return FALSE;
+ }
+
+ info = (PxInfo *) Px->info;
+
+ if (PaAlsa_GetStreamInputCard(Px->pa_stream, &card) == paNoError) {
+ if (!open_mixer(&info->capture, card, FALSE)) {
+ return cleanup(Px);
+ }
+ }
+
+ if (PaAlsa_GetStreamOutputCard(Px->pa_stream, &card) == paNoError) {
+ if (!open_mixer(&info->playback, card, TRUE)) {
+ return cleanup(Px);
+ }
+ }
+
+ return TRUE;
+}
+
+static int initialize(px_mixer *Px)
+{
+ Px->info = calloc(1, sizeof(PxInfo));
+ if (Px->info == NULL) {
+ return FALSE;
+ }
+
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+ Px->GetMasterVolume = get_master_volume;
+ Px->SetMasterVolume = set_master_volume;
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+
+// Px->SupportsOutputBalance = supports_output_balance;
+// Px->GetOutputBalance = get_output_balance;
+// Px->SetOutputBalance = set_output_balance;
+// Px->SupportsPlaythrough = supports_play_through;
+// Px->GetPlaythrough = get_play_through;
+// Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static int cleanup(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+
+ if (info->capture.selems) {
+ for (i = 0; i < info->capture.numselems; i++) {
+ if (info->capture.selems[i].sid) {
+ snd_mixer_selem_id_free(info->capture.selems[i].sid);
+ }
+ if (info->capture.selems[i].name) {
+ free(info->capture.selems[i].name);
+ }
+ }
+ free(info->capture.selems);
+ }
+
+ if (info->capture.handle) {
+ snd_mixer_close(info->capture.handle);
+ }
+
+ if (info->playback.selems) {
+ for (i = 0; i < info->playback.numselems; i++) {
+ if (info->playback.selems[i].sid) {
+ snd_mixer_selem_id_free(info->playback.selems[i].sid);
+ }
+ if (info->playback.selems[i].name) {
+ free(info->playback.selems[i].name);
+ }
+ }
+ free(info->playback.selems);
+ }
+
+ if (info->playback.handle) {
+ snd_mixer_close(info->playback.handle);
+ }
+
+ if (info) {
+ free(info);
+ Px->info = NULL;
+ }
+
+ return FALSE;
+}
+
+static PxVolume get_volume_indexed(PxDev *dev, int i, int playback)
+{
+ snd_mixer_elem_t *elem;
+ long vol, min, max;
+
+ if (!dev->handle) {
+ return 0.0;
+ }
+
+ if (i < 0 || i > dev->numselems) {
+ return 0.0;
+ }
+
+ elem = dev->selems[i].elem;
+ if (playback) {
+ snd_mixer_selem_get_playback_volume_range(elem, &min, &max);
+ if (snd_mixer_selem_has_playback_channel(elem, SND_MIXER_SCHN_FRONT_LEFT)) {
+ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &vol);
+ return (PxVolume) vol / (max - min);
+ }
+ }
+ else {
+ snd_mixer_selem_get_capture_volume_range(elem, &min, &max);
+ if (snd_mixer_selem_has_capture_channel(elem, SND_MIXER_SCHN_FRONT_LEFT)) {
+ snd_mixer_selem_get_capture_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &vol);
+ return (PxVolume) vol / (max - min);
+ }
+ }
+
+ return 0.0;
+}
+
+static PxVolume get_volume(PxDev *dev, const char *name, int playback)
+{
+ const char *sname;
+ int i;
+
+ if (!dev->handle) {
+ return 0.0;
+ }
+
+ for (i = 0; i < dev->numselems; i++) {
+ sname = snd_mixer_selem_id_get_name(dev->selems[i].sid);
+ if (strcmp(sname, name) == 0) {
+ return get_volume_indexed(dev, i, playback);
+ }
+ }
+
+ return 0.0;
+}
+
+static void set_volume_indexed(PxDev *dev, int i, PxVolume volume, int playback)
+{
+ snd_mixer_elem_t *elem;
+ long vol, min, max;
+ int j;
+
+ if (!dev->handle) {
+ return;
+ }
+
+ if (i < 0 || i > dev->numselems) {
+ return;
+ }
+
+ elem = dev->selems[i].elem;
+ if (playback) {
+ snd_mixer_selem_get_playback_volume_range(elem, &min, &max);
+ for (j = 0; j < SND_MIXER_SCHN_LAST; j++) {
+ if (snd_mixer_selem_has_playback_channel(elem, j)) {
+ vol = (long) (volume * (max - min) + 0.5);
+ snd_mixer_selem_set_playback_volume(elem, j, vol);
+ }
+ }
+ }
+ else {
+ snd_mixer_selem_get_capture_volume_range(elem, &min, &max);
+ for (j = 0; j < SND_MIXER_SCHN_LAST; j++) {
+ if (snd_mixer_selem_has_capture_channel(elem, j)) {
+ vol = (long) (volume * (max - min) + 0.5);
+ snd_mixer_selem_set_capture_volume(elem, j, vol);
+ }
+ }
+ }
+
+ return;
+}
+
+static void set_volume(PxDev *dev, const char *name, PxVolume volume, int playback)
+{
+ const char *sname;
+ int i;
+
+ if (!dev->handle) {
+ return;
+ }
+
+ for (i = 0; i < dev->numselems; i++) {
+ sname = snd_mixer_selem_id_get_name(dev->selems[i].sid);
+ if (strcmp(sname, name) == 0) {
+ set_volume_indexed(dev, i, volume, playback);
+ break;
+ }
+ }
+
+ return;
+}
+
+static void close_mixer(px_mixer *Px)
+{
+ cleanup(Px);
+
+ return;
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+ int fd;
+
+ info->numMixers = 0;
+#if 0
+ for (i = 0; i < MIXER_COUNT_MAX; i++) {
+ strcpy(info->mixers[i], MIXER_NAME_BASE);
+
+ if (i == 0)
+ info->mixers[i][strlen(MIXER_NAME_BASE)] = 0;
+ else
+ info->mixers[i][strlen(MIXER_NAME_BASE)] = '0' + (i - 1);
+
+ fd = open(info->mixers[i], O_RDWR);
+ if (fd >= 0) {
+ info->mixerIndexes[info->numMixers] = i;
+ info->numMixers++;
+ close(fd);
+ }
+ }
+#endif
+ return info->numMixers;
+}
+
+static const char *get_mixer_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+#if 0
+ if (info->numMixers <= 0)
+ get_num_mixers(Px);
+
+ if (i >= 0 && i < info->numMixers) {
+ return info->mixers[info->mixerIndexes[i]];
+ }
+#endif
+ return NULL;
+}
+
+/*
+|| Master volume
+*/
+
+static PxVolume get_master_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume(&info->playback, "Master", TRUE);
+}
+
+static void set_master_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume(&info->playback, "Master", volume, TRUE);
+
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ snd_mixer_selem_id_t *id;
+
+ if (info->playback.handle) {
+ snd_mixer_selem_id_alloca(&id);
+ snd_mixer_selem_id_set_name(id, "PCM");
+
+ if (snd_mixer_find_selem(info->playback.handle, id)) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume(&info->playback, "PCM", TRUE);
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume(&info->playback, "PCM", volume, TRUE);
+
+ return;
+}
+
+/*
+|| All output volumes
+*/
+
+static int get_num_output_volumes(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->playback.handle) {
+ return info->playback.numselems;
+ }
+
+ return 0;
+}
+
+static const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ snd_mixer_elem_t *elem;
+ char name[64];
+ int ndx = 0;
+
+ if (info->playback.handle) {
+ if (i >= 0 && i < info->playback.numselems) {
+ return info->playback.selems[i].name;
+ }
+ }
+
+ return NULL;
+}
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume_indexed(&info->playback, i, TRUE);
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume_indexed(&info->playback, i, volume, TRUE);
+
+ return;
+}
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->capture.handle) {
+ return info->capture.numselems;
+ }
+
+ return 0;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->capture.handle) {
+ if (i >= 0 && i < info->capture.numselems) {
+ return info->capture.selems[i].name;
+ }
+ }
+
+ return NULL;
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ snd_mixer_elem_t *elem;
+ int sw;
+ int i, j;
+
+ if (!info->capture.handle) {
+ return -1;
+ }
+
+ for (i = 0; i < info->capture.numselems; i++) {
+ elem = info->capture.selems[i].elem;
+ for (j = 0; j <= SND_MIXER_SCHN_LAST; j++) {
+ if (snd_mixer_selem_has_capture_switch(elem)) {
+ snd_mixer_selem_get_capture_switch(elem, j, &sw);
+ if (sw) {
+ return i;
+ }
+ }
+ }
+ }
+
+ return -1; /* none */
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ snd_mixer_elem_t *elem;
+ int j;
+
+ if (!info->capture.handle) {
+ return;
+ }
+
+ if (i < 0 || i >= info->capture.numselems) {
+ return;
+ }
+
+ elem = info->capture.selems[i].elem;
+ for (j = 0; j <= SND_MIXER_SCHN_LAST; j++) {
+ if (snd_mixer_selem_has_capture_switch(elem)) {
+ snd_mixer_selem_set_capture_switch(elem, j, TRUE);
+ }
+ }
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume(&info->capture, "Capture", FALSE);
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume(&info->capture, "Capture", volume, FALSE);
+
+ return;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_mac_coreaudio.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_mac_coreaudio.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,507 @@
+/*
+ * PortMixer
+ * Mac OS X / CoreAudio implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <CoreServices/CoreServices.h>
+#include <CoreAudio/CoreAudio.h>
+#include <AudioToolbox/AudioConverter.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "portaudio.h"
+#include "pa_mac_core.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+
+// define value of isInput passed to CoreAudio routines
+#define IS_INPUT (TRUE)
+#define IS_OUTPUT (FALSE)
+
+typedef struct PxInfo
+{
+ AudioDeviceID input;
+ AudioDeviceID output;
+ UInt32 *srcids;
+ char **srcnames;
+ int numsrcs;
+} PxInfo;
+
+int OpenMixer_Mac_CoreAudio(px_mixer *Px, int index)
+{
+ PxInfo *info;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 inID;
+ int i;
+
+ if (!initialize(Px)) {
+ return FALSE;
+ }
+
+ info = (PxInfo *) Px->info;
+
+ info->input = PaMacCore_GetStreamInputDevice(Px->pa_stream);;
+ info->output = PaMacCore_GetStreamOutputDevice(Px->pa_stream);
+
+ if (info->input == kAudioDeviceUnknown) {
+ outSize = sizeof(AudioDeviceID);
+ err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
+ &outSize,
+ &info->input);
+ if (err) {
+ return cleanup(Px);
+ }
+ }
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetPropertyInfo(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSources,
+ &outSize,
+ NULL);
+ if (err) {
+ return cleanup(Px);
+ }
+
+ info->numsrcs = outSize / sizeof(UInt32);
+ info->srcids = (UInt32 *)malloc(outSize);
+ info->srcnames = (char **)calloc(info->numsrcs, sizeof(char *));
+
+ if (info->srcids == NULL || info->srcnames == NULL) {
+ return cleanup(Px);
+ }
+
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSources,
+ &outSize,
+ info->srcids);
+ if (err) {
+ return cleanup(Px);
+ }
+
+ for (i = 0; i < info->numsrcs; i++) {
+ AudioValueTranslation trans;
+ CFStringRef name;
+ Boolean ok;
+
+ trans.mInputData = &info->srcids[i];
+ trans.mInputDataSize = sizeof(UInt32);
+ trans.mOutputData = &name;
+ trans.mOutputDataSize = sizeof(CFStringRef);
+
+ outSize = sizeof(AudioValueTranslation);
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSourceNameForIDCFString,
+ &outSize,
+ &trans);
+ if (err) {
+ return cleanup(Px);
+ }
+
+ info->srcnames[i] = malloc(CFStringGetLength(name)+1);
+ if (info->srcnames[i] == NULL) {
+ return cleanup(Px);
+ }
+
+ ok = CFStringGetCString(name,
+ info->srcnames[i],
+ CFStringGetLength(name)+1,
+ kCFStringEncodingISOLatin1);
+ if (!ok) {
+ return cleanup(Px);
+ }
+ }
+
+ return TRUE;
+}
+
+static int initialize(px_mixer *Px)
+{
+ Px->info = calloc(1, sizeof(PxInfo));
+ if (Px->info == NULL) {
+ return FALSE;
+ }
+
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+
+// Px->GetMasterVolume = get_master_volume;
+// Px->SetMasterVolume = set_master_volume;
+
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+
+// Px->SupportsOutputBalance = supports_output_balance;
+// Px->GetOutputBalance = get_output_balance;
+// Px->SetOutputBalance = set_output_balance;
+
+ Px->SupportsPlaythrough = supports_play_through;
+ Px->GetPlaythrough = get_play_through;
+ Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static int cleanup(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+
+ if (info) {
+ if (info->srcids) {
+ free(info->srcids);
+ }
+
+ if (info->srcnames) {
+ for (i = 0; i < info->numsrcs; i++) {
+ if (info->srcnames[i]) {
+ free(info->srcnames[i]);
+ }
+ }
+ free(info->srcnames);
+ }
+
+ free(info);
+ Px->info = NULL;
+ }
+
+ return FALSE;
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ return 1;
+}
+
+static const char *get_mixer_name(px_mixer *Px, int index)
+{
+ return "CoreAudio";
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+static void close_mixer(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ cleanup(Px);
+}
+
+/*
+|| PCM output volume
+*/
+
+static PxVolume get_volume(AudioDeviceID device, Boolean isInput)
+{
+ OSStatus err;
+ UInt32 outSize;
+ Float32 vol, maxvol = 0.0;
+ UInt32 mute, anymuted = 0;
+ int ch;
+ PxVolume max;
+
+ for (ch = 0; ch <= 2; ch++) {
+ outSize = sizeof(Float32);
+ err = AudioDeviceGetProperty(device,
+ ch,
+ isInput,
+ kAudioDevicePropertyVolumeScalar,
+ &outSize,
+ &vol);
+ if (!err) {
+ if (vol > maxvol)
+ maxvol = vol;
+ }
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(device,
+ ch,
+ isInput,
+ kAudioDevicePropertyMute,
+ &outSize,
+ &mute);
+
+ if (!err) {
+ if (mute)
+ anymuted = 1;
+ }
+ }
+
+ if (anymuted)
+ maxvol = 0.0;
+
+ return maxvol;
+}
+
+static void set_volume(AudioDeviceID device, Boolean isInput, PxVolume volume)
+{
+ Float32 vol = volume;
+ UInt32 mute = 0;
+ int ch;
+ OSStatus err;
+
+ /* Implement a passive attitude towards muting. If they
+ drag the volume above 0.05, unmute it. But if they
+ drag the volume down below that, just set the volume,
+ don't actually mute.
+ */
+
+ for (ch = 0; ch <= 2; ch++) {
+ err = AudioDeviceSetProperty(device,
+ 0,
+ ch,
+ isInput,
+ kAudioDevicePropertyVolumeScalar,
+ sizeof(Float32),
+ &vol);
+ if (vol > 0.05) {
+ err = AudioDeviceSetProperty(device,
+ 0,
+ ch,
+ isInput,
+ kAudioDevicePropertyMute,
+ sizeof(UInt32),
+ &mute);
+ }
+ }
+}
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ return 1 ;
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume(info->output, IS_OUTPUT);
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume(info->output, IS_OUTPUT, volume);
+}
+
+/*
+|| All output volumes
+*/
+
+int get_num_output_volumes(px_mixer *Px)
+{
+ return 1;
+}
+
+const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ if (i == 0)
+ return "PCM";
+ else
+ return "";
+}
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ return get_pcm_output_volume(Px);
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ set_pcm_output_volume(Px, volume);
+
+ return;
+}
+
+/*
+|| Input sources
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return info->numsrcs;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (i >= info->numsrcs)
+ return NULL;
+
+ return info->srcnames[i];
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 outID = 0;
+ int i;
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(info->input,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSource,
+ &outSize,
+ &outID);
+
+ if (!err) {
+ for (i = 0; i < info->numsrcs; i++) {
+ if (info->srcids[i] == outID) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ OSStatus err;
+
+ if (i >= info->numsrcs) {
+ return;
+ }
+
+ err = AudioDeviceSetProperty(info->input,
+ 0,
+ 0,
+ IS_INPUT,
+ kAudioDevicePropertyDataSource,
+ sizeof(UInt32),
+ &info->srcids[i]);
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return get_volume(info->input, IS_INPUT);
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ set_volume(info->input, IS_INPUT, volume);
+
+ return;
+}
+
+/*
+|| Playthrough
+*/
+
+static int supports_play_through(px_mixer *Px)
+{
+ return TRUE;
+}
+
+static PxVolume get_play_through(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ OSStatus err;
+ UInt32 outSize;
+ UInt32 flag;
+
+ outSize = sizeof(UInt32);
+ err = AudioDeviceGetProperty(info->output,
+ 0,
+ IS_OUTPUT,
+ kAudioDevicePropertyPlayThru,
+ &outSize,
+ &flag);
+ if (err)
+ return 0.0;
+
+ if (flag)
+ return 1.0;
+ else
+ return 0.0;
+}
+
+static void set_play_through(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ UInt32 flag = (volume > 0.01);
+ OSStatus err;
+
+ err = AudioDeviceSetProperty(info->output,
+ 0,
+ 0,
+ IS_OUTPUT,
+ kAudioDevicePropertyPlayThru,
+ sizeof(UInt32),
+ &flag);
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_mixer.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_mixer.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,628 @@
+/*
+ * PortMixer
+ * PortMixer core
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+#include "portaudio.h"
+#include "portmixer.h"
+#include "px_mixer.h"
+
+#if defined(_WIN32)
+#include <windows.h>
+#endif
+
+#if defined(__LINUX__) || defined(__APPLE__)
+#include <stdlib.h>
+#endif
+#include <stdlib.h>
+
+#if defined(PX_USE_WIN_MME)
+int OpenMixer_Win_MME(px_mixer *Px, int index);
+#endif
+
+#if defined(PX_USE_WIN_DSOUND)
+int OpenMixer_Win_DirectSound(px_mixer *Px, int index);
+#endif
+
+#if defined(PX_USE_MAC_COREAUDIO)
+int OpenMixer_Mac_CoreAudio(px_mixer *Px, int index);
+#endif
+
+#if defined(PX_USE_UNIX_OSS)
+int OpenMixer_Unix_OSS(px_mixer *Px, int index);
+#endif
+
+#if defined(PX_USE_LINUX_ALSA)
+int OpenMixer_Linux_ALSA(px_mixer *Px, int index);
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(_DEBUG)
+#include <stdio.h>
+#include <stdlib.h>
+static void dprintf(const char *format, ...)
+{
+ char buf[4096];
+ va_list args;
+ int cnt;
+
+ va_start(args, format);
+ cnt = _vsnprintf(buf, sizeof(buf) - 1, format, args);
+ va_end(args);
+
+ if (cnt > 0) {
+ buf[cnt] = '\0';
+ OutputDebugString(buf);
+ }
+}
+#endif
+
+static px_mixer *verify_mixer(PxMixer *mixer)
+{
+ px_mixer *Px = (px_mixer *)mixer;
+
+ if (Px == NULL || Px->magic != PX_MIXER_MAGIC)
+ return NULL;
+
+ return Px;
+}
+
+/*
+ Px_OpenMixer() returns a mixer which will work with the given PortAudio
+ audio device. Pass 0 as the index for the first (default) mixer.
+*/
+
+PxMixer *Px_OpenMixer(PaStream *pa_stream, int i)
+{
+ px_mixer *Px;
+ int good = TRUE;
+
+ Px = (px_mixer *) malloc(sizeof(px_mixer));
+ if (Px == NULL) {
+ return NULL;
+ }
+
+ Px->magic = PX_MIXER_MAGIC;
+ Px->pa_stream = pa_stream;
+ Px->info = NULL;
+
+ if (!initialize(Px)) {
+ free(Px);
+ return NULL;
+ }
+
+ switch (Pa_GetStreamHostApiType(pa_stream))
+ {
+#if defined(PX_USE_WIN_MME)
+ case paMME:
+ good = OpenMixer_Win_MME(Px, i);
+ break;
+#endif
+
+#if defined(PX_USE_WIN_DSOUND)
+ case paDirectSound:
+ good = OpenMixer_Win_DirectSound(Px, i);
+ break;
+#endif
+
+#if defined(PX_USE_MAC_COREAUDIO)
+ case paCoreAudio:
+ good = OpenMixer_Mac_CoreAudio(Px, i);
+ break;
+#endif
+
+#if defined(PX_USE_UNIX_OSS)
+ case paOSS:
+ good = OpenMixer_Unix_OSS(Px, i);
+ break;
+#endif
+
+#if defined(PX_USE_LINUX_ALSA)
+ case paALSA:
+ good = OpenMixer_Linux_ALSA(Px, i);
+ break;
+#endif
+ }
+
+ if (!good) {
+ free(Px);
+ return NULL;
+ }
+
+ return Px;
+}
+
+/*
+ Px_CloseMixer() closes a mixer opened using Px_OpenMixer and frees any
+ memory associated with it.
+*/
+
+void Px_CloseMixer(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->CloseMixer(Px);
+
+ free(Px);
+
+ return;
+}
+
+/*
+|| Mixer info
+*/
+int Px_GetNumMixers(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ int cnt;
+
+ if (!Px) {
+ return 0;
+ }
+
+ cnt = Px->GetNumMixers(Px);
+
+ return cnt;
+}
+
+const char *Px_GetMixerName(PxMixer *mixer, int i)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ const char *name;
+
+ if (!Px) {
+ return 0;
+ }
+
+ name = Px->GetMixerName(Px, i);
+
+ return name;
+}
+
+/*
+|| Master (output) volume
+*/
+
+PxVolume Px_GetMasterVolume(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetMasterVolume(Px);
+}
+
+void Px_SetMasterVolume(PxMixer *mixer, PxVolume volume)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetMasterVolume(Px, volume);
+
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+PxVolume Px_GetPCMOutputVolume(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetPCMOutputVolume(Px);
+}
+
+void Px_SetPCMOutputVolume(PxMixer *mixer, PxVolume volume)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetPCMOutputVolume(Px, volume);
+
+ return;
+}
+
+int Px_SupportsPCMOutputVolume(PxMixer* mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return FALSE;
+
+ return Px->SupportsPCMOutputVolume(Px);
+}
+
+/*
+|| Output info
+*/
+
+int Px_GetNumOutputVolumes(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0;
+
+ return Px->GetNumOutputVolumes(Px);
+}
+
+const char *Px_GetOutputVolumeName(PxMixer *mixer, int i)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return NULL;
+
+ return Px->GetOutputVolumeName(Px, i);
+}
+
+/*
+|| Output volume
+*/
+
+PxVolume Px_GetOutputVolume(PxMixer *mixer, int i)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetOutputVolume(Px, i);
+}
+
+void Px_SetOutputVolume(PxMixer *mixer, int i, PxVolume volume)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetOutputVolume(Px, i, volume);
+
+ return;
+}
+
+/*
+|| Input source
+*/
+
+int Px_GetNumInputSources(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0;
+
+ return Px->GetNumInputSources(Px);
+}
+
+const char *Px_GetInputSourceName(PxMixer *mixer, int i)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return NULL;
+
+ return Px->GetInputSourceName(Px, i);
+}
+
+int Px_GetCurrentInputSource(PxMixer *mixer) /* may return -1 == none */
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return -1;
+
+ return Px->GetCurrentInputSource(Px);
+}
+
+void Px_SetCurrentInputSource(PxMixer *mixer, int i)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetCurrentInputSource(Px, i);
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+PxVolume Px_GetInputVolume(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetInputVolume(Px);
+}
+
+void Px_SetInputVolume(PxMixer *mixer, PxVolume volume)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetInputVolume(Px, volume);
+
+ return;
+}
+
+/*
+|| Balance
+*/
+
+int Px_SupportsOutputBalance(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return FALSE;
+
+ return Px->SupportsOutputBalance(Px);
+}
+
+PxBalance Px_GetOutputBalance(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetOutputBalance(Px);
+}
+
+void Px_SetOutputBalance(PxMixer *mixer, PxBalance balance)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetOutputBalance(Px, balance);
+
+ return;
+}
+
+/*
+|| Playthrough
+*/
+
+int Px_SupportsPlaythrough(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return FALSE;
+
+ return Px->SupportsPlaythrough(Px);
+}
+
+PxVolume Px_GetPlaythrough(PxMixer *mixer)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return 0.0;
+
+ return Px->GetPlaythrough(Px);
+}
+
+void Px_SetPlaythrough(PxMixer *mixer, PxVolume volume)
+{
+ px_mixer *Px = verify_mixer(mixer);
+ if (!Px)
+ return;
+
+ Px->SetPlaythrough(Px, volume);
+
+ return;
+}
+
+/* ----------------------------------------------------------------------------
+|| Default API routines ||
+-----------------------------------------------------------------------------*/
+
+static int initialize(px_mixer *Px)
+{
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+ Px->GetMasterVolume = get_master_volume;
+ Px->SetMasterVolume = set_master_volume;
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+ Px->SupportsOutputBalance = supports_output_balance;
+ Px->GetOutputBalance = get_output_balance;
+ Px->SetOutputBalance = set_output_balance;
+ Px->SupportsPlaythrough = supports_play_through;
+ Px->GetPlaythrough = get_play_through;
+ Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static void close_mixer(px_mixer *Px)
+{
+ return;
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ return 0;
+}
+
+static const char *get_mixer_name(px_mixer *Px, int i)
+{
+ return NULL;
+}
+
+static PxVolume get_master_volume(px_mixer *Px)
+{
+ return 0.0;
+}
+
+static void set_master_volume(px_mixer *Px, PxVolume volume)
+{
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ return FALSE;
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ return 0.0;
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ return;
+}
+
+/*
+|| All output volumes
+*/
+
+static int get_num_output_volumes(px_mixer *Px)
+{
+ return 0;
+}
+
+static const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ return NULL;
+}
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ return 0.0;
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ return;
+}
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ return 0;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ return NULL;
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ return -1;
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ return 0.0;
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ return;
+}
+
+/*
+|| Balance
+*/
+
+static int supports_output_balance(px_mixer *Px)
+{
+ return FALSE;
+}
+
+static PxBalance get_output_balance(px_mixer *Px)
+{
+ return 0.0;
+}
+
+static void set_output_balance(px_mixer *Px, PxBalance balance)
+{
+ return;
+}
+
+/*
+|| Playthrough
+*/
+
+static int supports_play_through(px_mixer *Px)
+{
+ return FALSE;
+}
+
+static PxVolume get_play_through(px_mixer *Px)
+{
+ return 0.0;
+}
+
+static void set_play_through(px_mixer *Px, PxVolume volume)
+{
+ return;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_mixer.h
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_mixer.h Fri Aug 24 13:53:53 2007
@@ -0,0 +1,200 @@
+#ifndef PX_MIXER_H
+#define PX_MIXER_H
+/*
+ * PortMixer
+ * PortMixer core header
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#define PX_MIXER_MAGIC 0x50544D52
+
+#if !defined(NULL)
+#define NULL 0
+#endif
+
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+
+#if !defined(TRUE)
+#define TRUE 1
+#endif
+
+typedef struct px_mixer px_mixer;
+
+struct px_mixer
+{
+ unsigned long magic;
+ void *pa_stream;
+ void *info;
+
+ PxMixer (*OpenMixer) (void *pa_stream, int i);
+ void (*CloseMixer) (px_mixer *Px);
+
+ /*
+ || Mixer info
+ */
+ int (*GetNumMixers) (px_mixer *Px);
+ const char *(*GetMixerName) (px_mixer *Px, int i);
+
+ /*
+ || Master (output) volume
+ */
+
+ PxVolume (*GetMasterVolume) (px_mixer *Px);
+ void (*SetMasterVolume) (px_mixer *Px, PxVolume volume);
+
+ /*
+ || Main output volume
+ */
+
+ int (*SupportsPCMOutputVolume) (px_mixer *Px);
+ PxVolume (*GetPCMOutputVolume) (px_mixer *Px);
+ void (*SetPCMOutputVolume) (px_mixer *Px, PxVolume volume);
+
+ /*
+ || Output info
+ */
+
+ int (*GetNumOutputVolumes) (px_mixer *Px);
+ const char *(*GetOutputVolumeName) (px_mixer *Px, int i);
+
+ /*
+ || Output volume
+ */
+
+ PxVolume (*GetOutputVolume) (px_mixer *Px, int i);
+ void (*SetOutputVolume) (px_mixer *Px, int i, PxVolume volume);
+
+ /*
+ || Input source
+ */
+
+ int (*GetNumInputSources) (px_mixer *Px);
+ const char *(*GetInputSourceName) (px_mixer *Px, int i);
+ int (*GetCurrentInputSource) (px_mixer *Px); /* may return -1 == none */
+ void (*SetCurrentInputSource) (px_mixer *Px, int i);
+
+ /*
+ || Input volume
+ */
+
+ PxVolume (*GetInputVolume) (px_mixer *Px);
+ void (*SetInputVolume) (px_mixer *Px, PxVolume volume);
+
+ /*
+ || Balance
+ */
+
+ int (*SupportsOutputBalance) (px_mixer *Px);
+ PxBalance (*GetOutputBalance) (px_mixer *Px);
+ void (*SetOutputBalance) (px_mixer *Px, PxBalance balance);
+
+ /*
+ || Playthrough
+ */
+
+ int (*SupportsPlaythrough) (px_mixer *Px);
+ PxVolume (*GetPlaythrough) (px_mixer *Px);
+ void (*SetPlaythrough) (px_mixer *Px, PxVolume volume);
+};
+
+static int initialize(px_mixer *Px);
+static int cleanup(px_mixer *Px);
+
+static void close_mixer(px_mixer *Px);
+static int get_num_mixers(px_mixer *Px);
+static const char *get_mixer_name(px_mixer *Px, int i);
+static PxVolume get_master_volume(px_mixer *Px);
+static void set_master_volume(px_mixer *Px, PxVolume volume);
+
+/*
+|| Main output volume
+*/
+
+static PxVolume get_pcm_output_volume(px_mixer *Px);
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume);
+static int supports_pcm_output_volume(px_mixer *Px);
+
+/*
+|| All output volumes
+*/
+
+static int get_num_output_volumes(px_mixer *Px);
+static const char *get_output_volume_name(px_mixer *Px, int i);
+static PxVolume get_output_volume(px_mixer *Px, int i);
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume);
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px);
+static const char *get_input_source_name(px_mixer *Px, int i);
+static int get_current_input_source(px_mixer *Px);
+static void set_current_input_source(px_mixer *Px, int i);
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px);
+static void set_input_volume(px_mixer *Px, PxVolume volume);
+
+/*
+|| Balance
+*/
+
+static int supports_output_balance(px_mixer *Px);
+static PxBalance get_output_balance(px_mixer *Px);
+static void set_output_balance(px_mixer *Px, PxBalance balance);
+
+/*
+|| Playthrough
+*/
+
+static int supports_play_through(px_mixer *Px);
+static PxVolume get_play_through(px_mixer *Px);
+static void set_play_through(px_mixer *Px, PxVolume volume);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Added: freeswitch/branches/cseket/libs/portmixer/src/px_unix_oss.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_unix_oss.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,531 @@
+/*
+ * PortMixer
+ * Unix OSS Implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#if defined(__linux__)
+#include <linux/soundcard.h>
+#elif defined(__FreeBSD__)
+#include <sys/soundcard.h>
+#else
+#include <machine/soundcard.h> /* JH20010905 */
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+
+#include "portaudio.h"
+#include "pa_unix_oss.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+
+#if !defined(TRUE)
+#define TRUE 1
+#endif
+
+#define MIXER_NAME_BASE "/dev/mixer"
+#define MIXER_COUNT_MAX 10
+
+typedef struct PxDev
+{
+ const char *name;
+ int fd;
+ int num;
+ int chans[SOUND_MIXER_NRDEVICES];
+} PxDev;
+
+typedef struct PxInfo
+{
+ int numMixers;
+ int mixerIndexes[MIXER_COUNT_MAX];
+ char mixers[MIXER_COUNT_MAX][sizeof(MIXER_NAME_BASE) + 1];
+
+ PxDev capture;
+ PxDev playback;
+} PxInfo;
+
+static const char *labels[] = SOUND_DEVICE_LABELS;
+
+static int open_mixer(PxDev *dev, int cmd)
+{
+ char name[sizeof(MIXER_NAME_BASE) + 1];
+ int mask;
+ int i;
+ int id = 0;
+
+ for (i = strlen(dev->name) - 1; i >= 0; i++) {
+ if (!isdigit(dev->name[i])) {
+ break;
+ }
+ }
+
+ id = atoi(&dev->name[i + 1]);
+ if (id < 0 || id >= MIXER_COUNT_MAX) {
+ return -1;
+ }
+
+ strcpy(name, MIXER_NAME_BASE);
+ if (id == 0)
+ name[strlen(MIXER_NAME_BASE)] = 0;
+ else
+ name[strlen(MIXER_NAME_BASE)] = '0' + (id - 1);
+
+ do {
+ dev->fd = open(name, O_RDWR);
+ if (dev->fd < 0) {
+ break;
+ }
+
+ if (ioctl(dev->fd, cmd, &mask) == -1) {
+ break;
+ }
+
+ dev->num = 0;
+
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
+ if (mask & (1 << i)) {
+ dev->chans[dev->num++] = i;
+ }
+ }
+ return TRUE;
+
+ } while (FALSE);
+
+ if (dev->fd >= 0) {
+ close(dev->fd);
+ dev->fd = -1;
+ }
+
+ return FALSE;
+}
+
+int OpenMixer_Unix_OSS(px_mixer *Px, int index)
+{
+ PxInfo *info;
+
+ if (!initialize(Px)) {
+ return FALSE;
+ }
+
+ get_num_mixers(Px);
+
+ info = (PxInfo *) Px->info;
+ info->capture.fd = -1;
+ info->capture.num = 0;
+ info->playback.fd = -1;
+ info->playback.num = 0;
+
+ do {
+ info->capture.name = PaOSS_GetStreamInputDevice(Px->pa_stream);
+
+ if (info->capture.name) {
+ if (!open_mixer(&info->capture, SOUND_MIXER_READ_RECMASK)) {
+ break;
+ }
+ }
+
+ info->playback.name = PaOSS_GetStreamOutputDevice(Px->pa_stream);
+ if (info->playback.name) {
+ if (!open_mixer(&info->playback, SOUND_MIXER_READ_DEVMASK)) {
+ break;
+ }
+ }
+
+ return TRUE;
+
+ } while (FALSE);
+
+ return cleanup(Px);
+}
+
+static PxVolume get_volume(int fd, int channel)
+{
+ int vol;
+ int stereo;
+
+ if (ioctl(fd, SOUND_MIXER_READ_STEREODEVS, &stereo) == 0)
+ stereo = ((stereo & (1 << channel)) != 0);
+ else
+ stereo = 0;
+
+ if (ioctl(fd, MIXER_READ(channel), &vol) == -1)
+ return 0.0;
+
+ if (stereo)
+ return ((vol & 0xFF)/200.0) + (((vol>>8) & 0xFF)/200.0);
+ else
+ return (vol & 0xFF)/100.0;
+}
+
+static int initialize(px_mixer *Px)
+{
+ Px->info = calloc(1, sizeof(PxInfo));
+ if (Px->info == NULL) {
+ return FALSE;
+ }
+
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+ Px->GetMasterVolume = get_master_volume;
+ Px->SetMasterVolume = set_master_volume;
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+
+// Px->SupportsOutputBalance = supports_output_balance;
+// Px->GetOutputBalance = get_output_balance;
+// Px->SetOutputBalance = set_output_balance;
+// Px->SupportsPlaythrough = supports_play_through;
+// Px->GetPlaythrough = get_play_through;
+// Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static int cleanup(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->capture.fd >= 0) {
+ close(info->capture.fd);
+ }
+
+ if (info->playback.fd >= 0) {
+ close(info->playback.fd);
+ }
+
+ if (info) {
+ free(info);
+ Px->info = NULL;
+ }
+
+ return FALSE;
+}
+
+static void close_mixer(px_mixer *Px)
+{
+ cleanup(Px);
+
+ return;
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+ int fd;
+
+ info->numMixers = 0;
+
+ for (i = 0; i < MIXER_COUNT_MAX; i++) {
+ strcpy(info->mixers[i], MIXER_NAME_BASE);
+
+ if (i == 0)
+ info->mixers[i][strlen(MIXER_NAME_BASE)] = 0;
+ else
+ info->mixers[i][strlen(MIXER_NAME_BASE)] = '0' + (i - 1);
+
+ fd = open(info->mixers[i], O_RDWR);
+ if (fd >= 0) {
+ info->mixerIndexes[info->numMixers] = i;
+ info->numMixers++;
+ close(fd);
+ }
+ }
+
+ return info->numMixers;
+}
+
+static const char *get_mixer_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->numMixers <= 0)
+ get_num_mixers(Px);
+
+ if (i >= 0 && i < info->numMixers) {
+ return info->mixers[info->mixerIndexes[i]];
+ }
+
+ return NULL;
+}
+
+/*
+|| Master volume
+*/
+
+static PxVolume get_master_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->playback.fd >= 0) {
+ return get_volume(info->playback.fd, SOUND_MIXER_READ_VOLUME);
+ }
+
+ return 0.0;
+}
+
+static void set_master_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int vol = (int) ((volume * 100.0) + 0.5);
+
+ if (info->playback.fd >= 0) {
+ vol = (vol | (vol << 8));
+ ioctl(info->playback.fd, SOUND_MIXER_WRITE_VOLUME, &vol);
+ }
+
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+
+ if (info->playback.fd >= 0) {
+ for (i = 0; i < info->playback.num; i++) {
+ if (info->playback.chans[i] == SOUND_MIXER_PCM) {
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (supports_pcm_output_volume(Px)) {
+ return get_volume(info->playback.fd, SOUND_MIXER_READ_PCM);
+ }
+
+ return 0.0;
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int vol = (int) ((volume * 100.0) + 0.5);
+
+ if (supports_pcm_output_volume(Px)) {
+ vol = (vol | (vol << 8));
+ ioctl(info->playback.fd, SOUND_MIXER_WRITE_PCM, &vol);
+ }
+
+ return;
+}
+
+/*
+|| All output volumes
+*/
+
+static int get_num_output_volumes(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return info->playback.num;
+}
+
+static const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->playback.fd >= 0) {
+ if (i >= 0 && i < info->playback.num) {
+ return labels[info->playback.chans[i]];
+ }
+ }
+
+ return NULL;
+}
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->playback.fd >= 0) {
+ if (i >= 0 && i < info->playback.num) {
+ return get_volume(info->playback.fd, info->playback.chans[i]);
+ }
+ }
+
+ return 0.0;
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int vol = (int) ((volume * 100.0) + 0.5);
+
+ if (info->playback.fd >= 0) {
+ if (i >= 0 && i < info->playback.num) {
+ vol = (vol | (vol << 8));
+ ioctl(info->playback.fd, MIXER_WRITE(info->playback.chans[i]), &vol);
+ }
+ }
+
+ return;
+}
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return info->capture.num;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (info->capture.fd >= 0) {
+ if (i >= 0 && i < info->capture.num) {
+ return labels[info->capture.chans[i]];
+ }
+ }
+
+ return NULL;
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int mask;
+ int i;
+
+ /* Note that there may be more than one in OSS; we pick
+ the first one */
+ if (info->capture.fd >= 0) {
+ if (ioctl(info->capture.fd, SOUND_MIXER_READ_RECSRC, &mask) == -1) {
+ return -1; /* none / error */
+ }
+
+ for (i = 0; i < info->capture.num; i++) {
+ if (mask & (1 << info->capture.chans[i])) {
+ return i;
+ }
+ }
+ }
+
+ return -1; /* none */
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int mask;
+
+ if (info->capture.fd >= 0) {
+ if (i >= 0 && i < info->capture.num) {
+ mask = (1 << info->capture.chans[i]);
+
+ ioctl(info->capture.fd, SOUND_MIXER_WRITE_RECSRC, &mask);
+ }
+ }
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+
+ if (info->capture.fd >= 0) {
+ i = get_current_input_source(Px);
+ if (i >= 0) {
+ return get_volume(info->capture.fd, info->capture.chans[i]);
+ }
+ }
+
+ return 0.0;
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int vol;
+ int i;
+
+ if (info->capture.fd >= 0) {
+ i = get_current_input_source(Px);
+ if (i >= 0) {
+ vol = (int) ((volume * 100.0) + 0.5);
+ vol = (vol | (vol << 8));
+
+ ioctl(info->capture.fd, MIXER_WRITE(info->capture.chans[i]), &vol);
+ }
+ }
+
+ return;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_win_common.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_win_common.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,744 @@
+/*
+ * PortMixer
+ * Common Windows routines
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni and Augustus Saunders
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <windows.h>
+
+#include "portaudio.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+#include "px_win_common.h"
+
+static UINT get_ctrls(HMIXEROBJ mixer, DWORD lineID, PxCtrl **pctrls);
+static DWORD find_ctrl(HMIXEROBJ mixer, DWORD lineID, DWORD ctrlID);
+
+#if defined(_DEBUG)
+#include <stdio.h>
+#include <stdlib.h>
+static void dprintf(const char *format, ...)
+{
+ char buf[4096];
+ va_list args;
+ int cnt;
+
+ va_start(args, format);
+ cnt = _vsnprintf(buf, sizeof(buf) - 1, format, args);
+ va_end(args);
+
+ if (cnt > 0) {
+ buf[cnt] = '\0';
+ OutputDebugString(buf);
+ }
+}
+#endif
+
+int open_mixers(px_mixer *Px, UINT deviceIn, UINT deviceOut)
+{
+ PxInfo*info;
+ MMRESULT res;
+
+ if (deviceIn == UINT_MAX && deviceOut == UINT_MAX) {
+ return FALSE;
+ }
+
+ if (!initialize(Px)) {
+ return FALSE;
+ }
+
+ info = (PxInfo *) Px->info;
+ info->hInputMixer = NULL;
+ info->hOutputMixer = NULL;
+ info->numInputs = 0;
+ info->muxID = 0;
+ info->speakerID = 0;
+ info->waveID = 0;
+
+ if (deviceIn != UINT_MAX) {
+ res = mixerOpen((LPHMIXER) &info->hInputMixer,
+ deviceIn,
+ 0,
+ 0,
+ MIXER_OBJECTF_WAVEIN);
+ if (res != MMSYSERR_NOERROR) {
+ return cleanup(Px);
+ }
+
+ info->muxID = find_ctrl(info->hInputMixer,
+ MIXERLINE_COMPONENTTYPE_DST_WAVEIN,
+ MIXERCONTROL_CONTROLTYPE_MUX);
+ if (info->muxID == -1) {
+ info->muxID = find_ctrl(info->hInputMixer,
+ MIXERLINE_COMPONENTTYPE_DST_WAVEIN,
+ MIXERCONTROL_CONTROLTYPE_MIXER);
+ }
+
+ info->numInputs = get_ctrls(info->hInputMixer,
+ MIXERLINE_COMPONENTTYPE_DST_WAVEIN,
+ &info->src);
+
+ if (info->numInputs == 0) {
+ return cleanup(Px);
+ }
+ }
+
+ if (deviceOut != UINT_MAX) {
+ res = mixerOpen((LPHMIXER) &info->hOutputMixer,
+ deviceOut,
+ 0,
+ 0,
+ MIXER_OBJECTF_WAVEOUT);
+ if (res != MMSYSERR_NOERROR) {
+ return cleanup(Px);
+ }
+
+ info->speakerID = find_ctrl(info->hOutputMixer,
+ MIXERLINE_COMPONENTTYPE_DST_SPEAKERS,
+ MIXERCONTROL_CONTROLTYPE_VOLUME);
+
+ info->waveID = find_ctrl(info->hOutputMixer,
+ MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT,
+ MIXERCONTROL_CONTROLTYPE_VOLUME);
+
+ info->numOutputs = get_ctrls(info->hOutputMixer,
+ MIXERLINE_COMPONENTTYPE_DST_SPEAKERS,
+ &info->dst);
+
+ if (info->numOutputs == 0) {
+ return cleanup(Px);
+ }
+ }
+
+ return TRUE;
+}
+
+static UINT get_ctrls(HMIXEROBJ mixer, DWORD lineID, PxCtrl **pctrls)
+{
+ MMRESULT res;
+ MIXERLINE line;
+ MIXERLINECONTROLS controls;
+ MIXERCONTROL control;
+ PxCtrl *ctrls = NULL;
+ UINT num;
+ UINT s;
+
+ do {
+ line.cbStruct = sizeof(MIXERLINE);
+ line.dwComponentType = lineID;
+
+ res = mixerGetLineInfo(mixer,
+ &line,
+ MIXER_GETLINEINFOF_COMPONENTTYPE);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+
+ num = (UINT) line.cConnections;
+
+ ctrls = calloc(num, sizeof(PxInfo));
+ if (ctrls == NULL) {
+ break;
+ }
+
+ for (s = 0; s < num; s++)
+ {
+ line.dwSource = s;
+
+ res = mixerGetLineInfo(mixer,
+ &line,
+ MIXER_GETLINEINFOF_SOURCE);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+
+ ctrls[s].lineID = line.dwLineID;
+ ctrls[s].name = strdup(line.szName);
+ if (ctrls[s].name == NULL) {
+ break;
+ }
+
+ controls.cbStruct = sizeof(MIXERLINECONTROLS);
+ controls.dwLineID = line.dwLineID;
+ controls.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
+ controls.cbmxctrl = sizeof(MIXERCONTROL);
+ controls.pamxctrl = &control;
+
+ control.cbStruct = sizeof(MIXERCONTROL);
+
+ res = mixerGetLineControls(mixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+
+ if (res == MMSYSERR_NOERROR)
+ ctrls[s].controlID = control.dwControlID;
+ else
+ ctrls[s].controlID = 0;
+ }
+
+ if (s != num) {
+ break;
+ }
+
+ *pctrls = ctrls;
+
+ return num;
+
+ } while (FALSE);
+
+ if (ctrls) {
+ for (s = 0; s < num; s++) {
+ if (ctrls[s].name) {
+ free(ctrls[s].name);
+ }
+ }
+
+ free(ctrls);
+ }
+
+ return 0;
+}
+
+static DWORD find_ctrl(HMIXEROBJ mixer, DWORD lineID, DWORD ctrlID)
+{
+ MMRESULT res;
+ MIXERLINE line;
+ MIXERLINECONTROLS controls;
+ MIXERCONTROL control;
+
+ line.cbStruct = sizeof(MIXERLINE);
+ line.dwComponentType = lineID;
+
+ res = mixerGetLineInfo(mixer,
+ &line,
+ MIXER_GETLINEINFOF_COMPONENTTYPE);
+
+ if (res != MMSYSERR_NOERROR) {
+ return -1;
+ }
+
+ controls.cbStruct = sizeof(MIXERLINECONTROLS);
+ controls.dwLineID = line.dwLineID;
+ controls.dwControlType = ctrlID;
+ controls.cbmxctrl = sizeof(MIXERCONTROL);
+ controls.pamxctrl = &control;
+
+ control.cbStruct = sizeof(MIXERCONTROL);
+
+ res = mixerGetLineControls(mixer,
+ &controls,
+ MIXER_GETLINECONTROLSF_ONEBYTYPE);
+
+ if (res != MMSYSERR_NOERROR) {
+ return -1;
+ }
+
+ return control.dwControlID;
+}
+
+static int initialize(px_mixer *Px)
+{
+ Px->info = calloc(1, sizeof(PxInfo));
+ if (Px->info == NULL) {
+ return FALSE;
+ }
+
+ Px->CloseMixer = close_mixer;
+ Px->GetNumMixers = get_num_mixers;
+ Px->GetMixerName = get_mixer_name;
+ Px->GetMasterVolume = get_master_volume;
+ Px->SetMasterVolume = set_master_volume;
+ Px->SupportsPCMOutputVolume = supports_pcm_output_volume;
+ Px->GetPCMOutputVolume = get_pcm_output_volume;
+ Px->SetPCMOutputVolume = set_pcm_output_volume;
+ Px->GetNumOutputVolumes = get_num_output_volumes;
+ Px->GetOutputVolumeName = get_output_volume_name;
+ Px->GetOutputVolume = get_output_volume;
+ Px->SetOutputVolume = set_output_volume;
+ Px->GetNumInputSources = get_num_input_sources;
+ Px->GetInputSourceName = get_input_source_name;
+ Px->GetCurrentInputSource = get_current_input_source;
+ Px->SetCurrentInputSource = set_current_input_source;
+ Px->GetInputVolume = get_input_volume;
+ Px->SetInputVolume = set_input_volume;
+
+// Px->SupportsOutputBalance = supports_output_balance;
+// Px->GetOutputBalance = get_output_balance;
+// Px->SetOutputBalance = set_output_balance;
+
+// Px->SupportsPlaythrough = supports_play_through;
+// Px->GetPlaythrough = get_play_through;
+// Px->SetPlaythrough = set_play_through;
+
+ return TRUE;
+}
+
+static int cleanup(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int i;
+
+ if (info) {
+ if (info->hInputMixer) {
+ mixerClose((HMIXER) info->hInputMixer);
+ }
+
+ if (info->hOutputMixer) {
+ mixerClose((HMIXER) info->hOutputMixer);
+ }
+
+ if (info->inName) {
+ free(info->inName);
+ }
+
+ if (info->outName) {
+ free(info->outName);
+ }
+
+ if (info->src) {
+ for (i = 0; i < info->numInputs; i++) {
+ if (info->src[i].name) {
+ free(info->src[i].name);
+ }
+ }
+
+ free(info->src);
+ }
+
+ if (info->dst) {
+ for (i = 0; i < info->numOutputs; i++) {
+ if (info->dst[i].name) {
+ free(info->dst[i].name);
+ }
+ }
+
+ free(info->dst);
+ }
+
+ free(info);
+ Px->info = NULL;
+ }
+
+ return FALSE;
+}
+
+static void close_mixer(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ cleanup(Px);
+}
+
+static int get_num_mixers(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return (info->hInputMixer != NULL) + (info->hOutputMixer != NULL);
+}
+
+static const char *get_mixer_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ MIXERCAPS caps;
+ MMRESULT res;
+
+ if (i > 1) {
+ return NULL;
+ }
+
+ if (i == 0) {
+ if (!info->inName) {
+ res = mixerGetDevCaps((UINT) info->hInputMixer, &caps, sizeof(caps));
+ if (res == MMSYSERR_NOERROR) {
+ info->inName = strdup(caps.szPname);
+ }
+ }
+ return info->inName;
+ }
+
+ if (!info->outName) {
+ res = mixerGetDevCaps((UINT) info->hOutputMixer, &caps, sizeof(caps));
+ if (res == MMSYSERR_NOERROR) {
+ info->outName = strdup(caps.szPname);
+ }
+ }
+
+ return info->outName;
+}
+
+static PxVolume VolumeFunction(HMIXEROBJ hMixer, DWORD controlID, PxVolume volume)
+{
+ MIXERCONTROLDETAILS details;
+ MMRESULT result;
+ MIXERCONTROLDETAILS_UNSIGNED value;
+
+ if (hMixer == NULL) {
+ return -1.0;
+ }
+
+ memset(&value, 0, sizeof(MIXERCONTROLDETAILS_UNSIGNED));
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = controlID;
+ details.cChannels = 1; /* all channels */
+ details.cMultipleItems = 0;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
+ details.paDetails = &value;
+
+ if (volume < 0.0) {
+ result = mixerGetControlDetails(hMixer,
+ &details,
+ MIXER_GETCONTROLDETAILSF_VALUE);
+ if (result != MMSYSERR_NOERROR)
+ return -1.0;
+
+ return (PxVolume)(value.dwValue / 65535.0);
+ }
+
+ value.dwValue = (unsigned short)(volume * 65535.0);
+ result = mixerSetControlDetails(hMixer,
+ &details,
+ MIXER_GETCONTROLDETAILSF_VALUE);
+
+ if (result != MMSYSERR_NOERROR)
+ return -1.0;
+
+ return 0.0;
+}
+
+static PxVolume get_master_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return VolumeFunction(info->hOutputMixer, info->speakerID, -1.0);
+}
+
+static void set_master_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ VolumeFunction(info->hOutputMixer, info->speakerID, volume);
+
+ return;
+}
+
+/*
+|| Main output volume
+*/
+
+static int supports_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return (info->waveID != -1);
+}
+
+static PxVolume get_pcm_output_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return VolumeFunction(info->hOutputMixer, info->waveID, -1.0);
+}
+
+static void set_pcm_output_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ VolumeFunction(info->hOutputMixer, info->waveID, volume);
+
+ return;
+}
+
+/*
+|| Output info
+*/
+
+static int get_num_output_volumes(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return info->numOutputs;
+}
+
+static const char *get_output_volume_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (i < info->numOutputs) {
+ return info->dst[i].name;
+ }
+
+ return NULL;
+}
+
+/*
+|| Output volume
+*/
+
+static PxVolume get_output_volume(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (i < info->numOutputs) {
+ return VolumeFunction(info->hOutputMixer,
+ info->src[i].controlID,
+ -1.0);
+ }
+
+ return -1.0;
+}
+
+static void set_output_volume(px_mixer *Px, int i, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (i < info->numOutputs) {
+ VolumeFunction(info->hOutputMixer,
+ info->src[i].controlID,
+ volume);
+ }
+
+ return;
+}
+
+/*
+|| Input source
+*/
+
+static int get_num_input_sources(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ return info->numInputs;
+}
+
+static const char *get_input_source_name(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+
+ if (i < info->numInputs) {
+ return info->src[i].name;
+ }
+
+ return NULL;
+}
+
+static int get_current_input_source(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ MIXERCONTROLDETAILS details;
+ MIXERCONTROLDETAILS_LISTTEXT *list;
+ MIXERCONTROLDETAILS_BOOLEAN *flags;
+ MMRESULT res;
+ int i = -1;
+ int j;
+
+ if (!info->hInputMixer) {
+ return -1;
+ }
+
+ do {
+ list = calloc(info->numInputs, sizeof(MIXERCONTROLDETAILS_LISTTEXT));
+ flags = calloc(info->numInputs, sizeof(MIXERCONTROLDETAILS_BOOLEAN));
+ if (list == NULL || flags == NULL) {
+ break;
+ }
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_LISTTEXT);
+ details.paDetails = &list[0];
+
+ res = mixerGetControlDetails(info->hInputMixer,
+ &details,
+ MIXER_GETCONTROLDETAILSF_LISTTEXT);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
+ details.paDetails = &flags[0];
+
+ res = mixerGetControlDetails(info->hInputMixer,
+ &details,
+ MIXER_SETCONTROLDETAILSF_VALUE);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+
+ for (j = 0; j < info->numInputs; j++) {
+ if (flags[j].fValue) {
+ i = j;
+ break;
+ }
+ }
+
+ for (j = 0; j < info->numInputs; j++) {
+ if (info->src[j].lineID == list[i].dwParam1 ) {
+ i = j;
+ break;
+ }
+ }
+
+ } while(FALSE);
+
+ if (list) {
+ free(list);
+ }
+
+ if (flags) {
+ free(flags);
+ }
+
+ return i;
+}
+
+static void set_current_input_source(px_mixer *Px, int i)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ MIXERCONTROLDETAILS details;
+ MIXERCONTROLDETAILS_LISTTEXT *list;
+ MIXERCONTROLDETAILS_BOOLEAN *flags;
+ MMRESULT res;
+ int j;
+
+ if (!info->hInputMixer) {
+ return;
+ }
+
+ do {
+ list = calloc(info->numInputs, sizeof(MIXERCONTROLDETAILS_LISTTEXT));
+ flags = calloc(info->numInputs, sizeof(MIXERCONTROLDETAILS_BOOLEAN));
+ if (list == NULL || flags == NULL) {
+ break;
+ }
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_LISTTEXT);
+ details.paDetails = &list[0];
+
+ res = mixerGetControlDetails(info->hInputMixer,
+ &details,
+ MIXER_GETCONTROLDETAILSF_LISTTEXT);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+
+ for (j = 0; j < info->numInputs; j++) {
+ if (list[j].dwParam1 == info->src[i].lineID) {
+ flags[j].fValue = TRUE;
+ break;
+ }
+ }
+
+ details.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ details.dwControlID = info->muxID;
+ details.cMultipleItems = info->numInputs;
+ details.cChannels = 1;
+ details.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
+ details.paDetails = &flags[0];
+
+ res = mixerSetControlDetails(info->hInputMixer,
+ &details,
+ MIXER_SETCONTROLDETAILSF_VALUE);
+
+ if (res != MMSYSERR_NOERROR) {
+ break;
+ }
+ } while(FALSE);
+
+ if (list) {
+ free(list);
+ }
+
+ if (flags) {
+ free(flags);
+ }
+
+ return;
+}
+
+/*
+|| Input volume
+*/
+
+static PxVolume get_input_volume(px_mixer *Px)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int src;
+
+ if (info->hInputMixer) {
+ src = get_current_input_source(Px);
+ if (src < info->numInputs) {
+ return VolumeFunction(info->hInputMixer,
+ info->src[src].controlID,
+ -1.0);
+ }
+ }
+
+ return -1.0;
+}
+
+static void set_input_volume(px_mixer *Px, PxVolume volume)
+{
+ PxInfo *info = (PxInfo *)Px->info;
+ int src;
+
+ if (info->hInputMixer) {
+ src = get_current_input_source(Px);
+ if (src < info->numInputs) {
+ VolumeFunction(info->hInputMixer,
+ info->src[src].controlID,
+ volume);
+ }
+ }
+
+ return;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_win_common.h
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_win_common.h Fri Aug 24 13:53:53 2007
@@ -0,0 +1,75 @@
+#ifndef PX_WIN_COMMON_H
+#define PX_WIN_COMMON_H
+/*
+ * PortMixer
+ * Windows Common Header
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+typedef struct PxCtrl
+{
+ char *name;
+ DWORD lineID;
+ DWORD controlID;
+} PxCtrl;
+
+typedef struct PxInfo
+{
+ HMIXEROBJ hInputMixer;
+ char *inName;
+ int numInputs;
+ PxCtrl *src;
+
+ HMIXEROBJ hOutputMixer;
+ char *outName;
+ int numOutputs;
+ PxCtrl *dst;
+
+ DWORD muxID;
+ DWORD speakerID;
+ DWORD waveID;
+} PxInfo;
+
+int open_mixers(px_mixer *Px, UINT deviceIn, UINT deviceOut);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Added: freeswitch/branches/cseket/libs/portmixer/src/px_win_ds.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_win_ds.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,179 @@
+/*
+ * PortMixer
+ * Windows DirectSound Implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni and Augustus Saunders
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+#define COBJMACROS
+#define DIRECTSOUND_VERSION 0x0300
+
+#include <windows.h>
+#include <dsound.h>
+#include <dsconf.h>
+#include <objbase.h>
+#include <unknwn.h>
+
+#include "portaudio.h"
+#include "pa_win_ds.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+#include "px_win_common.h"
+
+const GUID FAR DSPROPSETID_DirectSoundDevice =
+{0x84624f82, 0x25ec, 0x11d1, {0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca}};
+
+const GUID FAR CLSID_DirectSoundPrivate =
+{0x11ab3ec0, 0x25ec, 0x11d1, {0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca}};
+
+typedef HRESULT (CALLBACK *GCO) (REFCLSID, REFIID, LPVOID *);
+
+#if defined(_DEBUG)
+#include <stdio.h>
+static void dprintf(const char *format, ...)
+{
+ char buf[4096];
+ va_list args;
+ int cnt;
+
+ va_start(args, format);
+ cnt = _vsnprintf(buf, sizeof(buf) - 1, format, args);
+ va_end(args);
+
+ if (cnt > 0) {
+ buf[cnt] = '\0';
+ OutputDebugString(buf);
+ }
+}
+#endif
+
+int OpenMixer_Win_DirectSound(px_mixer *Px, int index)
+{
+ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA desc;
+ HMODULE hDsound = INVALID_HANDLE_VALUE;
+ GCO DllGetClassObject;
+ IClassFactory *pcf = NULL;
+ IKsPropertySet *pps = NULL;
+ HRESULT hr;
+ ULONG bytes;
+ LPGUID guidIn;
+ LPGUID guidOut;
+ UINT deviceIn = -1;
+ UINT deviceOut = -1;
+
+ guidIn = PaWinDS_GetStreamInputGUID(Px->pa_stream);
+ guidOut = PaWinDS_GetStreamOutputGUID(Px->pa_stream);
+
+ do {
+ hDsound = LoadLibrary("dsound.dll");
+ if (hDsound == NULL) {
+ break;
+ }
+
+ DllGetClassObject = (GCO) GetProcAddress(hDsound, "DllGetClassObject");
+ if (DllGetClassObject == NULL) {
+ break;
+ }
+
+ hr = DllGetClassObject(&CLSID_DirectSoundPrivate,
+ &IID_IClassFactory,
+ (void **)(&pcf));
+ if (hr || pcf == NULL) {
+ break;
+ }
+
+ hr = IClassFactory_CreateInstance(pcf,
+ NULL,
+ &IID_IKsPropertySet,
+ (void **)(&pps));
+ if (hr || pps == NULL) {
+ break;
+ }
+
+ if (guidIn) {
+ memcpy(&desc.DeviceId, guidIn, sizeof(desc.DeviceId));
+ desc.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
+ hr = IKsPropertySet_Get(pps,
+ &DSPROPSETID_DirectSoundDevice,
+ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION,
+ NULL,
+ 0,
+ &desc,
+ sizeof(desc),
+ &bytes);
+ if (FAILED(hr)) {
+ break;
+ }
+
+ deviceIn = desc.WaveDeviceId;
+ }
+
+ if (guidOut) {
+ memcpy(&desc.DeviceId, guidOut, sizeof(desc.DeviceId));
+ desc.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
+ hr = IKsPropertySet_Get(pps,
+ &DSPROPSETID_DirectSoundDevice,
+ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION,
+ NULL,
+ 0,
+ &desc,
+ sizeof(desc),
+ &bytes);
+ if (FAILED(hr)) {
+ break;
+ }
+
+ deviceOut = desc.WaveDeviceId;
+ }
+
+ if (open_mixers(Px, deviceIn, deviceOut))
+ {
+ return TRUE;
+ }
+ } while( FALSE );
+
+ if (pps) {
+ IUnknown_Release(pps);
+ }
+
+ if (pcf) {
+ IUnknown_Release(pcf);
+ }
+
+ if (hDsound != INVALID_HANDLE_VALUE) {
+ FreeLibrary(hDsound);
+ }
+
+ return FALSE;
+}
Added: freeswitch/branches/cseket/libs/portmixer/src/px_win_wmme.c
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/src/px_win_wmme.c Fri Aug 24 13:53:53 2007
@@ -0,0 +1,82 @@
+/*
+ * PortMixer
+ * Windows WMME Implementation
+ *
+ * Copyright (c) 2002, 2006
+ *
+ * Written by Dominic Mazzoni and Augustus Saunders
+ * and Leland Lucius
+ *
+ * PortMixer is intended to work side-by-side with PortAudio,
+ * the Portable Real-Time Audio Library by Ross Bencina and
+ * Phil Burk.
+ *
+ * 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.
+ *
+ */
+
+#include <windows.h>
+
+#include "portaudio.h"
+#include "pa_win_wmme.h"
+
+#include "portmixer.h"
+#include "px_mixer.h"
+#include "px_win_common.h"
+
+int OpenMixer_Win_MME(px_mixer *Px, int index)
+{
+ HWAVEIN hWaveIn;
+ HWAVEOUT hWaveOut;
+ MMRESULT res;
+ UINT deviceIn = UINT_MAX;
+ UINT deviceOut = UINT_MAX;
+
+ hWaveIn = PaWinMME_GetStreamInputHandle(Px->pa_stream, 0);
+ hWaveOut = PaWinMME_GetStreamOutputHandle(Px->pa_stream, 0);
+
+ if (hWaveIn) {
+ res = mixerGetID((HMIXEROBJ) hWaveIn,
+ &deviceIn,
+ MIXER_OBJECTF_HWAVEIN);
+ if (res != MMSYSERR_NOERROR) {
+ return FALSE;
+ }
+ }
+
+ if (hWaveOut) {
+ res = mixerGetID((HMIXEROBJ) hWaveOut,
+ &deviceOut,
+ MIXER_OBJECTF_HWAVEOUT);
+ if (res != MMSYSERR_NOERROR) {
+ return FALSE;
+ }
+ }
+
+ if (open_mixers(Px, deviceIn, deviceOut)) {
+ return TRUE;
+ }
+
+ return FALSE;
+}
Added: freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Entries
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Entries Fri Aug 24 13:53:53 2007
@@ -0,0 +1,2 @@
+/portmixer.vcproj/1.13/Mon Jun 18 16:10:53 2007//
+D
Added: freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Repository
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Repository Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+lib-src/portmixer/winproj
Added: freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Root
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/winproj/CVS/Root Fri Aug 24 13:53:53 2007
@@ -0,0 +1 @@
+:pserver:anonymous at audacity.cvs.sourceforge.net:/cvsroot/audacity
Added: freeswitch/branches/cseket/libs/portmixer/winproj/portmixer.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/branches/cseket/libs/portmixer/winproj/portmixer.vcproj Fri Aug 24 13:53:53 2007
@@ -0,0 +1,582 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="portmixer"
+ ProjectGUID="{3A76129B-55AB-4D54-BAA7-08F63ED52569}"
+ RootNamespace="portmixer"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\$(ConfigurationName)"
+ IntermediateDirectory=".\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O2"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PX_USE_WIN_MME"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixer.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /O2 /Ob1 /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\$(ConfigurationName)"
+ IntermediateDirectory=".\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PX_USE_WIN_MME"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixerd.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /Od /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /ZI /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode_Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PX_USE_WIN_MME"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixerud.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /Od /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /ZI /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Unicode_Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O2"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PX_USE_WIN_MME"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixeru.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /O2 /Ob1 /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug DLL|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PX_USE_WIN_MME"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixerd.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /Od /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /ZI /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug wx284|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="echo // Automatically generated file >".\$(ConfigurationName)\config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>".\$(ConfigurationName)\config.h"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\include;"..\..\portaudio-v19\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PX_USE_WIN_MME"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile=".\$(ConfigurationName)/portmixer.pch"
+ AssemblerListingLocation=".\$(ConfigurationName)/"
+ ObjectFile=".\$(ConfigurationName)/"
+ ProgramDataBaseFileName=".\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ ForcedIncludeFiles="$(ProjectDir)\$(ConfigurationName)\config.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\portmixerd.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl /Od /I "..\..\portaudio-v19\include" /I "..\include" /I"%DXSDK_DIR%include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Fo".\$(OutDir)/" /Fd".\$(OutDir)/" /W3 /c /ZI /wd4996 "..\src\px_win_ds.c"

set LIBS="%DXSDK_DIR%lib\x86\dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" ".\$(OutDir)\*.obj" %LIBS%
"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\src\px_mixer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\px_mixer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\src\px_win_common.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\px_win_common.h"
+ >
+ </File>
+ <File
+ RelativePath="..\src\px_win_ds.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode_Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Unicode_Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug DLL|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug wx284|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\src\px_win_wmme.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\include\portmixer.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
More information about the Freeswitch-branches
mailing list