From: <pst...@us...> - 2008-04-05 01:35:15
|
Revision: 394 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=394&view=rev Author: pstieber Date: 2008-04-04 18:35:12 -0700 (Fri, 04 Apr 2008) Log Message: ----------- Removed the force option from autoreconf. Modified Paths: -------------- trunk/jazz/bootstrap trunk/jazz/config/config.guess trunk/jazz/config/config.sub trunk/jazz/config/ltmain.sh trunk/jazz/src/AlsaDriver.cpp trunk/jazz/src/JazzPlusPlusApplication.cpp trunk/jazz/src/Project.cpp Modified: trunk/jazz/bootstrap =================================================================== --- trunk/jazz/bootstrap 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/bootstrap 2008-04-05 01:35:12 UTC (rev 394) @@ -1,2 +1,2 @@ #! /bin/sh -autoreconf --install --verbose --force +autoreconf --install --verbose Modified: trunk/jazz/config/config.guess =================================================================== --- trunk/jazz/config/config.guess 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/config/config.guess 2008-04-05 01:35:12 UTC (rev 394) @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2005-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -107,7 +106,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -207,11 +206,8 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -768,14 +764,7 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -790,12 +779,9 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -831,9 +817,6 @@ arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -868,11 +851,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -891,11 +870,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -992,7 +967,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout @@ -1002,11 +977,7 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit Modified: trunk/jazz/config/config.sub =================================================================== --- trunk/jazz/config/config.sub 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/config/config.sub 2008-04-05 01:35:12 UTC (rev 394) @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-09-20' +timestamp='2005-12-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -241,7 +240,7 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -249,8 +248,7 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -270,25 +268,26 @@ | mn10200 | mn10300 \ | mt \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -318,7 +317,7 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ @@ -329,7 +328,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -351,28 +350,29 @@ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -818,12 +818,6 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -910,10 +904,6 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -1130,7 +1120,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1203,8 +1193,7 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1219,7 +1208,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1371,12 +1360,9 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) + spu-*) os=-elf ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1386,9 +1372,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 Modified: trunk/jazz/config/ltmain.sh =================================================================== --- trunk/jazz/config/ltmain.sh 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/config/ltmain.sh 2008-04-05 01:35:12 UTC (rev 394) @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # This program is free software; you can redistribute it and/or modify @@ -33,6 +33,9 @@ # function. progpath="$0" +# define SED for historic ltconfig's generated by Libtool 1.3 +test -z "$SED" && SED=sed + # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" @@ -43,8 +46,8 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -57,8 +60,6 @@ else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -116,10 +117,10 @@ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" done # Make sure IFS has a sensible default @@ -208,13 +209,7 @@ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -348,11 +343,11 @@ my_xlib_u=$my_xlib while :; do case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" @@ -416,8 +411,19 @@ ##################################### # Darwin sucks +#eval std_shrext=\"$shrext_cmds\" + +# And fixing for Darwin sucks for everybody else +if test -z "$shrext_cmds" && test -n "$shrext"; then + eval shrext_cmds=\"$shrext\" +fi + eval std_shrext=\"$shrext_cmds\" +# This value is evaluated to 32768, so place it here as a compatilibity hack +# because older libtool.m4 didn't define this variable +test -z "$max_cmd_len" && max_cmd_len=32768 + disable_libs=no # Parse our command line options once, thoroughly. @@ -482,12 +488,11 @@ ;; --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -784,7 +789,7 @@ *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; + *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; @@ -1169,8 +1174,8 @@ do case $arg in -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1179,19 +1184,19 @@ fi prefer_static_libs=yes ;; - -static) + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1639,7 +1644,7 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1659,11 +1664,10 @@ # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin + # -pg pass through profiling flag for GCC # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1691,9 +1695,9 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. + # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -2134,7 +2138,7 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2530,9 +2534,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3239,10 +3243,9 @@ age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor` + current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" - lt_irix_increment=no ;; esac ;; @@ -3301,8 +3304,7 @@ versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) @@ -3316,11 +3318,8 @@ ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi + major=`expr $current - $age + 1` + case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3457,11 +3456,11 @@ fi # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3562,7 +3561,7 @@ int main() { return 0; } EOF $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` @@ -3924,10 +3923,7 @@ test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4015,15 +4011,23 @@ fi tmp_deplibs= + inst_prefix_arg= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then + inst_prefix_arg="$inst_prefix_arg $test_deplib" + else + tmp_deplibs="$tmp_deplibs $test_deplib" + fi ;; esac done deplibs="$tmp_deplibs" + if test -n "$inst_prefix_arg"; then + deplibs="$inst_prefix_arg $deplibs" + fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then @@ -4293,7 +4297,7 @@ if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -5313,8 +5317,6 @@ else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -6411,10 +6413,8 @@ if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE fi ;; @@ -6480,11 +6480,14 @@ # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" done + # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else Modified: trunk/jazz/src/AlsaDriver.cpp =================================================================== --- trunk/jazz/src/AlsaDriver.cpp 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/src/AlsaDriver.cpp 2008-04-05 01:35:12 UTC (rev 394) @@ -48,117 +48,123 @@ #define snd_pcm_write(pcm,data,size) snd_pcm_writei(pcm,data,size) #define snd_pcm_read(pcm,data,size) snd_pcm_readi(pcm,data,size) -#define MAX_FRAGS 16 // enough large? +#define MAX_FRAGS 16 // enough large? class tAlsaAudioListener : public wxTimer { public: - tAlsaAudioListener(tAlsaAudioPlayer *p, int key) - { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - player->running_mode = 0; - - // SYNC seems not to work?? so add 8 more silent buffers - // to hear the end of the sample too. - player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); - count = 8 + player->samples.PrepareListen(key); - Start(20); - } + tAlsaAudioListener(tAlsaAudioPlayer *p, int key) + { + hard_exit = TRUE; + player = p; + player->listener = this; + player->rec_info = 0; // not recording! + player->running_mode = 0; + + // SYNC seems not to work?? so add 8 more silent buffers + // to hear the end of the sample too. + player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); + count = 8 + player->samples.PrepareListen(key); + Start(20); + } - tAlsaAudioListener(tAlsaAudioPlayer *p, tSample &spl, long fr_smpl, long to_smpl) { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - player->running_mode = 0; + tAlsaAudioListener(tAlsaAudioPlayer *p, tSample &spl, long fr_smpl, long to_smpl) + { + hard_exit = TRUE; + player = p; + player->listener = this; + player->rec_info = 0; // not recording! + player->running_mode = 0; - player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); - player->samples.ResetBufferSize(player->frag_byte_size[tAlsaAudioPlayer::PLAYBACK]); - count = 8 + player->samples.PrepareListen(&spl, fr_smpl, to_smpl); - Start(20); - } + player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); + player->samples.ResetBufferSize(player->frag_byte_size[tAlsaAudioPlayer::PLAYBACK]); + count = 8 + player->samples.PrepareListen(&spl, fr_smpl, to_smpl); + Start(20); + } - ~tAlsaAudioListener() - { - Stop(); - player->CloseDsp(hard_exit); - player->listener = 0; - } + ~tAlsaAudioListener() + { + Stop(); + player->CloseDsp(hard_exit); + player->listener = 0; + } - virtual void Notify() - { - count -= player->WriteSamples(); - count += player->samples.ContinueListen(); - if (count <= 0) { - hard_exit = FALSE; - delete this; - } - } + virtual void Notify() + { + count -= player->WriteSamples(); + count += player->samples.ContinueListen(); + if (count <= 0) + { + hard_exit = FALSE; + delete this; + } + } - long GetPlayPosition() - { - return player->GetCurrentPosition(tAlsaAudioPlayer::PLAYBACK); - } + long GetPlayPosition() + { + return player->GetCurrentPosition(tAlsaAudioPlayer::PLAYBACK); + } -private: - tAlsaAudioPlayer *player; - int count; - int hard_exit; + private: + tAlsaAudioPlayer *player; + int count; + int hard_exit; }; tAlsaAudioPlayer::tAlsaAudioPlayer(JZSong *song) - : tAlsaPlayer(song) + : tAlsaPlayer(song) { - AudioBuffer = new tEventArray(); - installed = 0; - audio_enabled = 0; - listener = 0; - can_duplex = 0; // no duplex yet. - pcm[PLAYBACK] = NULL; - pcm[CAPTURE] = NULL; + AudioBuffer = new tEventArray(); + installed = 0; + audio_enabled = 0; + listener = 0; + can_duplex = 0; // no duplex yet. + pcm[PLAYBACK] = NULL; + pcm[CAPTURE] = NULL; - dev[PLAYBACK] = gpConfig->StrValue(C_AlsaAudioOutputDevice); - dev[CAPTURE] = gpConfig->StrValue(C_AlsaAudioInputDevice); - can_duplex = 1; /* FIXME */ - installed = 1; - audio_enabled = 1; + dev[PLAYBACK] = gpConfig->StrValue(C_AlsaAudioOutputDevice); + dev[CAPTURE] = gpConfig->StrValue(C_AlsaAudioInputDevice); + can_duplex = 1; /* FIXME */ + installed = 1; + audio_enabled = 1; } tAlsaAudioPlayer::~tAlsaAudioPlayer() { - delete listener; - delete AudioBuffer; - if (pcm[PLAYBACK]) { - snd_pcm_close(pcm[PLAYBACK]); - pcm[PLAYBACK] = NULL; - } - if (pcm[CAPTURE]) { - snd_pcm_close(pcm[CAPTURE]); - pcm[CAPTURE] = NULL; - } + cout << "Deleting ALSA audio driver start..." << endl; + delete listener; + delete AudioBuffer; + if (pcm[PLAYBACK]) + { + snd_pcm_close(pcm[PLAYBACK]); + pcm[PLAYBACK] = NULL; + } + if (pcm[CAPTURE]) + { + snd_pcm_close(pcm[CAPTURE]); + pcm[CAPTURE] = NULL; + } + cout << "Done." << endl; } int tAlsaAudioPlayer::LoadSamples(const char *filename) { - return samples.Load(filename); + return samples.Load(filename); } int tAlsaAudioPlayer::RecordMode() const { - return running_mode & (1 << CAPTURE); + return running_mode & (1 << CAPTURE); } int tAlsaAudioPlayer::PlayBackMode() const { - return running_mode & (1 << PLAYBACK); + return running_mode & (1 << PLAYBACK); } void tAlsaAudioPlayer::StartPlay(long clock, long loopClock, int cont) @@ -211,214 +217,240 @@ void tAlsaAudioPlayer::StartAudio() { - if (pcm[PLAYBACK]) - snd_pcm_start(pcm[PLAYBACK]); - if (pcm[CAPTURE]) - snd_pcm_start(pcm[CAPTURE]); + if (pcm[PLAYBACK]) + snd_pcm_start(pcm[PLAYBACK]); + if (pcm[CAPTURE]) + snd_pcm_start(pcm[CAPTURE]); } void tAlsaAudioPlayer::OpenDsp(int mode, int sync_mode) { - if (!audio_enabled) - return; + if (!audio_enabled) + return; - unsigned int channels; - snd_pcm_format_t format; - snd_pcm_uframes_t buffer_size, period_size; + unsigned int channels; + snd_pcm_format_t format; + snd_pcm_uframes_t buffer_size, period_size; - frame_shift[mode] = 0; - if (samples.BitsPerSample() == 8) - format = SND_PCM_FORMAT_U8; - else { - format = SND_PCM_FORMAT_S16_LE; - frame_shift[mode]++; - } - channels = samples.GetChannels(); - if (channels > 1) - frame_shift[mode]++; + frame_shift[mode] = 0; + if (samples.BitsPerSample() == 8) + format = SND_PCM_FORMAT_U8; + else { + format = SND_PCM_FORMAT_S16_LE; + frame_shift[mode]++; + } + channels = samples.GetChannels(); + if (channels > 1) + frame_shift[mode]++; - snd_pcm_stream_t stream = (mode == PLAYBACK) ? - SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE; - if (snd_pcm_open(&pcm[mode], dev[mode], stream, SND_PCM_NONBLOCK) < 0) - { - perror("snd_pcm_open"); - audio_enabled = 0; - return; - } + snd_pcm_stream_t stream = (mode == PLAYBACK) ? + SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE; + if (snd_pcm_open(&pcm[mode], dev[mode], stream, SND_PCM_NONBLOCK) < 0) + { + perror("snd_pcm_open"); + audio_enabled = 0; + return; + } - snd_pcm_hw_params_t *hw; - snd_pcm_hw_params_alloca(&hw); - snd_pcm_hw_params_any(pcm[mode], hw); - if (snd_pcm_hw_params_set_access(pcm[mode], hw, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) { - perror("cannot set interleaved access"); - goto __error; - } - if (snd_pcm_hw_params_set_format(pcm[mode], hw, format) < 0) { - perror("cannot set audio format"); - goto __error; - } - if (snd_pcm_hw_params_set_channels(pcm[mode], hw, channels) < 0) { - perror("cannot set audio channels"); - goto __error; - } - if (snd_pcm_hw_params_set_rate(pcm[mode], hw, samples.GetSpeed(), 0) < 0) { - cerr << "cannot set audio rate: " << samples.GetSpeed() << endl; - goto __error; - } + snd_pcm_hw_params_t *hw; + snd_pcm_hw_params_alloca(&hw); + snd_pcm_hw_params_any(pcm[mode], hw); + if (snd_pcm_hw_params_set_access(pcm[mode], hw, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) + { + perror("cannot set interleaved access"); + goto __error; + } + if (snd_pcm_hw_params_set_format(pcm[mode], hw, format) < 0) + { + perror("cannot set audio format"); + goto __error; + } + if (snd_pcm_hw_params_set_channels(pcm[mode], hw, channels) < 0) + { + perror("cannot set audio channels"); + goto __error; + } + if (snd_pcm_hw_params_set_rate(pcm[mode], hw, samples.GetSpeed(), 0) < 0) + { + cerr << "cannot set audio rate: " << samples.GetSpeed() << endl; + goto __error; + } - period_size = FRAGBYTES >> frame_shift[mode]; - if ((period_size = snd_pcm_hw_params_set_period_size_near(pcm[mode], hw, &period_size, 0)) < 0) { - perror("cannot set audio period"); - goto __error; - } - buffer_size = period_size * MAX_FRAGS; - if ((buffer_size = snd_pcm_hw_params_set_buffer_size_near(pcm[mode], hw, &buffer_size)) < 0) { - perror("cannot set audio buffer"); - goto __error; - } - if (snd_pcm_hw_params(pcm[mode], hw) < 0) { - perror("snd_pcm_hw_params"); - goto __error; - } + period_size = FRAGBYTES >> frame_shift[mode]; + if ((period_size = snd_pcm_hw_params_set_period_size_near(pcm[mode], hw, &period_size, 0)) < 0) + { + perror("cannot set audio period"); + goto __error; + } + buffer_size = period_size * MAX_FRAGS; + if ((buffer_size = snd_pcm_hw_params_set_buffer_size_near(pcm[mode], hw, &buffer_size)) < 0) + { + perror("cannot set audio buffer"); + goto __error; + } + if (snd_pcm_hw_params(pcm[mode], hw) < 0) + { + perror("snd_pcm_hw_params"); + goto __error; + } - frag_size[mode] = period_size; /* in frames */ - frag_byte_size[mode] = period_size << frame_shift[mode]; - frame_boundary[mode] = 0x7fffffff; + frag_size[mode] = period_size; /* in frames */ + frag_byte_size[mode] = period_size << frame_shift[mode]; + frame_boundary[mode] = 0x7fffffff; - snd_pcm_sw_params_t *sw; + snd_pcm_sw_params_t *sw; - snd_pcm_sw_params_alloca(&sw); - snd_pcm_sw_params_current(pcm[mode], sw); - if (sync_mode) - snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 0x7fffffff); /* FIXME */ - else - snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 1); - if (snd_pcm_sw_params(pcm[mode], sw) < 0) { - perror("snd_pcm_sw_params"); - goto __error; - } + snd_pcm_sw_params_alloca(&sw); + snd_pcm_sw_params_current(pcm[mode], sw); + if (sync_mode) + snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 0x7fffffff); /* FIXME */ + else + snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 1); + if (snd_pcm_sw_params(pcm[mode], sw) < 0) + { + perror("snd_pcm_sw_params"); + goto __error; + } - running_mode |= (1 << mode); + running_mode |= (1 << mode); - return; + return; __error: - snd_pcm_close(pcm[mode]); - pcm[mode] = NULL; - audio_enabled = 0; - return; + snd_pcm_close(pcm[mode]); + pcm[mode] = NULL; + audio_enabled = 0; + return; } void tAlsaAudioPlayer::CloseDsp(int reset) { - if (pcm) { - if (reset) { - if (pcm[PLAYBACK]) { - if (snd_pcm_drop(pcm[PLAYBACK]) < 0) - perror("playback drop"); - } - } else { - if (pcm[PLAYBACK]) { - if (snd_pcm_drain(pcm[PLAYBACK]) < 0 ) - perror("playback drain"); - } - if (pcm[CAPTURE]) { - if (snd_pcm_drain(pcm[CAPTURE]) < 0 ) - perror("capture drain"); - } - } - if (pcm[PLAYBACK]) { - snd_pcm_close(pcm[PLAYBACK]); - pcm[PLAYBACK] = NULL; - } - if (pcm[CAPTURE]) { - snd_pcm_close(pcm[CAPTURE]); - pcm[CAPTURE] = NULL; - } - } + if (pcm) + { + if (reset) + { + if (pcm[PLAYBACK]) + { + if (snd_pcm_drop(pcm[PLAYBACK]) < 0) + perror("playback drop"); + } + } + else + { + if (pcm[PLAYBACK]) + { + if (snd_pcm_drain(pcm[PLAYBACK]) < 0 ) + perror("playback drain"); + } + if (pcm[CAPTURE]) + { + if (snd_pcm_drain(pcm[CAPTURE]) < 0 ) + perror("capture drain"); + } + } + if (pcm[PLAYBACK]) + { + snd_pcm_close(pcm[PLAYBACK]); + pcm[PLAYBACK] = NULL; + } + if (pcm[CAPTURE]) + { + snd_pcm_close(pcm[CAPTURE]); + pcm[CAPTURE] = NULL; + } + } } void tAlsaAudioPlayer::Notify() { - if (audio_enabled) { - if (pcm[PLAYBACK]) { - WriteSamples(); - // here it may hang when swapping in pages - samples.FillBuffers(OutClock); - WriteSamples(); - } - if (pcm[CAPTURE]) - ReadSamples(); + if (audio_enabled) + { + if (pcm[PLAYBACK]) + { + WriteSamples(); + // here it may hang when swapping in pages + samples.FillBuffers(OutClock); + WriteSamples(); + } + if (pcm[CAPTURE]) + ReadSamples(); - if (pcm[PLAYBACK] && samples.softsync) - MidiSync(); - } - tAlsaPlayer::Notify(); + if (pcm[PLAYBACK] && samples.softsync) + MidiSync(); + } + tAlsaPlayer::Notify(); } // number of frames (or bytes) free int tAlsaAudioPlayer::GetFreeSpace(int mode) { - snd_pcm_status_t *info; - snd_pcm_status_alloca(&info); - if (snd_pcm_status(pcm[mode], info) < 0) { - perror("snd_pcm_status"); - return 0; - } - return snd_pcm_status_get_avail(info); /* in frames */ + snd_pcm_status_t *info; + snd_pcm_status_alloca(&info); + if (snd_pcm_status(pcm[mode], info) < 0) + { + perror("snd_pcm_status"); + return 0; + } + return snd_pcm_status_get_avail(info); /* in frames */ } int tAlsaAudioPlayer::WriteSamples() { - if (!audio_enabled || pcm[PLAYBACK] == NULL) - return 0; + if (!audio_enabled || pcm[PLAYBACK] == NULL) + return 0; - int blocks_written = 0; - int room; + int blocks_written = 0; + int room; - room = GetFreeSpace(PLAYBACK); + room = GetFreeSpace(PLAYBACK); - for (; room > frag_size[PLAYBACK]; room -= frag_size[PLAYBACK]) { - tAudioBuffer *buf = samples.full_buffers.Get(); - if (buf == 0) - break; - ssize_t written = snd_pcm_writei(pcm[PLAYBACK], buf->Data(), frag_size[PLAYBACK]); - if (written < 0) { - if (written == -EPIPE) { - cerr << "xrun!!" << endl; - snd_pcm_prepare(pcm[PLAYBACK]); - } else { - perror("audio write"); - } - } - if (written > 0) - cur_scount += written; - blocks_written++; - samples.free_buffers.Put(buf); - } + for (; room > frag_size[PLAYBACK]; room -= frag_size[PLAYBACK]) + { + tAudioBuffer *buf = samples.full_buffers.Get(); + if (buf == 0) + break; + ssize_t written = snd_pcm_writei(pcm[PLAYBACK], buf->Data(), frag_size[PLAYBACK]); + if (written < 0) { + if (written == -EPIPE) + { + cerr << "xrun!!" << endl; + snd_pcm_prepare(pcm[PLAYBACK]); + } + else + { + perror("audio write"); + } + } + if (written > 0) + cur_scount += written; + blocks_written++; + samples.free_buffers.Put(buf); + } - return blocks_written; + return blocks_written; } void tAlsaAudioPlayer::ReadSamples() { - if (!audio_enabled || pcm[CAPTURE] == NULL) - return; + if (!audio_enabled || pcm[CAPTURE] == NULL) + return; - int room = GetFreeSpace(CAPTURE); + int room = GetFreeSpace(CAPTURE); - for (; room > frag_size[CAPTURE]; room -= frag_size[CAPTURE]) { - short *b = recbuffers.RequestBuffer()->data; - if (snd_pcm_read(pcm[CAPTURE], b, frag_size[CAPTURE]) != - frag_size[CAPTURE]) { - recbuffers.UndoRequest(); - break; - } - } + for (; room > frag_size[CAPTURE]; room -= frag_size[CAPTURE]) + { + short *b = recbuffers.RequestBuffer()->data; + if (snd_pcm_read(pcm[CAPTURE], b, frag_size[CAPTURE]) != + frag_size[CAPTURE]) + { + recbuffers.UndoRequest(); + break; + } + } } @@ -437,71 +469,74 @@ long tAlsaAudioPlayer::GetCurrentPosition(int mode) { - return cur_scount; + return cur_scount; } void tAlsaAudioPlayer::MidiSync() { - if (!audio_enabled) - return; + if (!audio_enabled) + return; - int mode; - if (pcm[PLAYBACK]) - mode = PLAYBACK; - else if (pcm[CAPTURE]) - mode = CAPTURE; - else - return; // disabled + int mode; + if (pcm[PLAYBACK]) + mode = PLAYBACK; + else if (pcm[CAPTURE]) + mode = CAPTURE; + else + return; // disabled - long scount = GetCurrentPosition(mode); + long scount = GetCurrentPosition(mode); - // get realtime info for audio/midi sync - if (scount != last_scount) { - unsigned int qtick; - snd_seq_queue_status_t *status; - snd_seq_queue_status_alloca(&status); - if (snd_seq_get_queue_status(handle, queue, status) < 0) { - perror("snd_seq_get_queue_status"); - return; - } - qtick = snd_seq_queue_status_get_tick_time(status); - int samplediff; - if (scount < last_scount) - samplediff = frame_boundary[mode] - (last_scount - scount); - else - samplediff = scount - last_scount; - last_scount = scount; - cur_pos += samplediff; - long audio_clock = (long)samples.Samples2Ticks(cur_pos) + audio_clock_offset; - int delta_clock = audio_clock - qtick; - int new_speed = midi_speed + delta_clock; + // get realtime info for audio/midi sync + if (scount != last_scount) + { + unsigned int qtick; + snd_seq_queue_status_t *status; + snd_seq_queue_status_alloca(&status); + if (snd_seq_get_queue_status(handle, queue, status) < 0) + { + perror("snd_seq_get_queue_status"); + return; + } + qtick = snd_seq_queue_status_get_tick_time(status); + int samplediff; + if (scount < last_scount) + samplediff = frame_boundary[mode] - (last_scount - scount); + else + samplediff = scount - last_scount; + last_scount = scount; + cur_pos += samplediff; + long audio_clock = (long)samples.Samples2Ticks(cur_pos) + audio_clock_offset; + int delta_clock = audio_clock - qtick; + int new_speed = midi_speed + delta_clock; - // limit speed changes to some reasonable values - const int limit = 1; - if (new_speed > midi_speed + limit) - { - new_speed = midi_speed + limit; - } - if (midi_speed - limit > new_speed) - { - new_speed = midi_speed - limit; - } + // limit speed changes to some reasonable values + const int limit = 1; + if (new_speed > midi_speed + limit) + { + new_speed = midi_speed + limit; + } + if (midi_speed - limit > new_speed) + { + new_speed = midi_speed - limit; + } - if (new_speed != curr_speed) { - snd_seq_event_t ev; - memset(&ev, 0, sizeof(ev)); - snd_seq_ev_set_source(&ev, self.port); - snd_seq_ev_set_subs(&ev); - snd_seq_ev_set_direct(&ev); - snd_seq_ev_set_fixed(&ev); - int us = (int)( 60.0E6 / (double)new_speed ); - snd_seq_ev_set_queue_tempo(&ev, queue, us); - write(&ev, 1); - curr_speed = new_speed; - // xview has reentrancy problems!! - // gpTrackWindow->DrawSpeed(curr_speed); - } - } + if (new_speed != curr_speed) + { + snd_seq_event_t ev; + memset(&ev, 0, sizeof(ev)); + snd_seq_ev_set_source(&ev, self.port); + snd_seq_ev_set_subs(&ev); + snd_seq_ev_set_direct(&ev); + snd_seq_ev_set_fixed(&ev); + int us = (int)( 60.0E6 / (double)new_speed ); + snd_seq_ev_set_queue_tempo(&ev, queue, us); + write(&ev, 1); + curr_speed = new_speed; + // xview has reentrancy problems!! + // gpTrackWindow->DrawSpeed(curr_speed); + } + } } void tAlsaAudioPlayer::StopPlay() @@ -533,46 +568,46 @@ // gpTrackWindow->DrawSpeed(midi_speed); } - - void tAlsaAudioPlayer::ListenAudio(int key, int start_stop_mode) { - if (!audio_enabled) - return; + if (!audio_enabled) + return; - // when already listening then stop listening - if (listener) { - delete listener; - listener = 0; - if (start_stop_mode) - return; - } - if (key < 0) - return; + // when already listening then stop listening + if (listener) + { + delete listener; + listener = 0; + if (start_stop_mode) + return; + } + if (key < 0) + return; - if (pcm[PLAYBACK]) // device busy (playing) - return; - listener = new tAlsaAudioListener(this, key); + if (pcm[PLAYBACK]) // device busy (playing) + return; + listener = new tAlsaAudioListener(this, key); } void tAlsaAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) { - if (!audio_enabled) - return; + if (!audio_enabled) + return; - // when already listening then stop listening - if (listener) { - delete listener; - listener = 0; - } - if (pcm[PLAYBACK]) // device busy (playing) - return; - listener = new tAlsaAudioListener(this, spl, fr_smpl, to_smpl); + // when already listening then stop listening + if (listener) + { + delete listener; + listener = 0; + } + if (pcm[PLAYBACK]) // device busy (playing) + return; + listener = new tAlsaAudioListener(this, spl, fr_smpl, to_smpl); } long tAlsaAudioPlayer::GetListenerPlayPosition() { - if (!listener) - return -1L; - return listener->GetPlayPosition(); + if (!listener) + return -1L; + return listener->GetPlayPosition(); } Modified: trunk/jazz/src/JazzPlusPlusApplication.cpp =================================================================== --- trunk/jazz/src/JazzPlusPlusApplication.cpp 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/src/JazzPlusPlusApplication.cpp 2008-04-05 01:35:12 UTC (rev 394) @@ -47,6 +47,10 @@ #endif +#include <iostream> + +using namespace std; + //***************************************************************************** // Description: // This is the JazzPlusPlus application class definition. @@ -104,6 +108,7 @@ //----------------------------------------------------------------------------- JZJazzPlusPlusApplication::~JZJazzPlusPlusApplication() { + cout << "In the application desstructor" << endl; } //----------------------------------------------------------------------------- @@ -167,6 +172,7 @@ // Prevent reported leaks from the configuration class. delete wxConfigBase::Set(0); + cout << "Done in OnExit" << endl; return 0; } Modified: trunk/jazz/src/Project.cpp =================================================================== --- trunk/jazz/src/Project.cpp 2008-04-05 01:30:50 UTC (rev 393) +++ trunk/jazz/src/Project.cpp 2008-04-05 01:35:12 UTC (rev 394) @@ -325,6 +325,7 @@ delete mpSynth; delete mpRecInfo; delete mpConfig; + cout << "Done Deleting the project." << endl; } //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |