diff -ruN TiMidity++-2.9.5/AUTHORS TiMidity++-2.10.0/AUTHORS --- TiMidity++-2.9.5/AUTHORS Wed Feb 16 01:56:18 2000 +++ TiMidity++-2.10.0/AUTHORS Fri Jul 14 20:53:28 2000 @@ -1,7 +1,7 @@ Version 0.2i and earlier: Tuukka Toivonen Vincent Pagel - Takashi Iwai + Takashi Iwai Davide Moretti Chi Ming HUNG Riccardo Facchetti diff -ruN TiMidity++-2.9.5/ChangeLog TiMidity++-2.10.0/ChangeLog --- TiMidity++-2.9.5/ChangeLog Wed Jul 5 23:04:16 2000 +++ TiMidity++-2.10.0/ChangeLog Wed Aug 9 16:53:57 2000 @@ -1,3 +1,58 @@ +2000-08-09 Masanao Izumo + + * Version 2.10.0 released. + +2000-08-08 Masanao Izumo + + * interface/{w32g_ini.c,w32g_utl.c,w32g_utl.h},timidity/w32g_a.c: + Change data_block_time to data_block_bits. + +2000-07-24 Masanao Izumo + + * timidity/wave_a.c: Enable to write each separated wav file if `-o' + command line option is omitted. + The output filename is automatically generated from the input MIDI + filename. The file extention is changed to ".wav". + * timidity/au_a.c: Likewise. + * timidity/aiff_a.c: Likewise. + * timidity/raw_a.c: Likewise. + +2000-07-21/2000-07-24 Takashi SHIRAI + + * timidity/oss_a.c: Bug fixed for the calculation of the counter. + +2000-07-20 Masanao Izumo + + * configure: Added new options. + --with-includes=DIRS + Specify include directories (colon separated) + --with-libraries=DIRS + Specify library directories (colon separated) + * configure: Check and -lvorbis + * vorbis_a.c: Supported Ogg Vorbis output: -Ov + This feature is enabled if TiMidity is configured with + --enabel-audio=default,vorbis option. + +2000-07-18 Takashi Iwai + + * interface/alsaseq_c.c: Enabled OSS emulation. + +2000-07-15 Takashi Iwai + + * interface/alsaseq_c.c: Added new interface: + TiMidity as ALSA sequencer client. This interface enabled if + the timidity is configured with --enable-alsaseq. + +2000-07-15 Masanao Izumo + + * option -Bn,m sets audio buffer fragments as n, and audio buffer size + as 2^n. Specify -1 for default. + + * timidity/{playmidi.c,playmidi.h}: audio_buffer_bits and audio_buffer_size + are parameter. + + * timidity/aq.c: Modified. + 2000-07-05 Masanao Izumo * Version 2.9.5 released. diff -ruN TiMidity++-2.9.5/INSTALL TiMidity++-2.10.0/INSTALL --- TiMidity++-2.9.5/INSTALL Wed Apr 12 12:54:14 2000 +++ TiMidity++-2.10.0/INSTALL Sat Jul 15 00:48:33 2000 @@ -172,6 +172,9 @@ --enable-w32gui Build TiMidity++ as Windows GUI. + --enable-alsaseq + Build TiMidity++ as ALSA sequencer client. + --enable-network This option allows TiMidity++ to play MIDI file getting via network. You can specify the location of MIDI files by diff -ruN TiMidity++-2.9.5/NEWS TiMidity++-2.10.0/NEWS --- TiMidity++-2.9.5/NEWS Wed Jul 5 23:04:13 2000 +++ TiMidity++-2.10.0/NEWS Wed Aug 9 16:54:02 2000 @@ -1,3 +1,16 @@ +08/09, 2000 + * Enable to write each separated wav file if `-o' + command line option is omitted. + The output filename is automatically generated from the input MIDI + filename. The file extention is changed to ".wav". + * configure: Added new options. + --with-includes=DIRS + Specify include directories (colon separated) + --with-libraries=DIRS + Specify library directories (colon separated) + * Ogg Vorbis output. + * ALSA MIDI sequencer client. + 07/05, 2000 * Version 2.9.5 released. * Upgrade Windows version. diff -ruN TiMidity++-2.9.5/config.h.in TiMidity++-2.10.0/config.h.in --- TiMidity++-2.9.5/config.h.in Wed Sep 1 01:32:23 1999 +++ TiMidity++-2.10.0/config.h.in Thu Jul 20 23:15:45 2000 @@ -173,9 +173,15 @@ /* Define if you have the header file. */ #undef HAVE_SUN_AUDIOIO_H +/* Define if you have the header file. */ +#undef HAVE_SYS_ASOUNDLIB_H + /* Define if you have the header file. */ #undef HAVE_SYS_AUDIOIO_H +/* Define if you have the header file. */ +#undef HAVE_SYS_AWE_VOICE_H + /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H @@ -220,3 +226,6 @@ /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET + +/* Define if you have the vorbis library (-lvorbis). */ +#undef HAVE_LIBVORBIS diff -ruN TiMidity++-2.9.5/configs/msc-config.h TiMidity++-2.10.0/configs/msc-config.h --- TiMidity++-2.9.5/configs/msc-config.h Wed Jul 5 23:04:59 2000 +++ TiMidity++-2.10.0/configs/msc-config.h Wed Aug 9 16:54:16 2000 @@ -261,7 +261,7 @@ /* In VDS Macro AAA=BBB is not available. */ #define __W32__ -#define TIMID_VERSION "2.9.5" +#define TIMID_VERSION "2.10.0" #define DEFAULT_PATH ".\\" #define AU_W32 #define WINSOCK diff -ruN TiMidity++-2.9.5/configure TiMidity++-2.10.0/configure --- TiMidity++-2.9.5/configure Tue Jul 4 17:32:26 2000 +++ TiMidity++-2.10.0/configure Tue Aug 8 10:49:22 2000 @@ -14,6 +14,10 @@ ac_help="$ac_help --enable-debug Build a debugging version." ac_help="$ac_help + --with-includes=DIR Specify include directories (colon separated)" +ac_help="$ac_help + --with-libraries=DIR Specify library directories (colon separated)" +ac_help="$ac_help --with-elf create ELF shared object instead of AOUT " ac_help="$ac_help --with-x use the X Window System" @@ -46,10 +50,11 @@ alsa: ALSA pcm device alib: HPUX network audio (Alib) nas: NAS - Network Audio System - esd: EsounD" + esd: EsounD + vorbis: Ogg Vorbis" ac_help="$ac_help --with-default-output= Specify default output mode (optional): - default|alsa|alib|nas|esd|wav|au|aiff|list" + default|alsa|alib|nas|esd|wav|au|aiff|list|vorbis" ac_help="$ac_help --enable-esd EsounD (Obsoleted. Use --enable-audio=esd)" ac_help="$ac_help @@ -98,12 +103,14 @@ ac_help="$ac_help --disable-gtktest Do not try to compile and run a test GTK program" ac_help="$ac_help + --enable-server Enable server interface (default is no)" +ac_help="$ac_help + --enable-alsaseq Enable ALSA sequencer server interface (default is no)" +ac_help="$ac_help --enable-w32gui Enable Windows GUI interface (default is no)" ac_help="$ac_help --enable-ump UMP configuration (default is no)" ac_help="$ac_help - --enable-server Enable server interface (default is no)" -ac_help="$ac_help --enable-offix Enable offix support (default is no)" ac_help="$ac_help --enable-network Enable network support (default is no)" @@ -672,7 +679,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:676: checking host system type" >&5 +echo "configure:683: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -693,7 +700,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:697: checking target system type" >&5 +echo "configure:704: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -711,7 +718,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:715: checking build system type" >&5 +echo "configure:722: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -745,7 +752,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:749: checking for a BSD compatible install" >&5 +echo "configure:756: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -798,7 +805,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:802: checking whether build environment is sane" >&5 +echo "configure:809: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -855,7 +862,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:859: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:866: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -884,7 +891,7 @@ PACKAGE=TiMidity++ -VERSION=2.9.5 +VERSION=2.10.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -894,7 +901,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:898: checking for working aclocal" >&5 +echo "configure:905: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -907,7 +914,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:911: checking for working autoconf" >&5 +echo "configure:918: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -920,7 +927,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:924: checking for working automake" >&5 +echo "configure:931: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -933,7 +940,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:937: checking for working autoheader" >&5 +echo "configure:944: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -946,7 +953,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:950: checking for working makeinfo" >&5 +echo "configure:957: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -961,7 +968,7 @@ echo $ac_n "checking whether grep returns status""... $ac_c" 1>&6 -echo "configure:965: checking whether grep returns status" >&5 +echo "configure:972: checking whether grep returns status" >&5 echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then contains="./contains" @@ -996,7 +1003,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1000: checking for $ac_word" >&5 +echo "configure:1007: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1034,7 +1041,7 @@ if test $EMACS != "no"; then echo $ac_n "checking where .elc files should go""... $ac_c" 1>&6 -echo "configure:1038: checking where .elc files should go" >&5 +echo "configure:1045: checking where .elc files should go" >&5 lispdir="\$(datadir)/emacs/site-lisp" emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'` if test "x$prefix" = "xNONE"; then @@ -1116,11 +1123,34 @@ CPPFLAGS="-I$prefix/include $CPPFLAGS" fi +# Check whether --with-includes or --without-includes was given. +if test "${with_includes+set}" = set; then + withval="$with_includes" + j=' ' + for i in `echo "$withval"|sed -e 's,:, ,g'`; do + j="${j}-I${i} " + done + CPPFLAGS="$j$CPPFLAGS" + +fi + + +# Check whether --with-libraries or --without-libraries was given. +if test "${with_libraries+set}" = set; then + withval="$with_libraries" + j=' ' + for i in `echo "$withval"|sed -e 's,:, ,g'`; do + j="${j}-L${i} " + done + LDFLAGS="$j$LDFLAGS" + +fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1124: checking for $ac_word" >&5 +echo "configure:1154: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1150,7 +1180,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1154: checking for $ac_word" >&5 +echo "configure:1184: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1201,7 +1231,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1205: checking for $ac_word" >&5 +echo "configure:1235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1233,7 +1263,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1237: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1267: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1244,12 +1274,12 @@ cat > conftest.$ac_ext << EOF -#line 1248 "configure" +#line 1278 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1275,12 +1305,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1279: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1309: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1284: checking whether we are using GNU C" >&5 +echo "configure:1314: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1289,7 +1319,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1308,7 +1338,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1312: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1342: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1351,7 +1381,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1355: checking for a BSD compatible install" >&5 +echo "configure:1385: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1406,7 +1436,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1410: checking for $ac_word" >&5 +echo "configure:1440: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1434,7 +1464,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1438: checking whether ln -s works" >&5 +echo "configure:1468: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1455,7 +1485,7 @@ fi echo $ac_n "checking whether -rdynamic option is recognized""... $ac_c" 1>&6 -echo "configure:1459: checking whether -rdynamic option is recognized" >&5 +echo "configure:1489: checking whether -rdynamic option is recognized" >&5 ac_ccoption=`echo rdynamic | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'timidity_cv_ccoption_$ac_ccoption'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1572,7 +1602,7 @@ echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6 -echo "configure:1576: checking for sqrt in -lm" >&5 +echo "configure:1606: checking for sqrt in -lm" >&5 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1580,7 +1610,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1619,7 +1649,7 @@ fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1623: checking for socket in -lsocket" >&5 +echo "configure:1653: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1627,7 +1657,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1666,7 +1696,7 @@ fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1670: checking for dlopen in -ldl" >&5 +echo "configure:1700: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1674,7 +1704,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1708,12 +1738,12 @@ for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1712: checking for $ac_func" >&5 +echo "configure:1742: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1758,7 +1788,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1762: checking for gethostbyname in -lnsl" >&5 +echo "configure:1792: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1766,7 +1796,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1808,7 +1838,7 @@ done echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1812: checking how to run the C preprocessor" >&5 +echo "configure:1842: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1823,13 +1853,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1840,13 +1870,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1857,13 +1887,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1892,7 +1922,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1896: checking for X" >&5 +echo "configure:1926: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1954,12 +1984,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2028,14 +2058,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2141,17 +2171,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2145: checking whether -R must be followed by a space" >&5 +echo "configure:2175: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2167,14 +2197,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2206,7 +2236,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2210: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2240: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2214,7 +2244,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2247,7 +2277,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2251: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2281: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2255,7 +2285,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2295,12 +2325,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2299: checking for gethostbyname" >&5 +echo "configure:2329: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2344,7 +2374,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2348: checking for gethostbyname in -lnsl" >&5 +echo "configure:2378: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2352,7 +2382,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2393,12 +2423,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2397: checking for connect" >&5 +echo "configure:2427: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2442,7 +2472,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2446: checking for connect in -lsocket" >&5 +echo "configure:2476: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2450,7 +2480,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2485,12 +2515,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2489: checking for remove" >&5 +echo "configure:2519: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2534,7 +2564,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2538: checking for remove in -lposix" >&5 +echo "configure:2568: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2542,7 +2572,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2577,12 +2607,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2581: checking for shmat" >&5 +echo "configure:2611: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2626,7 +2656,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2630: checking for shmat in -lipc" >&5 +echo "configure:2660: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2634,7 +2664,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2678,7 +2708,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2682: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2712: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2686,7 +2716,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2745,7 +2775,7 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:2749: checking for XOpenDisplay in -lX11" >&5 +echo "configure:2779: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2753,7 +2783,7 @@ ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2792,12 +2822,12 @@ fi echo $ac_n "checking X11 version 6""... $ac_c" 1>&6 -echo "configure:2796: checking X11 version 6" >&5 +echo "configure:2826: checking X11 version 6" >&5 if eval "test \"`echo '$''{'timidity_cv_x11_version_6'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -2807,7 +2837,7 @@ ; return 0; } EOF -if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* timidity_cv_x11_version_6=yes else @@ -2827,7 +2857,7 @@ KEEPLIBS=$LIBS echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6 -echo "configure:2831: checking for XShapeCombineMask in -lXext" >&5 +echo "configure:2861: checking for XShapeCombineMask in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeCombineMask | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2835,7 +2865,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXext $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2868,7 +2898,7 @@ fi echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2872: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2902: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2876,7 +2906,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2915,7 +2945,7 @@ fi echo $ac_n "checking for SmcOpenConnection in -lSM""... $ac_c" 1>&6 -echo "configure:2919: checking for SmcOpenConnection in -lSM" >&5 +echo "configure:2949: checking for SmcOpenConnection in -lSM" >&5 ac_lib_var=`echo SM'_'SmcOpenConnection | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2923,7 +2953,7 @@ ac_save_LIBS="$LIBS" LIBS="-lSM $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2956,7 +2986,7 @@ fi echo $ac_n "checking for XtVaAppInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:2960: checking for XtVaAppInitialize in -lXt" >&5 +echo "configure:2990: checking for XtVaAppInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtVaAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2964,7 +2994,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2997,7 +3027,7 @@ fi echo $ac_n "checking for XmuInternAtom in -lXmu""... $ac_c" 1>&6 -echo "configure:3001: checking for XmuInternAtom in -lXmu" >&5 +echo "configure:3031: checking for XmuInternAtom in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuInternAtom | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3005,7 +3035,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXmu $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3039,12 +3069,12 @@ for ac_func in XmuRegisterExternalAgent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3043: checking for $ac_func" >&5 +echo "configure:3073: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3092,7 +3122,7 @@ done echo $ac_n "checking for XawInitializeWidgetSet in -lXaw3d""... $ac_c" 1>&6 -echo "configure:3096: checking for XawInitializeWidgetSet in -lXaw3d" >&5 +echo "configure:3126: checking for XawInitializeWidgetSet in -lXaw3d" >&5 ac_lib_var=`echo Xaw3d'_'XawInitializeWidgetSet | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3100,7 +3130,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXaw3d $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3130,7 +3160,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for XawInitializeWidgetSet in -lXaw""... $ac_c" 1>&6 -echo "configure:3134: checking for XawInitializeWidgetSet in -lXaw" >&5 +echo "configure:3164: checking for XawInitializeWidgetSet in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawInitializeWidgetSet | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3138,7 +3168,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXaw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3173,7 +3203,7 @@ fi echo $ac_n "checking for XmCreateForm in -lXm""... $ac_c" 1>&6 -echo "configure:3177: checking for XmCreateForm in -lXm" >&5 +echo "configure:3207: checking for XmCreateForm in -lXm" >&5 ac_lib_var=`echo Xm'_'XmCreateForm | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3181,7 +3211,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3216,12 +3246,12 @@ for ac_func in XShmCreatePixmap do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3220: checking for $ac_func" >&5 +echo "configure:3250: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3277,12 +3307,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3281: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3311: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3290,7 +3320,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3315,7 +3345,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3319: checking for opendir in -ldir" >&5 +echo "configure:3349: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3323,7 +3353,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3356,7 +3386,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3360: checking for opendir in -lx" >&5 +echo "configure:3390: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3364,7 +3394,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3398,12 +3428,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3402: checking for ANSI C header files" >&5 +echo "configure:3432: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3411,7 +3441,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3428,7 +3458,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3446,7 +3476,7 @@ 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 < EOF @@ -3467,7 +3497,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3478,7 +3508,7 @@ exit (0); } EOF -if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3502,12 +3532,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3506: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3536: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3523,7 +3553,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3547,21 +3577,21 @@ unistd.h dlfcn.h glob.h getopt.h errno.h machine/endian.h \ stropts.h sys/audioio.h sun/audioio.h sys/types.h \ sys/ipc.h sys/shm.h sys/param.h X11/extensions/XShm.h \ - X11/Xmu/ExtAgent.h sys/soundcard.h + X11/Xmu/ExtAgent.h sys/soundcard.h sys/awe_voice.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3555: checking for $ac_hdr" >&5 +echo "configure:3585: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3589,17 +3619,17 @@ ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:3593: checking for string.h" >&5 +echo "configure:3623: checking for string.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3623,12 +3653,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3627: checking for working const" >&5 +echo "configure:3657: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3698,14 +3728,14 @@ fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3702: checking whether char is unsigned" >&5 +echo "configure:3732: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3761,14 +3791,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3765: checking whether byte ordering is bigendian" >&5 +echo "configure:3795: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3779,11 +3809,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3794,7 +3824,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3814,7 +3844,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3851,21 +3881,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3855: checking for inline" >&5 +echo "configure:3885: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3891,12 +3921,12 @@ esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3895: checking for off_t" >&5 +echo "configure:3925: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3924,12 +3954,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3928: checking for pid_t" >&5 +echo "configure:3958: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3957,12 +3987,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3961: checking for size_t" >&5 +echo "configure:3991: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3990,12 +4020,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3994: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4024: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4004,7 +4034,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4026,19 +4056,19 @@ echo $ac_n "checking volatile declaration""... $ac_c" 1>&6 -echo "configure:4030: checking volatile declaration" >&5 +echo "configure:4060: checking volatile declaration" >&5 if eval "test \"`echo '$''{'timidity_cv_type_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* timidity_cv_type_volatile=yes else @@ -4056,12 +4086,12 @@ fi echo $ac_n "checking union semun declaration""... $ac_c" 1>&6 -echo "configure:4060: checking union semun declaration" >&5 +echo "configure:4090: checking union semun declaration" >&5 if eval "test \"`echo '$''{'timidity_cv_type_union_semun'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4070,7 +4100,7 @@ union semun x ; return 0; } EOF -if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* timidity_cv_type_union_semun=yes else @@ -4089,13 +4119,13 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:4093: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4123: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -4113,7 +4143,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -4135,7 +4165,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4139: checking for 8-bit clean memcmp" >&5 +echo "configure:4169: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4143,7 +4173,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4174,17 +4204,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4178: checking for $ac_hdr" >&5 +echo "configure:4208: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4213,12 +4243,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4217: checking for $ac_func" >&5 +echo "configure:4247: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4266,7 +4296,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4270: checking for working mmap" >&5 +echo "configure:4300: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4274,7 +4304,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4437,7 +4467,7 @@ fi echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 -echo "configure:4441: checking whether setvbuf arguments are reversed" >&5 +echo "configure:4471: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4445,7 +4475,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ @@ -4459,7 +4489,7 @@ exit(0); /* Non-reversed systems segv here. */ } EOF -if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setvbuf_reversed=yes else @@ -4483,12 +4513,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4487: checking return type of signal handlers" >&5 +echo "configure:4517: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4505,7 +4535,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4524,12 +4554,12 @@ echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4528: checking for vprintf" >&5 +echo "configure:4558: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4576,12 +4606,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4580: checking for _doprnt" >&5 +echo "configure:4610: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4632,12 +4662,12 @@ sleep usleep strncasecmp strerror getopt getcwd popen signal isatty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4636: checking for $ac_func" >&5 +echo "configure:4666: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4689,12 +4719,12 @@ case "$ac_cv_header_dirent_dirent_h$ac_cv_header_dirent_sys_ndir_h$ac_cv_header_dirent_sys_dir_h$ac_cv_header_dirent_ndir_h" in *yes*) echo $ac_n "checking for opendir""... $ac_c" 1>&6 -echo "configure:4693: checking for opendir" >&5 +echo "configure:4723: checking for opendir" >&5 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_opendir=yes" else @@ -4745,12 +4775,12 @@ esac if test "x$enable_network" = "xyes"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:4749: checking for socket" >&5 +echo "configure:4779: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -4791,7 +4821,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for WSAStartup in -lwsock32""... $ac_c" 1>&6 -echo "configure:4795: checking for WSAStartup in -lwsock32" >&5 +echo "configure:4825: checking for WSAStartup in -lwsock32" >&5 ac_lib_var=`echo wsock32'_'WSAStartup | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'wapi_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4799,7 +4829,7 @@ ac_save_LIBS="$LIBS" LIBS="-lwsock32 $LIBS" cat > conftest.$ac_ext < #include @@ -4808,7 +4838,7 @@ WSAStartup(0,0); ; return 0; } EOF -if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "wapi_cv_lib_$ac_lib_var=yes" else @@ -4894,7 +4924,7 @@ -audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd' +audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd vorbis' # Check whether --with-nas-library or --without-nas-library was given. if test "${with_nas_library+set}" = set; then @@ -5000,7 +5030,7 @@ fi echo $ac_n "checking enable_audio=oss""... $ac_c" 1>&6 -echo "configure:5004: checking enable_audio=oss" >&5 +echo "configure:5034: checking enable_audio=oss" >&5 if test "x$au_enable_oss" = xyes; then EXTRADEFS="$EXTRADEFS -DAU_OSS" SYSEXTRAS="$SYSEXTRAS oss_a.c" @@ -5021,7 +5051,7 @@ fi echo $ac_n "checking enable_audio=sun""... $ac_c" 1>&6 -echo "configure:5025: checking enable_audio=sun" >&5 +echo "configure:5055: checking enable_audio=sun" >&5 if test "x$au_enable_sun" = xyes; then case "$target" in *-*-sunos4*) @@ -5050,7 +5080,7 @@ fi echo $ac_n "checking enable_audio=hpux""... $ac_c" 1>&6 -echo "configure:5054: checking enable_audio=hpux" >&5 +echo "configure:5084: checking enable_audio=hpux" >&5 if test "x$au_enable_hpux" = xyes; then case "$target" in *-*-hpux*) echo "$ac_t""yes" 1>&6 ;; @@ -5063,7 +5093,7 @@ fi echo $ac_n "checking enable_audio=irix""... $ac_c" 1>&6 -echo "configure:5067: checking enable_audio=irix" >&5 +echo "configure:5097: checking enable_audio=irix" >&5 if test "x$au_enable_irix" = xyes; then case "$target" in *-sgi-irix5*|*-sgi-irix6.2) @@ -5083,7 +5113,7 @@ fi echo $ac_n "checking enable_audio=mme""... $ac_c" 1>&6 -echo "configure:5087: checking enable_audio=mme" >&5 +echo "configure:5117: checking enable_audio=mme" >&5 if test "x$au_enable_mme" = xyes; then case "$target" in *-dec-*) echo "$ac_t""yes" 1>&6 ;; @@ -5098,7 +5128,7 @@ fi echo $ac_n "checking enable_audio=sb_dsp""... $ac_c" 1>&6 -echo "configure:5102: checking enable_audio=sb_dsp" >&5 +echo "configure:5132: checking enable_audio=sb_dsp" >&5 if test "x$au_enable_sb_dsp" = xyes; then case "$target" in *-*-bsdi2.0) echo "$ac_t""yes" 1>&6 ;; @@ -5111,7 +5141,7 @@ fi echo $ac_n "checking enable_audio=w32""... $ac_c" 1>&6 -echo "configure:5115: checking enable_audio=w32" >&5 +echo "configure:5145: checking enable_audio=w32" >&5 if test "x$au_enable_w32" = xyes; then case "$target" in *-*-cygwin*) @@ -5134,7 +5164,7 @@ fi echo $ac_n "checking enable_audio=alsa""... $ac_c" 1>&6 -echo "configure:5138: checking enable_audio=alsa" >&5 +echo "configure:5168: checking enable_audio=alsa" >&5 if test "x$au_enable_alsa" = xyes; then echo "$ac_t""" 1>&6 KEEPCFLAGS=$CFLAGS @@ -5167,7 +5197,7 @@ echo $ac_n "checking for ALSA CFLAGS""... $ac_c" 1>&6 -echo "configure:5171: checking for ALSA CFLAGS" >&5 +echo "configure:5201: checking for ALSA CFLAGS" >&5 if test "$alsa_inc_prefix" != "" ; then ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix" CFLAGS="$CFLAGS -I$alsa_inc_prefix" @@ -5175,7 +5205,7 @@ echo "$ac_t""$ALSA_CFLAGS" 1>&6 echo $ac_n "checking for ALSA LDFLAGS""... $ac_c" 1>&6 -echo "configure:5179: checking for ALSA LDFLAGS" >&5 +echo "configure:5209: checking for ALSA LDFLAGS" >&5 if test "$alsa_prefix" != "" ; then ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix" LIBS="-L$alsa_prefix" @@ -5187,7 +5217,7 @@ min_alsa_version=0.1.1 echo $ac_n "checking for libasound headers version >= $min_alsa_version""... $ac_c" 1>&6 -echo "configure:5191: checking for libasound headers version >= $min_alsa_version" >&5 +echo "configure:5221: checking for libasound headers version >= $min_alsa_version" >&5 no_alsa="" alsa_min_major_version=`echo $min_alsa_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` @@ -5197,7 +5227,7 @@ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` cat > conftest.$ac_ext < @@ -5238,7 +5268,7 @@ ; return 0; } EOF -if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found." 1>&6 have_alsa=yes @@ -5252,7 +5282,7 @@ rm -f conftest* echo $ac_n "checking for snd_cards in -lasound""... $ac_c" 1>&6 -echo "configure:5256: checking for snd_cards in -lasound" >&5 +echo "configure:5286: checking for snd_cards in -lasound" >&5 ac_lib_var=`echo asound'_'snd_cards | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5260,7 +5290,7 @@ ac_save_LIBS="$LIBS" LIBS="-lasound $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5327,7 +5357,7 @@ fi echo $ac_n "checking enable_audio=alib""... $ac_c" 1>&6 -echo "configure:5331: checking enable_audio=alib" >&5 +echo "configure:5361: checking enable_audio=alib" >&5 if test "x$au_enable_alib" = xyes; then case "$target" in *-*-hpux*) echo "$ac_t""yes" 1>&6 ;; @@ -5347,7 +5377,7 @@ fi echo $ac_n "checking enable_audio=nas""... $ac_c" 1>&6 -echo "configure:5351: checking enable_audio=nas" >&5 +echo "configure:5381: checking enable_audio=nas" >&5 if test "x$au_enable_nas" = xyes; then if test "x$with_x" != xyes; then { echo "configure: error: nas: --with-x option must be specified" 1>&2; exit 1; } @@ -5362,7 +5392,7 @@ else echo "$ac_t""" 1>&6 echo $ac_n "checking for library containing AuOpenServer""... $ac_c" 1>&6 -echo "configure:5366: checking for library containing AuOpenServer" >&5 +echo "configure:5396: checking for library containing AuOpenServer" >&5 if eval "test \"`echo '$''{'timidity_cv_search_AuOpenServer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5373,7 +5403,7 @@ /usr/lib/libaudio.a ; do LIBS="$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* timidity_cv_search_AuOpenServer="$i"; break else @@ -5417,7 +5447,7 @@ fi echo $ac_n "checking enable_audio=esd""... $ac_c" 1>&6 -echo "configure:5421: checking enable_audio=esd" >&5 +echo "configure:5451: checking enable_audio=esd" >&5 if test "x$au_enable_esd" = xyes; then echo "$ac_t""" 1>&6 KEEPCFLAGS=$CFLAGS @@ -5464,7 +5494,7 @@ # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5468: checking for $ac_word" >&5 +echo "configure:5498: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5499,7 +5529,7 @@ min_esd_version=0.2.7 echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6 -echo "configure:5503: checking for ESD - version >= $min_esd_version" >&5 +echo "configure:5533: checking for ESD - version >= $min_esd_version" >&5 no_esd="" if test "$ESD_CONFIG" = "no" ; then no_esd=yes @@ -5523,7 +5553,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5581,7 +5611,7 @@ EOF -if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5615,7 +5645,7 @@ CFLAGS="$CFLAGS $ESD_CFLAGS" LIBS="$LIBS $ESD_LIBS" cat > conftest.$ac_ext < @@ -5625,7 +5655,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding ESD or finding the wrong" @@ -5680,6 +5710,106 @@ echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking enable_audio=vorbis""... $ac_c" 1>&6 +echo "configure:5715: checking enable_audio=vorbis" >&5 +if test "x$au_enable_vorbis" = xyes; then + echo "$ac_t""" 1>&6 + have_vorbis=yes + ac_safe=`echo "vorbis/modes.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for vorbis/modes.h""... $ac_c" 1>&6 +echo "configure:5721: checking for vorbis/modes.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +have_vorbis=no +fi + + echo $ac_n "checking for vorbis_analysis_init in -lvorbis""... $ac_c" 1>&6 +echo "configure:5754: checking for vorbis_analysis_init in -lvorbis" >&5 +ac_lib_var=`echo vorbis'_'vorbis_analysis_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lvorbis $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo vorbis | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +have_vorbis=no +fi + + if test "$have_vorbis" = "yes"; then + SYSEXTRAS="$SYSEXTRAS vorbis_a.c" + EXTRADEFS="$EXTRADEFS -DAU_VORBIS" + EXTRALIBS="$EXTRALIBS -lvorbis" + echo "$ac_t""Ogg Vorbis: Enabled" 1>&6 + else + echo "configure: warning: Ogg Vorbis: Couldn't configure" 1>&2 + fi +else + echo "$ac_t""no" 1>&6 +fi + + if test "x$au_enable_none" = xyes; then EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c" @@ -5687,7 +5817,7 @@ echo $ac_n "checking default output mode""... $ac_c" 1>&6 -echo "configure:5691: checking default output mode" >&5 +echo "configure:5821: checking default output mode" >&5 if test "x$DEFAULT_PLAYMODE" = x; then DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'` fi @@ -5708,6 +5838,7 @@ .au) TIMIDITY_OUTPUT_ID=u ;; .aiff) TIMIDITY_OUTPUT_ID=a ;; .list) TIMIDITY_OUTPUT_ID=l ;; + .vorbis) TIMIDITY_OUTPUT_ID=v ;; *) TIMIDITY_OUTPUT_ID= ;; esac echo "$ac_t""$DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID" 1>&6 @@ -5715,7 +5846,7 @@ -interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk' +interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq' # Check whether --enable-interface or --disable-interface was given. if test "${enable_interface+set}" = set; then @@ -5756,12 +5887,12 @@ have_dl=no echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6 -echo "configure:5760: checking for LoadLibrary" >&5 +echo "configure:5891: checking for LoadLibrary" >&5 if eval "test \"`echo '$''{'wapi_cv_func_LoadLibrary'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5770,7 +5901,7 @@ LoadLibrary(0); ; return 0; } EOF -if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wapi_cv_func_LoadLibrary=yes else @@ -5793,12 +5924,12 @@ if test "$have_dl" = "no"; then echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "configure:5797: checking for shl_load" >&5 +echo "configure:5928: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else @@ -5846,12 +5977,12 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:5850: checking for dlopen" >&5 +echo "configure:5981: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -5896,12 +6027,12 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dld_init""... $ac_c" 1>&6 -echo "configure:5900: checking for dld_init" >&5 +echo "configure:6031: checking for dld_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_dld_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dld_init=yes" else @@ -5946,7 +6077,7 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:5950: checking for dld_init in -ldld" >&5 +echo "configure:6081: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5954,7 +6085,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5988,13 +6119,13 @@ fi echo $ac_n "checking dynamic link method""... $ac_c" 1>&6 -echo "configure:5992: checking dynamic link method" >&5 +echo "configure:6123: checking dynamic link method" >&5 case "$have_dl" in dlopen) echo "$ac_t""use dl_dlopen.c" 1>&6 SYSEXTRAS="$SYSEXTRAS dl_dlopen.c" echo $ac_n "checking whether your dlsym() needs a leading underscore""... $ac_c" 1>&6 -echo "configure:5998: checking whether your dlsym() needs a leading underscore" >&5 +echo "configure:6129: checking whether your dlsym() needs a leading underscore" >&5 if eval "test \"`echo '$''{'timidity_cv_func_dlsym_underscore'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6142,17 +6273,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6146: checking for $ac_hdr" >&5 +echo "configure:6277: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6193,7 +6324,7 @@ esac echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:6197: checking for initscr in -lncurses" >&5 +echo "configure:6328: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6201,7 +6332,7 @@ ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6231,7 +6362,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for PDC_set_ctrl_break in -lcurses""... $ac_c" 1>&6 -echo "configure:6235: checking for PDC_set_ctrl_break in -lcurses" >&5 +echo "configure:6366: checking for PDC_set_ctrl_break in -lcurses" >&5 ac_lib_var=`echo curses'_'PDC_set_ctrl_break | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6239,7 +6370,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcurses $lib_user32_test $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6272,7 +6403,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for PDC_set_ctrl_break in -lpdcurses""... $ac_c" 1>&6 -echo "configure:6276: checking for PDC_set_ctrl_break in -lpdcurses" >&5 +echo "configure:6407: checking for PDC_set_ctrl_break in -lpdcurses" >&5 ac_lib_var=`echo pdcurses'_'PDC_set_ctrl_break | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6280,7 +6411,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpdcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6381,7 +6512,7 @@ if test "${enable_slang+set}" = set; then enableval="$enable_slang" case "x$enable_slang" in xyes|xdynamic) echo $ac_n "checking for SLang_init_tty in -lslang""... $ac_c" 1>&6 -echo "configure:6385: checking for SLang_init_tty in -lslang" >&5 +echo "configure:6516: checking for SLang_init_tty in -lslang" >&5 ac_lib_var=`echo slang'_'SLang_init_tty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6389,7 +6520,7 @@ ac_save_LIBS="$LIBS" LIBS="-lslang $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6426,17 +6557,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6430: checking for $ac_hdr" >&5 +echo "configure:6561: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6488,7 +6619,7 @@ dynamic_targets="$dynamic_targets interface_s.\$(so)" s_so_libs="-lslang" echo $ac_n "checking for initscr in -ltermcap""... $ac_c" 1>&6 -echo "configure:6492: checking for initscr in -ltermcap" >&5 +echo "configure:6623: checking for initscr in -ltermcap" >&5 ac_lib_var=`echo termcap'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6496,7 +6627,7 @@ ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6627,7 +6758,7 @@ tk_lib= for l in tcl tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do case "x$tcl_lib" in x) echo $ac_n "checking for Tcl_Init in -l$l""... $ac_c" 1>&6 -echo "configure:6631: checking for Tcl_Init in -l$l" >&5 +echo "configure:6762: checking for Tcl_Init in -l$l" >&5 ac_lib_var=`echo $l'_'Tcl_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6635,7 +6766,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$l $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6670,7 +6801,7 @@ LIBS="$LIBS $tcl_lib" for l in tk tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do case "x$tk_lib" in x) echo $ac_n "checking for Tk_Init in -l$l""... $ac_c" 1>&6 -echo "configure:6674: checking for Tk_Init in -l$l" >&5 +echo "configure:6805: checking for Tk_Init in -l$l" >&5 ac_lib_var=`echo $l'_'Tk_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6678,7 +6809,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$l $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7053,7 +7184,7 @@ # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7057: checking for $ac_word" >&5 +echo "configure:7188: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7088,7 +7219,7 @@ min_gtk_version=1.1.3 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:7092: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:7223: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -7111,7 +7242,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7177,7 +7308,7 @@ } EOF -if { (eval echo configure:7181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7211,7 +7342,7 @@ CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -7221,7 +7352,7 @@ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -7318,6 +7449,176 @@ if false; then + ENABLE_SERVER_TRUE= + ENABLE_SERVER_FALSE='#' +else + ENABLE_SERVER_TRUE='#' + ENABLE_SERVER_FALSE= +fi +# Check whether --enable-server or --disable-server was given. +if test "${enable_server+set}" = set; then + enableval="$enable_server" + case "x$enable_server" in xyes|xdynamic) ;; esac +fi + +case "x$enable_server" in +xyes) + cat >> confdefs.h <&6 +echo "configure:7485: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + ;; +xdynamic) + dynamic_targets="$dynamic_targets interface_r.\$(so)" + + ;; +*) + + ;; +esac + + + + + + +if false; then + ENABLE_ALSASEQ_TRUE= + ENABLE_ALSASEQ_FALSE='#' +else + ENABLE_ALSASEQ_TRUE='#' + ENABLE_ALSASEQ_FALSE= +fi +# Check whether --enable-alsaseq or --disable-alsaseq was given. +if test "${enable_alsaseq+set}" = set; then + enableval="$enable_alsaseq" + case "x$enable_alsaseq" in xyes|xdynamic) ;; esac +fi + +case "x$enable_alsaseq" in +xyes) + cat >> confdefs.h <&6 +echo "configure:7570: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + ;; +xdynamic) + dynamic_targets="$dynamic_targets interface_A.\$(so)" + + ;; +*) + + ;; +esac + + + + + + +if false; then ENABLE_W32GUI_TRUE= ENABLE_W32GUI_FALSE='#' else @@ -7371,17 +7672,17 @@ fi ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:7375: checking for X11/xpm.h" >&5 +echo "configure:7676: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7404,7 +7705,7 @@ fi echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 -echo "configure:7408: checking for XpmCreatePixmapFromData in -lXpm" >&5 +echo "configure:7709: checking for XpmCreatePixmapFromData in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7412,7 +7713,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXpm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7484,91 +7785,6 @@ - - -if false; then - ENABLE_SERVER_TRUE= - ENABLE_SERVER_FALSE='#' -else - ENABLE_SERVER_TRUE='#' - ENABLE_SERVER_FALSE= -fi -# Check whether --enable-server or --disable-server was given. -if test "${enable_server+set}" = set; then - enableval="$enable_server" - case "x$enable_server" in xyes|xdynamic) ;; esac -fi - -case "x$enable_server" in -xyes) - cat >> confdefs.h <&6 -echo "configure:7523: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - - ;; -xdynamic) - dynamic_targets="$dynamic_targets interface_r.\$(so)" - - ;; -*) - - ;; -esac - - - - # Check whether --enable-offix or --disable-offix was given. if test "${enable_offix+set}" = set; then enableval="$enable_offix" @@ -7580,7 +7796,7 @@ LDFLAGS="$LDFLAGS $offix_lib_dir" LIBS="$LIBS $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11" echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6 -echo "configure:7584: checking for DndInitialize in -lDnd" >&5 +echo "configure:7800: checking for DndInitialize in -lDnd" >&5 ac_lib_var=`echo Dnd'_'DndInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7588,7 +7804,7 @@ ac_save_LIBS="$LIBS" LIBS="-lDnd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7706,7 +7922,7 @@ EXTRADEFS="$EXTRADEFS -DWRDT_X" enable_sherry_wrd=yes echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6 -echo "configure:7710: checking for zlibVersion in -lz" >&5 +echo "configure:7926: checking for zlibVersion in -lz" >&5 ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7714,7 +7930,7 @@ ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7748,17 +7964,17 @@ ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7752: checking for png.h" >&5 +echo "configure:7968: checking for png.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7781,7 +7997,7 @@ fi echo $ac_n "checking for png_init_io in -lpng""... $ac_c" 1>&6 -echo "configure:7785: checking for png_init_io in -lpng" >&5 +echo "configure:8001: checking for png_init_io in -lpng" >&5 ac_lib_var=`echo png'_'png_init_io | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7789,7 +8005,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpng -lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8168,15 +8384,18 @@ s%@GTK_CFLAGS@%$GTK_CFLAGS%g s%@GTK_LIBS@%$GTK_LIBS%g s%@g_so_libs@%$g_so_libs%g +s%@ENABLE_SERVER_TRUE@%$ENABLE_SERVER_TRUE%g +s%@ENABLE_SERVER_FALSE@%$ENABLE_SERVER_FALSE%g +s%@r_so_libs@%$r_so_libs%g +s%@ENABLE_ALSASEQ_TRUE@%$ENABLE_ALSASEQ_TRUE%g +s%@ENABLE_ALSASEQ_FALSE@%$ENABLE_ALSASEQ_FALSE%g +s%@A_so_libs@%$A_so_libs%g s%@ENABLE_W32GUI_TRUE@%$ENABLE_W32GUI_TRUE%g s%@ENABLE_W32GUI_FALSE@%$ENABLE_W32GUI_FALSE%g s%@w_so_libs@%$w_so_libs%g s%@ENABLE_PLUGIN_TRUE@%$ENABLE_PLUGIN_TRUE%g s%@ENABLE_PLUGIN_FALSE@%$ENABLE_PLUGIN_FALSE%g s%@p_so_libs@%$p_so_libs%g -s%@ENABLE_SERVER_TRUE@%$ENABLE_SERVER_TRUE%g -s%@ENABLE_SERVER_FALSE@%$ENABLE_SERVER_FALSE%g -s%@r_so_libs@%$r_so_libs%g s%@ENABLE_NETWORK_TRUE@%$ENABLE_NETWORK_TRUE%g s%@ENABLE_NETWORK_FALSE@%$ENABLE_NETWORK_FALSE%g s%@ENABLE_SOUND_SPEC_TRUE@%$ENABLE_SOUND_SPEC_TRUE%g diff -ruN TiMidity++-2.9.5/configure.in TiMidity++-2.10.0/configure.in --- TiMidity++-2.9.5/configure.in Tue Jul 4 17:10:19 2000 +++ TiMidity++-2.10.0/configure.in Tue Aug 8 10:48:52 2000 @@ -55,7 +55,7 @@ AC_INIT(timidity/timidity.c) SHELL=${CONFIG_SHELL-/bin/sh} AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(TiMidity++, 2.9.5, no-define) +AM_INIT_AUTOMAKE(TiMidity++, 2.10.0, no-define) dnl To use CONTAINS() macro (See acinclude.m4) CONTAINS_INIT @@ -125,6 +125,24 @@ CPPFLAGS="-I$prefix/include $CPPFLAGS" fi +dnl add --with-includes, --with-libraries +AC_ARG_WITH(includes, + [ --with-includes=DIR Specify include directories (colon separated)], + [ j=' ' + for i in `echo "$withval"|sed -e 's,:, ,g'`; do + j="${j}-I${i} " + done + CPPFLAGS="$j$CPPFLAGS" + ]) + +AC_ARG_WITH(libraries, + [ --with-libraries=DIR Specify library directories (colon separated)], + [ j=' ' + for i in `echo "$withval"|sed -e 's,:, ,g'`; do + j="${j}-L${i} " + done + LDFLAGS="$j$LDFLAGS" + ]) AC_PROG_CC AC_PROG_INSTALL @@ -288,7 +306,7 @@ unistd.h dlfcn.h glob.h getopt.h errno.h machine/endian.h \ stropts.h sys/audioio.h sun/audioio.h sys/types.h \ sys/ipc.h sys/shm.h sys/param.h X11/extensions/XShm.h \ - X11/Xmu/ExtAgent.h sys/soundcard.h) + X11/Xmu/ExtAgent.h sys/soundcard.h sys/awe_voice.h) AC_CHECK_HEADER(string.h,, [ EXTRADEFS="$EXTRADEFS -DNO_STRING_H " ]) dnl Checks for typedefs, structures, and compiler characteristics. @@ -410,8 +428,9 @@ dnl alib(A): HPUX network audio (Alib) dnl nas(n): Network Audio System dnl esd(e): EsounD +dnl vorbis(v): Ogg Vorbis -audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd' +audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd vorbis' AC_ARG_WITH(nas-library, [ --with-nas-library=library NAS absolute library path (Don't use -laudio)]) @@ -432,7 +451,8 @@ alsa: ALSA pcm device alib: HPUX network audio (Alib) nas: NAS - Network Audio System - esd: EsounD], + esd: EsounD + vorbis: Ogg Vorbis], [ enable_audio=$enableval have_audio_opt=yes ], [ enable_audio=yes @@ -451,7 +471,7 @@ DEFAULT_PLAYMODE= AC_ARG_WITH(default-output, [ --with-default-output= Specify default output mode (optional): - default|alsa|alib|nas|esd|wav|au|aiff|list], + default|alsa|alib|nas|esd|wav|au|aiff|list|vorbis], [ if test "$enable_audio" != no; then DEFAULT_PLAYMODE=$withval eval "au_enable_$DEFAULT_PLAYMODE=yes" @@ -742,6 +762,25 @@ AC_MSG_RESULT(no) fi +AC_MSG_CHECKING(enable_audio=vorbis) +if test "x$au_enable_vorbis" = xyes; then + AC_MSG_RESULT() + have_vorbis=yes + AC_CHECK_HEADER(vorbis/modes.h,,have_vorbis=no) + AC_CHECK_LIB(vorbis,vorbis_analysis_init,,have_vorbis=no) + if test "$have_vorbis" = "yes"; then + SYSEXTRAS="$SYSEXTRAS vorbis_a.c" + EXTRADEFS="$EXTRADEFS -DAU_VORBIS" + EXTRALIBS="$EXTRALIBS -lvorbis" + AC_MSG_RESULT(Ogg Vorbis: Enabled) + else + AC_MSG_WARN(Ogg Vorbis: Couldn't configure) + fi +else + AC_MSG_RESULT(no) +fi + + dnl Pseudo audio device (Undocumented). if test "x$au_enable_none" = xyes; then EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" @@ -773,6 +812,7 @@ .au) TIMIDITY_OUTPUT_ID=u ;; .aiff) TIMIDITY_OUTPUT_ID=a ;; .list) TIMIDITY_OUTPUT_ID=l ;; + .vorbis) TIMIDITY_OUTPUT_ID=v ;; *) TIMIDITY_OUTPUT_ID= ;; esac AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID) @@ -783,7 +823,7 @@ dnl Interface section dnl -interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk' +interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq' AC_ARG_ENABLE(interface, [ --enable-interface=[interface_list] Comma separated interface list ], @@ -1144,6 +1184,26 @@ EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS) ]) +dnl TiMidity Network MIDI Server +AM_CONDITIONAL(ENABLE_SERVER, false) +CONFIG_INTERFACE(server,SERVER,r, + [ --enable-server Enable server interface (default is no)], + , + [ INTERFACE_SRCS="$INTERFACE_SRCS server_c.c" + AC_CHECK_HEADERS(sys/soundcard.h) + ]) + + +dnl TiMidity ALSA sequencer server +AM_CONDITIONAL(ENABLE_ALSASEQ, false) +CONFIG_INTERFACE(alsaseq,ALSASEQ,A, + [ --enable-alsaseq Enable ALSA sequencer server interface (default is no)], + , + [ INTERFACE_SRCS="$INTERFACE_SRCS alsaseq_c.c" + AC_CHECK_HEADERS(sys/asoundlib.h) + ]) + + dnl Windows GUI AM_CONDITIONAL(ENABLE_W32GUI, false) CONFIG_INTERFACE(w32gui, W32GUI, w, @@ -1172,16 +1232,6 @@ fi lib_xmu_opt=-lXmu lib_xt_opt=-lXt - ]) - - -dnl TiMidity Network MIDI Server -AM_CONDITIONAL(ENABLE_SERVER, false) -CONFIG_INTERFACE(server,SERVER,r, - [ --enable-server Enable server interface (default is no)], - , - [ INTERFACE_SRCS="$INTERFACE_SRCS server_c.c" - AC_CHECK_HEADERS(sys/soundcard.h) ]) diff -ruN TiMidity++-2.9.5/doc/C/timidity.1 TiMidity++-2.10.0/doc/C/timidity.1 --- TiMidity++-2.9.5/doc/C/timidity.1 Tue May 18 19:39:08 1999 +++ TiMidity++-2.10.0/doc/C/timidity.1 Sat Jul 15 01:00:54 2000 @@ -157,8 +157,8 @@ noise at low resampling frequencies. .TP -.B \-B \fIfragments\fP -For the Linux / FreeBSD / OSS / Windows sound driver, +.B \-B \fIfragments\fP[,\fIbuffer-bits\fP] +For the Linux / FreeBSD / OSS / ALSA / Windows sound driver, selects the number of buffer fragments in interactive mode. Increasing the number of fragments may reduce choppiness when @@ -170,22 +170,7 @@ .TP .B \-b \fImode\fP - -Enables pseudo surround effects. -\fImode\fP parameters are the following: -.RS -.TP -.B \-bl -Sounds are comes mainly from left. -.TP -.B \-br -Sounds are comes mainly from right. -.TP -.B \-bb -Sounds are comes left and right in random. -.TP -.B \-bc -Disables this feature. +(obsoleted) .RE .TP @@ -308,10 +293,7 @@ dumb interface .TP .B \-in -ncurses interface(old version) -.TP -.B \-iN -NEW ncurses interface +ncurses interface .TP .B \-is slang interface @@ -337,6 +319,16 @@ Environment variable \fBTIMIDITY_SKIN\fP must be specified with path of the skin data(compressed data are also available). .TP +.B \-ig +gtk interface +.TP +.B \-ir +Launch timidity as MIDI server. +.TP +.B \-iA +Launch timidity as ALSA sequencer client. +.br +.TP .B Interface options Option characters may be added immediately after the interface identifier. The following @@ -357,6 +349,15 @@ through the use of short DMA buffer fragments, which can be tuned via the -B option. +.TP +.B l +Loop playing (some interface ignore this option) +.TP +.B r +Randomize file list arguments before playing +.TP +.B s +Sorting file list arguments before playing .RE .TP @@ -477,21 +478,8 @@ If \fIchannel\fP is 0, all channels are turned on. .TP -.BI \-R " value" -Enables Pseudo Reverb Mode. \fIvalue\fP are the following: -.RS -.TP -.B 0 -Long slight release -.TP -.B 1 -Long loud release -.TP -.B 2 -Short release -.TP -.B 3 -No release +.BI \-R " msec" +Enables Pseudo Reverb Mode. \fImsec\fP are envelope release time. .RE .TP @@ -631,7 +619,7 @@ .P .SH COPYRIGHT -Copyright (C) 1999 Masanao Izumo +Copyright (C) 1999,2000 Masanao Izumo Copyright (C) 1995 Tuukka Toivonen .P Original version was developed under the name of Tuukka Toivonen diff -ruN TiMidity++-2.9.5/doc/ja_JP.ujis/timidity.1 TiMidity++-2.10.0/doc/ja_JP.ujis/timidity.1 --- TiMidity++-2.9.5/doc/ja_JP.ujis/timidity.1 Wed Jan 6 14:02:36 1999 +++ TiMidity++-2.10.0/doc/ja_JP.ujis/timidity.1 Sat Jul 15 00:50:08 2000 @@ -347,9 +347,6 @@ .B \-in ncurses interface .TP -.B \-iN -NEW ncurses interface -.TP .B \-is slang interface .TP diff -ruN TiMidity++-2.9.5/interface/Makefile.am TiMidity++-2.10.0/interface/Makefile.am --- TiMidity++-2.9.5/interface/Makefile.am Wed Jul 5 22:51:48 2000 +++ TiMidity++-2.10.0/interface/Makefile.am Fri Jul 14 19:47:35 2000 @@ -91,6 +91,7 @@ off.xbm \ server_c.c \ server_defs.h \ + alsaseq_c.c \ w32g.h \ w32g_c.c \ w32g_ini.c \ diff -ruN TiMidity++-2.9.5/interface/Makefile.in TiMidity++-2.10.0/interface/Makefile.in --- TiMidity++-2.9.5/interface/Makefile.in Wed Jul 5 23:04:52 2000 +++ TiMidity++-2.10.0/interface/Makefile.in Wed Aug 9 16:54:09 2000 @@ -122,7 +122,7 @@ libinterface_a_SOURCES = dumb_c.c wrdt_dumb.c wrdt_tty.c -EXTRA_libinterface_a_SOURCES = ncurs_c.c slang_c.c motif.h motif_c.c motif_i.c motif_p.c tk_c.c emacs_c.c vt100.h vt100.c vt100_c.c xaw.h xaw_c.c xaw_i.c xaw_redef.c xskin.h xskin_c.c xskin_i.c xskin_loadBMP.c xskin_spectrum.c wrdt_x.c x_sherry.c x_sherry.h x_wrdwindow.c x_wrdwindow.h VTPrsTbl.c VTparse.h x_mag.c x_mag.h dynamic_c.c mac_c.c mac_c.h mac_mag.c mac_mag.h mac_trace.c mac_wrdwindow.c mac_wrdwindow.h wrdt_mac.c wrdt_wcon.c gtk_c.c gtk_h.h gtk_i.c gtk_p.c soundspec.c soundspec.h x_sherry.c x_sherry.h check.xbm arrow.xbm on.xbm off.xbm server_c.c server_defs.h w32g.h w32g_c.c w32g_ini.c w32g_rec.h w32g_res.h w32g_res.rc w32g_utl.c w32g_utl.h w32g_ut2.c w32g_ut2.h w32g_i.c w32g_playlist.c w32g_pref.c w32g_pref.h w32g_subwin.c w32g_subwin.h w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp +EXTRA_libinterface_a_SOURCES = ncurs_c.c slang_c.c motif.h motif_c.c motif_i.c motif_p.c tk_c.c emacs_c.c vt100.h vt100.c vt100_c.c xaw.h xaw_c.c xaw_i.c xaw_redef.c xskin.h xskin_c.c xskin_i.c xskin_loadBMP.c xskin_spectrum.c wrdt_x.c x_sherry.c x_sherry.h x_wrdwindow.c x_wrdwindow.h VTPrsTbl.c VTparse.h x_mag.c x_mag.h dynamic_c.c mac_c.c mac_c.h mac_mag.c mac_mag.h mac_trace.c mac_wrdwindow.c mac_wrdwindow.h wrdt_mac.c wrdt_wcon.c gtk_c.c gtk_h.h gtk_i.c gtk_p.c soundspec.c soundspec.h x_sherry.c x_sherry.h check.xbm arrow.xbm on.xbm off.xbm server_c.c server_defs.h alsaseq_c.c w32g.h w32g_c.c w32g_ini.c w32g_rec.h w32g_res.h w32g_res.rc w32g_utl.c w32g_utl.h w32g_ut2.c w32g_ut2.h w32g_i.c w32g_playlist.c w32g_pref.c w32g_pref.h w32g_subwin.c w32g_subwin.h w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp @ENABLE_WRD_TRUE@WRD_OBJS = wrdt_x.o x_wrdwindow.o VTPrsTbl.o x_mag.o x_sherry.o @@ -361,6 +361,12 @@ fi; \ done VTPrsTbl.o: VTPrsTbl.c VTparse.h +alsaseq_c.o: alsaseq_c.c ../config.h ../timidity/timidity.h \ + ../utils/support.h ../timidity/common.h ../libarc/url.h \ + ../utils/mblock.h ../timidity/controls.h ../timidity/instrum.h \ + ../timidity/playmidi.h ../timidity/readmidi.h \ + ../timidity/recache.h ../timidity/output.h ../timidity/aq.h \ + ../utils/timer.h dumb_c.o: dumb_c.c ../config.h ../timidity/timidity.h ../utils/support.h \ ../timidity/common.h ../libarc/url.h ../utils/mblock.h \ ../timidity/output.h ../timidity/controls.h \ diff -ruN TiMidity++-2.9.5/interface/alsaseq_c.c TiMidity++-2.10.0/interface/alsaseq_c.c --- TiMidity++-2.9.5/interface/alsaseq_c.c Thu Jan 1 09:00:00 1970 +++ TiMidity++-2.10.0/interface/alsaseq_c.c Thu Jul 20 04:10:40 2000 @@ -0,0 +1,494 @@ +/* + TiMidity++ -- MIDI to WAVE converter and player + Copyright (C) 1999,2000 Masanao Izumo + Copyright (C) 1995 Tuukka Toivonen + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + alsaseq_c.c - ALSA sequencer server interface + Copyright (c) 2000 Takashi Iwai + + + DESCRIPTION + =========== + + This interface provides an ALSA sequencer interface which receives + events and plays it in real-time. On this mode, TiMidity works + purely as software (real-time) MIDI render. There is no + scheduling routine in this interface, since all scheduling is done + by ALSA seqeuncer core. + + For invoking ALSA sequencer interface, run timidity as folows: + % timidity -iA -B2,8 + The fragment size can be adjustable. The smaller number gives + better real-time response. Then timidity shows new port numbers + which were newly created (128:0 and 128:1 below). + --------------------------------------- + % timidity -iA -B2,8 + TiMidity starting in ALSA server mode + Opening sequencer port 128:0 128:1 + --------------------------------------- + These ports can be connected with any other sequencer ports. + For example, playing a MIDI file via pmidi (what's an overkill :-), + % pmidi -p128:0 foo.mid + If a midi file needs two ports, you may connect like this: + % pmidi -p128:0,128:1 bar.mid + Connecting from external MIDI keyboard may become like this: + % aconnect 64:0 128:0 + + The interface tries to reset process scheduling as SCHED_FIFO + and as high priority as possible. For enabling this feature, + timidity must be invoked by root or installed with set-uid root. + The SCHED_FIFO'd program shows much better real-time response. + For example, without rescheduled, timidity may cause pauses at + every time /proc is accessed. + + Timidity loads instruments dynamically at each time a PRM_CHANGE + event is received. This causes sometimes pauses during playback. + It occurs often in the playback via pmidi. + Furthermore, timidity resets the loaded instruments when the all + subscriptions are disconnected. Thus for keeping all loaded + instruments also after playback is finished, you need to connect a + dummy port (e.g. midi input port) to timidity port via aconnect: + % aconnect 64:0 128:0 + + If you prefer a bit more fancy visual output, use my tiny program, + aseqview. + % aseqview -p2 & + Then connect two ports to timidity ports: + % aconnect 129:0 128:0 + % aconnect 129:1 128:1 + The outputs ought to be redirected to 129:0,1 instead of 128:0,1. + + You may access to timidity also via OSS MIDI emulation on ALSA + sequencer. Take a look at /proc/asound/seq/oss for checking the + device number to be accessed. + --------------------------------------- + % cat /proc/asound/seq/oss + OSS sequencer emulation version 0.1.8 + ALSA client number 63 + ALSA receiver port 0 + ... + midi 1: [TiMidity port 0] ALSA port 128:0 + capability write / opened none + + midi 2: [TiMidity port 1] ALSA port 128:1 + capability write / opened none + --------------------------------------- + In the case above, the MIDI devices 1 and 2 are assigned to + timidity. Now, play with playmidi: + % playmidi -e -D1 foo.mid + + + BUGS + ==== + + Well, well, they must be there.. + + + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef NO_STRING_H +#include +#else +#include +#endif +#include + +#ifdef HAVE_SYS_SOUNDCARD_H +#include +#else +#include "server_defs.h" +#endif /* HAVE_SYS_SOUNDCARD_H */ + +#include "timidity.h" +#include "common.h" +#include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" +#include "recache.h" +#include "output.h" +#include "aq.h" +#include "timer.h" + +#define NUM_PORTS 2 /* number of ports; + * this should be configurable via command line.. + */ + +struct seq_context { + snd_seq_t *handle; /* The snd_seq handle to /dev/snd/seq */ + int client; /* The client associated with this context */ + int port[NUM_PORTS]; /* created sequencer ports */ + int fd; /* The file descriptor */ + int used; /* number of current connection */ + int active; /* */ +}; + +static int ctl_open(int using_stdin, int using_stdout); +static void ctl_close(void); +static int ctl_read(int32 *valp); +static int cmsg(int type, int verbosity_level, char *fmt, ...); +static void ctl_event(CtlEvent *e); +static void ctl_pass_playing_list(int n, char *args[]); + +/**********************************/ +/* export the interface functions */ + +#define ctl alsaseq_control_mode + +ControlMode ctl= +{ + "ALSA sequencer interface", 'A', + 1,0,0, + 0, + ctl_open, + ctl_close, + ctl_pass_playing_list, + ctl_read, + cmsg, + ctl_event +}; + +static int32 event_time_offset; +static FILE *outfp; +static struct seq_context alsactx; +static struct seq_context *ctxp = &alsactx; + +/*ARGSUSED*/ +static int ctl_open(int using_stdin, int using_stdout) +{ + ctl.opened = 1; + ctl.flags &= ~(CTLF_LIST_RANDOM|CTLF_LIST_SORT); + if (using_stdout) + outfp = stderr; + else + outfp = stdout; + return 0; +} + +static void ctl_close(void) +{ + if (!ctl.opened) + return; +} + +static int ctl_read(int32 *valp) +{ + return RC_NONE; +} + +static int cmsg(int type, int verbosity_level, char *fmt, ...) +{ + va_list ap; + + if((type==CMSG_TEXT || type==CMSG_INFO || type==CMSG_WARNING) && + ctl.verbosity < verbosity_level) + return 0; + + if(outfp == NULL) + outfp = stderr; + + va_start(ap, fmt); + vfprintf(outfp, fmt, ap); + fputs(NLS, outfp); + fflush(outfp); + va_end(ap); + + return 0; +} + +static void ctl_event(CtlEvent *e) +{ +} + +static RETSIGTYPE sig_timeout(int sig) +{ + signal(SIGALRM, sig_timeout); /* For SysV base */ + /* Expect EINTR */ +} + +static void doit(void); +static int do_sequencer(void); +static void server_reset(void); + +static int set_realtime_priority(void) +{ + struct sched_param schp; + + /* + * set the process to realtime privs + */ + memset(&schp, 0, sizeof(schp)); + schp.sched_priority = sched_get_priority_max(SCHED_FIFO); + + if (sched_setscheduler(0, SCHED_FIFO, &schp) != 0) { + printf("can't set sched_setscheduler - using normal priority\n"); + return -1; + } + printf("set SCHED_FIFO\n"); + return 0; +} + +static void ctl_pass_playing_list(int n, char *args[]) +{ + snd_seq_port_info_t pinfo; + int i; + +#ifdef SIGPIPE + signal(SIGPIPE, SIG_IGN); /* Handle broken pipe */ +#endif /* SIGPIPE */ + + printf("TiMidity starting in ALSA server mode\n"); + + set_realtime_priority(); + + if (snd_seq_open(&ctxp->handle, SND_SEQ_OPEN) < 0) { + fprintf(stderr, "error in snd_seq_open\n"); + return; + } + ctxp->client = snd_seq_client_id(ctxp->handle); + ctxp->fd = snd_seq_file_descriptor(ctxp->handle); + + printf("Opening sequencer port:"); + for (i = 0; i < NUM_PORTS; i++) { + snd_seq_port_info_t pinfo; + memset(&pinfo, 0, sizeof(pinfo)); + sprintf(pinfo.name, "TiMidity port %d", i); + pinfo.capability = SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE; + pinfo.type = SND_SEQ_PORT_TYPE_MIDI_GENERIC; + strcpy(pinfo.group, SND_SEQ_GROUP_DEVICE); + if (snd_seq_create_port(ctxp->handle, &pinfo) < 0) { + fprintf(stderr, "error in snd_seq_create_simple_port\n"); + return; + } + ctxp->port[i] = pinfo.port; + printf(" %d:%d", ctxp->client, ctxp->port[i]); + } + printf("\n"); + + ctxp->used = 0; + ctxp->active = 0; + + opt_realtime_playing = 2; /* Enable loading patch while playing */ + allocate_cache_size = 0; /* Don't use pre-calclated samples */ + /* aq_set_soft_queue(-1.0, 0.0); */ + alarm(0); + signal(SIGALRM, sig_timeout); + signal(SIGINT, safe_exit); + signal(SIGTERM, safe_exit); + + play_mode->close_output(); + for (;;) { + server_reset(); + doit(); + } +} + +static void seq_play_event(MidiEvent *ev) +{ + ev->time = event_time_offset; + play_event(ev); +} + +static void stop_playing(void) +{ + if(upper_voices) { + MidiEvent ev; + ev.type = ME_EOT; + ev.a = 0; + ev.b = 0; + seq_play_event(&ev); + aq_flush(0); + } +} + +static void doit(void) +{ + for (;;) { + while (snd_seq_event_input_pending(ctxp->handle, 1)) { + if (do_sequencer()) + goto __done; + } + if (ctxp->active) { + double fill_time; + MidiEvent ev; + + aq_add(NULL, 0); +#if 0 + fill_time = high_time_at - (double)aq_filled() / play_mode->rate; + if (fill_time <= 0) + continue; + event_time_offset += (int32)(fill_time * play_mode->rate); +#endif + event_time_offset += audio_buffer_size; + ev.time = event_time_offset; + ev.type = ME_NONE; + play_event(&ev); + } else { + fd_set rfds; + FD_ZERO(&rfds); + FD_SET(ctxp->fd, &rfds); + if (select(ctxp->fd + 1, &rfds, NULL, NULL, NULL) < 0) + goto __done; + } + } + +__done: + if (ctxp->active) { + stop_playing(); + play_mode->close_output(); + free_instruments(0); + free_global_mblock(); + ctxp->active = 0; + } +} + +static void server_reset(void) +{ + playmidi_stream_init(); + if (free_instruments_afterwards) + free_instruments(0); + reduce_voice_threshold = 0; /* Disable auto reduction voice */ + event_time_offset = 0; +} + +#define NOTE_CHAN(ev) ((ev)->dest.port * 16 + (ev)->data.note.channel) +#define CTRL_CHAN(ev) ((ev)->dest.port * 16 + (ev)->data.control.channel) + +static int do_sequencer(void) +{ + int n; + MidiEvent ev; + snd_seq_event_t *aevp; + + n = snd_seq_event_input(ctxp->handle, &aevp); + if (n < 0 || aevp == NULL) + return 0; + + switch(aevp->type) { + case SND_SEQ_EVENT_NOTEON: + ev.channel = NOTE_CHAN(aevp); + ev.a = aevp->data.note.note; + ev.b = aevp->data.note.velocity; + if (ev.b == 0) + ev.type = ME_NOTEOFF; + else + ev.type = ME_NOTEON; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_NOTEOFF: + ev.channel = NOTE_CHAN(aevp); + ev.a = aevp->data.note.note; + ev.b = aevp->data.note.velocity; + ev.type = ME_NOTEOFF; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_KEYPRESS: + ev.channel = NOTE_CHAN(aevp); + ev.a = aevp->data.note.note; + ev.b = aevp->data.note.velocity; + ev.type = ME_KEYPRESSURE; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_PGMCHANGE: + ev.channel = CTRL_CHAN(aevp); + ev.a = aevp->data.control.value; + ev.type = ME_PROGRAM; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_CONTROLLER: + if(convert_midi_control_change(CTRL_CHAN(aevp), + aevp->data.control.param, + aevp->data.control.value, + &ev)) + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_PITCHBEND: + ev.type = ME_PITCHWHEEL; + ev.channel = CTRL_CHAN(aevp); + aevp->data.control.value += 0x2000; + ev.a = (aevp->data.control.value) & 0x7f; + ev.b = (aevp->data.control.value>>7) & 0x7f; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_CHANPRESS: + ev.type = ME_CHANNEL_PRESSURE; + ev.channel = CTRL_CHAN(aevp); + ev.a = aevp->data.control.value; + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_SYSEX: + if (parse_sysex_event(aevp->data.ext.ptr + 1, aevp->data.ext.len - 1, &ev)) + seq_play_event(&ev); + break; + + case SND_SEQ_EVENT_PORT_USED: + if (ctxp->used == 0) { + if (play_mode->open_output() < 0) { + ctl.cmsg(CMSG_FATAL, VERB_NORMAL, + "Couldn't open %s (`%c')", + play_mode->id_name, play_mode->id_character); + snd_seq_free_event(aevp); + return 0; + } + ctxp->active = 1; + } + ctxp->used++; + break; + + case SND_SEQ_EVENT_PORT_UNUSED: + ctxp->used--; + if (ctxp->used <= 0) { + snd_seq_free_event(aevp); + return 1; /* quit now */ + } + break; + + default: + /*printf("Unsupported event %d\n", aevp->type);*/ + break; + } + snd_seq_free_event(aevp); + return 0; +} + +/* + * interface__loader(); + */ +ControlMode *interface_A_loader(void) +{ + return &ctl; +} diff -ruN TiMidity++-2.9.5/interface/w32g_ini.c TiMidity++-2.10.0/interface/w32g_ini.c --- TiMidity++-2.9.5/interface/w32g_ini.c Tue Jul 4 16:51:43 2000 +++ TiMidity++-2.10.0/interface/w32g_ini.c Tue Aug 8 12:37:40 2000 @@ -153,7 +153,9 @@ #if defined(__W32__) && defined(SMFCONV) IniGetKeyInt(INI_SEC_TIMIDITY,"opt_rcpcv_dll",&(st->opt_rcpcv_dll)); #endif - IniGetKeyInt(INI_SEC_TIMIDITY,"data_block_time",&(st->data_block_time)); + IniGetKeyInt(INI_SEC_TIMIDITY,"data_block_bits",&(st->data_block_bits)); + if(st->data_block_bits > AUDIO_BUFFER_BITS) + st->data_block_bits = AUDIO_BUFFER_BITS; IniGetKeyInt(INI_SEC_TIMIDITY,"data_block_num",&(st->data_block_num)); } @@ -258,7 +260,7 @@ #if defined(__W32__) && defined(SMFCONV) IniPutKeyInt(INI_SEC_TIMIDITY,"opt_rcpcv_dll",&(st->opt_rcpcv_dll)); #endif - IniPutKeyInt(INI_SEC_TIMIDITY,"data_block_time",&(st->data_block_time)); + IniPutKeyInt(INI_SEC_TIMIDITY,"data_block_bits",&(st->data_block_bits)); IniPutKeyInt(INI_SEC_TIMIDITY,"data_block_num",&(st->data_block_num)); w32g_has_ini_file = 1; } diff -ruN TiMidity++-2.9.5/interface/w32g_utl.c TiMidity++-2.10.0/interface/w32g_utl.c --- TiMidity++-2.9.5/interface/w32g_utl.c Tue Jul 4 16:51:43 2000 +++ TiMidity++-2.10.0/interface/w32g_utl.c Tue Aug 8 12:37:41 2000 @@ -64,7 +64,7 @@ extern int opt_buffer_fragments; extern int32 opt_output_rate; extern int PlayerLanguage; -extern volatile int data_block_time; // msec +extern volatile int data_block_bits; extern volatile int data_block_num; extern int DocWndIndependent; extern int SeachDirRecursive; @@ -479,7 +479,7 @@ control_ratio = play_mode->rate / CONTROLS_PER_SECOND; control_ratio = SetValue(control_ratio, 1, MAX_CONTROL_RATIO); } - data_block_time = st->data_block_time; + data_block_bits = st->data_block_bits; data_block_num = st->data_block_num; } @@ -591,7 +591,7 @@ #if defined(__W32__) && defined(SMFCONV) st->opt_rcpcv_dll = opt_rcpcv_dll; #endif /* SMFCONV */ - st->data_block_time = data_block_time; + st->data_block_bits = data_block_bits; st->data_block_num = data_block_num; } diff -ruN TiMidity++-2.9.5/interface/w32g_utl.h TiMidity++-2.10.0/interface/w32g_utl.h --- TiMidity++-2.9.5/interface/w32g_utl.h Tue Jul 4 16:51:43 2000 +++ TiMidity++-2.10.0/interface/w32g_utl.h Tue Aug 8 12:37:41 2000 @@ -21,7 +21,7 @@ */ // ini & config -#define IniVersion "2.1" +#define IniVersion "2.2" typedef struct SETTING_PLAYER_ { // Main Window int InitMinimizeFlag; @@ -139,7 +139,7 @@ // x (ignore) // Z (ignore) /* for w32g_a.c */ - int data_block_time; + int data_block_bits; int data_block_num; //?? int waveout_data_block_size; } SETTING_TIMIDITY; diff -ruN TiMidity++-2.9.5/interface.h.in TiMidity++-2.10.0/interface.h.in --- TiMidity++-2.9.5/interface.h.in Tue Apr 6 19:57:12 1999 +++ TiMidity++-2.10.0/interface.h.in Fri Jul 14 19:54:28 2000 @@ -39,3 +39,6 @@ /* Define if you have Remote MIDI interface. */ #undef IA_SERVER + +/* Define if you have Remote MIDI interface. */ +#undef IA_ALSASEQ diff -ruN TiMidity++-2.9.5/timidity/Makefile.am TiMidity++-2.10.0/timidity/Makefile.am --- TiMidity++-2.9.5/timidity/Makefile.am Wed Jul 5 22:51:48 2000 +++ TiMidity++-2.10.0/timidity/Makefile.am Thu Jul 20 03:51:47 2000 @@ -118,6 +118,7 @@ mfnode.h \ nas_a.c \ sun_a.c \ + vorbis_a.c \ w32_a.c \ w32g_a.c \ timpp32g.ini diff -ruN TiMidity++-2.9.5/timidity/Makefile.in TiMidity++-2.10.0/timidity/Makefile.in --- TiMidity++-2.9.5/timidity/Makefile.in Wed Jul 5 23:04:56 2000 +++ TiMidity++-2.10.0/timidity/Makefile.in Wed Aug 9 16:54:13 2000 @@ -120,7 +120,7 @@ timidity_SOURCES = aenc.h aiff_a.c aq.c aq.h au_a.c audio_cnv.c audio_cnv.h common.c common.h controls.c controls.h dlutils.h effect.c filter.c filter.h instrum.c instrum.h list_a.c loadtab.c mid-j.defs mid.defs miditrace.c miditrace.h mix.c mix.h mod.c mod.h mod2midi.c mod2midi.h output.c output.h playmidi.c playmidi.h raw_a.c rcp.c readmidi.c readmidi.h recache.c recache.h resample.c resample.h reverb.c reverb.h sbkconv.c sffile.c sffile.h sfitem.c sfitem.h sflayer.h smfconv.c smfconv.h sndfont.c tables.c tables.h timidity.c timidity.h version.c wave_a.c wrd.h wrd_read.c wrdt.c -EXTRA_timidity_SOURCES = alsa_a.c audriv.h audriv_a.c audriv_al.c audriv_mme.c audriv_none.c dl_w32.c dl_dld.c dl_dlopen.c dl_hpux.c bsd20_a.c esd_a.c hpux_a.c hpux_d_a.c oss_a.c mac_a.c mac_qt_a.c mac_com.h mac_dlog.c mac_main.c mac_main.h mac_soundspec.c mfnode.c mfnode.h nas_a.c sun_a.c w32_a.c w32g_a.c timpp32g.ini +EXTRA_timidity_SOURCES = alsa_a.c audriv.h audriv_a.c audriv_al.c audriv_mme.c audriv_none.c dl_w32.c dl_dld.c dl_dlopen.c dl_hpux.c bsd20_a.c esd_a.c hpux_a.c hpux_d_a.c oss_a.c mac_a.c mac_qt_a.c mac_com.h mac_dlog.c mac_main.c mac_main.h mac_soundspec.c mfnode.c mfnode.h nas_a.c sun_a.c vorbis_a.c w32_a.c w32g_a.c timpp32g.ini @ENABLE_W32GUI_TRUE@W32GUI_RES = $(top_builddir)/interface/w32g_res.res @@ -266,13 +266,18 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done -aiff_a.o: aiff_a.c ../config.h timidity.h ../utils/support.h output.h \ - controls.h +aiff_a.o: aiff_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h instrum.h \ + playmidi.h readmidi.h +alsa_a.o: alsa_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h \ + ../utils/timer.h instrum.h playmidi.h miditrace.h aq.o: aq.c ../config.h timidity.h ../utils/support.h common.h \ ../libarc/url.h ../utils/mblock.h output.h aq.h \ ../utils/timer.h controls.h miditrace.h instrum.h playmidi.h -au_a.o: au_a.c ../config.h timidity.h ../utils/support.h output.h \ - controls.h +au_a.o: au_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h instrum.h \ + playmidi.h readmidi.h audio_cnv.o: audio_cnv.c ../config.h timidity.h ../utils/support.h \ audio_cnv.h common.o: common.c ../config.h timidity.h ../utils/support.h common.h \ @@ -284,6 +289,9 @@ dlutils.h effect.o: effect.c ../config.h timidity.h ../utils/support.h instrum.h \ playmidi.h output.h reverb.h +esd_a.o: esd_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h \ + ../utils/timer.h instrum.h playmidi.h miditrace.h filter.o: filter.c ../config.h timidity.h ../utils/support.h common.h \ ../libarc/url.h ../utils/mblock.h controls.h instrum.h filter.h instrum.o: instrum.c ../config.h timidity.h ../utils/support.h common.h \ @@ -308,6 +316,11 @@ common.h ../libarc/url.h ../utils/mblock.h instrum.h playmidi.h \ readmidi.h tables.h mod.h output.h controls.h \ ../libunimod/unimod.h mod2midi.h +nas_a.o: nas_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h \ + ../utils/timer.h instrum.h playmidi.h miditrace.h +ogg_a.o: ogg_a.c ../config.h timidity.h ../utils/support.h output.h \ + controls.h oss_a.o: oss_a.c ../config.h timidity.h ../utils/support.h common.h \ ../libarc/url.h ../utils/mblock.h output.h controls.h \ ../utils/timer.h instrum.h playmidi.h miditrace.h @@ -316,9 +329,11 @@ playmidi.o: playmidi.c ../config.h timidity.h ../utils/support.h \ common.h ../libarc/url.h ../utils/mblock.h instrum.h playmidi.h \ readmidi.h output.h mix.h controls.h miditrace.h recache.h \ - ../libarc/arc.h reverb.h wrd.h aq.h tables.h -raw_a.o: raw_a.c ../config.h timidity.h ../utils/support.h output.h \ - controls.h + ../libarc/arc.h reverb.h wrd.h aq.h ../interface/soundspec.h \ + tables.h +raw_a.o: raw_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h instrum.h \ + playmidi.h readmidi.h rcp.o: rcp.c ../config.h timidity.h ../utils/support.h common.h \ ../libarc/url.h ../utils/mblock.h instrum.h playmidi.h \ readmidi.h controls.h @@ -350,11 +365,15 @@ timidity.o: timidity.c ../config.h ../interface.h timidity.h \ ../utils/support.h common.h ../libarc/url.h ../utils/mblock.h \ instrum.h playmidi.h readmidi.h output.h controls.h tables.h \ - miditrace.h reverb.h recache.h ../libarc/arc.h \ - ../utils/strtab.h wrd.h mid.defs aq.h mix.h \ - ../libunimod/unimod.h -wave_a.o: wave_a.c ../config.h timidity.h ../utils/support.h output.h \ - controls.h + miditrace.h reverb.h ../interface/soundspec.h recache.h \ + ../libarc/arc.h ../utils/strtab.h wrd.h mid.defs aq.h mix.h \ + ../libunimod/unimod.h dlutils.h +vorbis_a.o: vorbis_a.c ../config.h timidity.h ../utils/support.h \ + common.h ../libarc/url.h ../utils/mblock.h output.h controls.h \ + instrum.h playmidi.h readmidi.h +wave_a.o: wave_a.c ../config.h timidity.h ../utils/support.h common.h \ + ../libarc/url.h ../utils/mblock.h output.h controls.h instrum.h \ + playmidi.h readmidi.h wrd_read.o: wrd_read.c ../config.h timidity.h ../utils/support.h \ common.h ../libarc/url.h ../utils/mblock.h instrum.h playmidi.h \ readmidi.h controls.h wrd.h ../utils/strtab.h diff -ruN TiMidity++-2.9.5/timidity/aiff_a.c TiMidity++-2.10.0/timidity/aiff_a.c --- TiMidity++-2.9.5/timidity/aiff_a.c Mon Feb 7 08:02:19 2000 +++ TiMidity++-2.10.0/timidity/aiff_a.c Mon Jul 24 16:38:43 2000 @@ -40,8 +40,12 @@ #include #include "timidity.h" +#include "common.h" #include "output.h" #include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ static void close_output(void); @@ -67,7 +71,7 @@ -1, {0,0,0,0,0}, "AIFF file", 'a', - "output.aiff", + NULL, open_output, close_output, output_data, @@ -88,8 +92,7 @@ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; @@ -103,8 +106,7 @@ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; @@ -117,8 +119,7 @@ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; @@ -134,8 +135,7 @@ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; @@ -196,6 +196,102 @@ return 0; } +static int aiff_output_open(const char *fname) +{ + if(strcmp(fname, "-") == 0) { + dpm.fd = 1; /* data to stdout */ + } else { + /* Open the audio file */ + dpm.fd = open(fname, FILE_OUTPUT_MODE); + if(dpm.fd < 0) { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + fname, strerror(errno)); + return -1; + } + } + + /* magic */ + if(write_str("FORM") == -1) return -1; + + /* file size - 8 (dmy) */ + if(write_u32((uint32)0xffffffff) == -1) return -1; + + /* chunk start tag */ + if(write_str("AIFF") == -1) return -1; + + /* COMM chunk */ + if(chunk_start("COMM", 18) == -1) return -1; + + /* number of channels */ + if(dpm.encoding & PE_MONO) { + if(write_u16((uint16)1) == -1) return -1; + } else { + if(write_u16((uint16)2) == -1) return -1; + } + + /* number of frames (dmy) */ + if(write_u32((uint32)0xffffffff) == -1) return -1; + + /* bits per sample */ + if(dpm.encoding & PE_16BIT) { + if(write_u16((uint16)16) == -1) return -1; + } else { + if(write_u16((uint16)8) == -1) return -1; + } + + /* sample rate */ + if(write_ieee_80bitfloat((double)dpm.rate) == -1) return -1; + + /* SSND chunk */ + if(chunk_start("SSND", (int32)0xffffffff) == -1) return -1; + + /* offset */ + if(write_u32((uint32)0) == -1) return -1; + + /* block size */ + if(write_u32((uint32)0) == -1) return -1; + + return 0; +} + +static int auto_aiff_output_open(const char *input_filename) +{ + char *output_filename = (char *)safe_malloc(strlen(input_filename) + 5); + char *ext, *p; + + strcpy(output_filename, input_filename); + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + else { + /* strip ".gz" */ + if(strcasecmp(ext, ".gz") == 0) { + *ext = '\0'; + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + } + } + + /* replace '.' and '#' before ext */ + for(p = output_filename; p < ext; p++) + if(*p == '.' || *p == '#') + *p = '_'; + + if(*ext && isupper(*(ext + 1))) + strcpy(ext, ".AIFF"); + else + strcpy(ext, ".aiff"); + if(aiff_output_open(output_filename) == -1) { + free(output_filename); + return -1; + } + + if(dpm.name != NULL) + free(dpm.name); + dpm.name = output_filename; + ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Output %s", dpm.name); + return 0; +} + static int open_output(void) { int include_enc, exclude_enc; @@ -217,67 +313,15 @@ dpm.encoding = validate_encoding(dpm.encoding, 0, PE_ULAW | PE_ALAW); - if(dpm.name && dpm.name[0] == '-' && dpm.name[1] == '\0') - dpm.fd = 1; /* data to stdout */ - else - { - /* Open the audio file */ - dpm.fd = open(dpm.name, FILE_OUTPUT_MODE); - if(dpm.fd < 0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", - dpm.name, strerror(errno)); - return -1; - } - } - - /* magic */ - if(write_str("FORM") == -1) return -1; - - /* file size - 8 (dmy) */ - if(write_u32((uint32)0xffffffff) == -1) return -1; - - /* chunk start tag */ - if(write_str("AIFF") == -1) return -1; - - /* COMM chunk */ - if(chunk_start("COMM", 18) == -1) return -1; - - /* number of channels */ - if(dpm.encoding & PE_MONO) - { - if(write_u16((uint16)1) == -1) return -1; - } - else - { - if(write_u16((uint16)2) == -1) return -1; - } - - /* number of frames (dmy) */ - if(write_u32((uint32)0xffffffff) == -1) return -1; - - /* bits per sample */ - if(dpm.encoding & PE_16BIT) - { - if(write_u16((uint16)16) == -1) return -1; - } - else - { - if(write_u16((uint16)8) == -1) return -1; + if(dpm.name == NULL) { + dpm.flag |= PF_AUTO_SPLIT_FILE; + dpm.name = NULL; + } else { + dpm.flag &= ~PF_AUTO_SPLIT_FILE; + if(aiff_output_open(dpm.name) == -1) + return -1; } - /* sample rate */ - if(write_ieee_80bitfloat((double)dpm.rate) == -1) return -1; - - /* SSND chunk */ - if(chunk_start("SSND", (int32)0xffffffff) == -1) return -1; - - /* offset */ - if(write_u32((uint32)0) == -1) return -1; - - /* block size */ - if(write_u32((uint32)0) == -1) return -1; - bytes_output = 0; already_warning_lseek = 0; next_bytes = bytes_output + UPDATE_HEADER_STEP; @@ -317,8 +361,7 @@ if(dpm.fd != 1 && /* We don't close stdout */ dpm.fd != -1) { - if(update_header() == -1) - return; + update_header(); close(dpm.fd); dpm.fd = -1; } @@ -326,12 +369,21 @@ static int acntl(int request, void *arg) { - switch(request) - { - case PM_REQ_DISCARD: - return 0; + switch(request) { + case PM_REQ_PLAY_START: + if(dpm.flag & PF_AUTO_SPLIT_FILE) + return auto_aiff_output_open(current_file_info->filename); + break; + case PM_REQ_PLAY_END: + if(dpm.flag & PF_AUTO_SPLIT_FILE) { + close_output(); + return 0; } - return -1; + break; + case PM_REQ_DISCARD: + return 0; + } + return -1; } diff -ruN TiMidity++-2.9.5/timidity/alsa_a.c TiMidity++-2.10.0/timidity/alsa_a.c --- TiMidity++-2.9.5/timidity/alsa_a.c Wed May 17 13:13:07 2000 +++ TiMidity++-2.10.0/timidity/alsa_a.c Sat Jul 15 00:36:15 2000 @@ -393,7 +393,7 @@ tmp = extra_param[1]; else { - tmp = AUDIO_BUFFER_SIZE; + tmp = audio_buffer_size; if (!(*encoding__ & PE_MONO)) tmp <<= 1; if (*encoding__ & PE_16BIT) @@ -625,7 +625,8 @@ ctl->cmsg(CMSG_WARNING, VERB_DEBUG, "%s: %s", dpm.name, (n < 0) ? snd_strerror(n) : "write error"); - return -1; + if (n != -EPIPE) /* buffer underrun is ignored */ + return -1; } } diff -ruN TiMidity++-2.9.5/timidity/aq.c TiMidity++-2.10.0/timidity/aq.c --- TiMidity++-2.9.5/timidity/aq.c Mon Feb 7 08:01:34 2000 +++ TiMidity++-2.10.0/timidity/aq.c Mon Jul 24 11:16:04 2000 @@ -103,7 +103,7 @@ else bps = ch; - bs = AUDIO_BUFFER_SIZE * bps; + bs = audio_buffer_size * bps; dq = play_mode->rate * MAX_FILLED_TIME * bps; while(bs * 2 > dq) bs /= 2; @@ -122,6 +122,8 @@ { int ch; + /* Initialize Bps, bucket_size, device_qsize, and bucket_time */ + if(play_mode->encoding & PE_MONO) ch = 1; else @@ -131,34 +133,26 @@ else Bps = ch; + if(play_mode->acntl(PM_REQ_GETFRAGSIZ, &bucket_size) == -1) + bucket_size = audio_buffer_size * Bps; + bucket_time = (double)bucket_size / Bps / play_mode->rate; + if(IS_STREAM_TRACE) { - if(play_mode->acntl(PM_REQ_GETFRAGSIZ, &bucket_size) == -1) - bucket_size = AUDIO_BUFFER_SIZE * Bps; if(play_mode->acntl(PM_REQ_GETQSIZ, &device_qsize) == -1) device_qsize = estimate_queue_size(); - else - { - double t; - t = (double)device_qsize / Bps / play_mode->rate; - if(t > MAX_FILLED_TIME) - device_qsize = play_mode->rate * MAX_FILLED_TIME * Bps; - while(bucket_size * 2 > device_qsize) - bucket_size /= 2; - } - - bucket_time = (double)bucket_size / Bps / play_mode->rate; - while(bucket_time > MAX_BUCKET_TIME) - { - bucket_size /= 2; - bucket_time = (double)bucket_size / Bps / play_mode->rate; + if(bucket_size * 2 > device_qsize) { + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, + "Warning: Audio buffer is too small."); + device_qsize = 0; + } else { + device_qsize -= device_qsize % Bps; /* Round Bps */ + ctl->cmsg(CMSG_INFO, VERB_DEBUG, + "Audio device queue size: %d bytes", device_qsize); + ctl->cmsg(CMSG_INFO, VERB_DEBUG, + "Write bucket size: %d bytes (%d msec)", + bucket_size, (int)(bucket_time * 1000 + 0.5)); } - device_qsize -= device_qsize % Bps; /* Round Bps */ - ctl->cmsg(CMSG_INFO, VERB_DEBUG, - "Audio device queue size: %d bytes", device_qsize); - ctl->cmsg(CMSG_INFO, VERB_DEBUG, - "Write bucket size: %d bytes (%d msec)", - bucket_size, (int)(bucket_time * 1000 + 0.5)); } else { @@ -181,9 +175,6 @@ static double last_soft_buff_time, last_fill_start_time; int nb; - if(!IS_STREAM_TRACE) - return; /* Ignore */ - /* for re-initialize */ if(soft_buff_time < 0) soft_buff_time = last_soft_buff_time; @@ -197,9 +188,7 @@ aq_start_count = (int32)(fill_start_time * play_mode->rate); aq_fill_buffer_flag = (aq_start_count > 0); -#ifndef __W32__ if(nbuckets != nb) -#endif /* __W32__ */ { nbuckets = nb; alloc_soft_queue(); @@ -265,9 +254,9 @@ { ctl->cmsg(CMSG_ERROR, VERB_NOISY, "Can't estimate audio queue length"); - bucket_size = AUDIO_BUFFER_SIZE * Bps; + bucket_size = audio_buffer_size * Bps; free(nullsound); - return 2 * AUDIO_BUFFER_SIZE * Bps; + return 2 * audio_buffer_size * Bps; } ctl->cmsg(CMSG_WARNING, VERB_DEBUG, @@ -283,19 +272,13 @@ return qbytes; } -/* In some audio implementation (such as win_a.c), device_qsize is - * changed if size of output is different. Then split into bucket_size - * to apply play_mode->output_data() - */ +/* Send audio data to play_mode->output_data() */ static int aq_output_data(char *buff, int nbytes) { int i; play_counter += nbytes / Bps; - if(!(play_mode->flag & PF_CAN_TRACE)) - return play_mode->output_data(buff, nbytes); - while(nbytes > 0) { i = nbytes; @@ -306,6 +289,7 @@ nbytes -= i; buff += i; } + return 0; } @@ -329,8 +313,8 @@ nbytes = general_output_convert(samples, count); buff = (char *)samples; - if(nbuckets == 0) - return aq_output_data(buff, nbytes); + if(device_qsize == 0) + return play_mode->output_data(buff, nbytes); aq_fill_buffer_flag = (aq_add_count <= aq_start_count); @@ -344,8 +328,11 @@ { buff += i; nbytes -= i; - if(aq_fill_one() == -1) - return -1; + if(head && head->len == bucket_size) + { + if(aq_fill_one() == -1) + return -1; + } aq_fill_buffer_flag = 0; } return 0; @@ -378,14 +365,13 @@ { free(base_buckets[0].data); free(base_buckets); + base_buckets = NULL; } - if(nbuckets > 0) - { - base_buckets = (AudioBucket *)safe_malloc(nbuckets * sizeof(AudioBucket)); - base = (char *)safe_malloc(nbuckets * bucket_size); - for(i = 0; i < nbuckets; i++) - base_buckets[i].data = base + i * bucket_size; - } + + base_buckets = (AudioBucket *)safe_malloc(nbuckets * sizeof(AudioBucket)); + base = (char *)safe_malloc(nbuckets * bucket_size); + for(i = 0; i < nbuckets; i++) + base_buckets[i].data = base + i * bucket_size; flush_buckets(); } @@ -396,12 +382,7 @@ if(head == NULL) return 0; - if((play_mode->flag & PF_PCM_STREAM) && head->len < bucket_size) { - /* are there any probrems using 0 as the silence code? */ - memset (head->data + head->len, 0, bucket_size - head->len); - head->len = bucket_size; - } - if(aq_output_data(head->data, head->len) == -1) + if(aq_output_data(head->data, bucket_size) == -1) return -1; tmp = head; head = head->next; @@ -465,7 +446,7 @@ if(es >= play_counter) { /* Ouch! - * Audio device queue must be empty! + * Audio device queue may be empty! * Reset counters. */ @@ -553,6 +534,12 @@ while(head) { + if(head->len < bucket_size) + { + /* Add silence code */ + memset (head->data + head->len, 0, bucket_size - head->len); + head->len = bucket_size; + } if(aq_fill_one() == -1) return RC_ERROR; trace_loop(); @@ -657,6 +644,9 @@ if(n == 0) return 0; + + if(!nbuckets) + return play_mode->output_data((char *)buf, n); if(head == NULL) head = tail = next_allocated_bucket(); diff -ruN TiMidity++-2.9.5/timidity/au_a.c TiMidity++-2.10.0/timidity/au_a.c --- TiMidity++-2.9.5/timidity/au_a.c Mon Feb 7 08:01:25 2000 +++ TiMidity++-2.10.0/timidity/au_a.c Mon Jul 24 17:11:50 2000 @@ -48,8 +48,12 @@ #endif #include "timidity.h" +#include "common.h" #include "output.h" #include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ static void close_output(void); @@ -66,7 +70,7 @@ -1, {0,0,0,0,0}, "Sun audio file", 'u', - "output.au", + NULL, open_output, close_output, output_data, @@ -87,22 +91,20 @@ { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; } -static int write_str(char *s) +static int write_str(const char *s) { int n; if((n = write(dpm.fd, s, strlen(s))) == -1) { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + close_output(); return -1; } return n; @@ -114,9 +116,99 @@ #define AUDIO_FILE_ENCODING_LINEAR_16 3 /* 16-bit linear PCM */ #define AUDIO_FILE_ENCODING_ALAW_8 27 /* 8-bit ISDN A-law */ +static int au_output_open(const char *fname, const char *comment) +{ + if(strcmp(fname, "-") == 0) { + dpm.fd = 1; /* data to stdout */ + if(comment == NULL) + comment = "(stdout)"; + } else { + /* Open the audio file */ + dpm.fd = open(fname, FILE_OUTPUT_MODE); + if(dpm.fd < 0) { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + fname, strerror(errno)); + return -1; + } + if(comment == NULL) + comment = fname; + } + + /* magic */ + if(write_str(".snd") == -1) return -1; + + /* header size */ + if(write_u32((uint32)(24 + strlen(comment))) == -1) return -1; + + /* sample data size */ + if(write_u32((uint32)0xffffffff) == -1) return -1; + + /* audio file encoding */ + if(dpm.encoding & PE_ULAW) { + if(write_u32((uint32)AUDIO_FILE_ENCODING_MULAW_8) == -1) return -1; + } else if(dpm.encoding & PE_ALAW) { + if(write_u32((uint32)AUDIO_FILE_ENCODING_ALAW_8) == -1) return -1; + } else if(dpm.encoding & PE_16BIT) { + if(write_u32((uint32)AUDIO_FILE_ENCODING_LINEAR_16) == -1) return -1; + } else { + if(write_u32((uint32)AUDIO_FILE_ENCODING_LINEAR_8) == -1) return -1; + } + + /* sample rate */ + if(write_u32((uint32)dpm.rate) == -1) return -1; + + /* number of channels */ + if(dpm.encoding & PE_MONO) { + if(write_u32((uint32)1) == -1) return -1; + } else { + if(write_u32((uint32)2) == -1) return -1; + } + + /* comment */ + if(write_str(comment) == -1) return -1; + + return 0; +} + +static int auto_au_output_open(const char *input_filename) +{ + char *output_filename = (char *)safe_malloc(strlen(input_filename) + 5); + char *ext, *p; + + strcpy(output_filename, input_filename); + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + else { + /* strip ".gz" */ + if(strcasecmp(ext, ".gz") == 0) { + *ext = '\0'; + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + } + } + + /* replace '.' and '#' before ext */ + for(p = output_filename; p < ext; p++) + if(*p == '.' || *p == '#') + *p = '_'; + + if(*ext && isupper(*(ext + 1))) + strcpy(ext, ".AU"); + else + strcpy(ext, ".au"); + if(au_output_open(output_filename, input_filename) == -1) { + free(output_filename); + return -1; + } + if(dpm.name != NULL) + free(dpm.name); + dpm.name = output_filename; + ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Output %s", dpm.name); + return 0; +} + static int open_output(void) { - char *comment = ""; int include_enc, exclude_enc; include_enc = exclude_enc = 0; @@ -136,69 +228,17 @@ } dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc); - bytes_output = 0; - - if(dpm.name && dpm.name[0] == '-' && dpm.name[1] == '\0') - { - dpm.fd = 1; /* data to stdout */ - comment = "(stdout)"; - } - else - { - /* Open the audio file */ - dpm.fd = open(dpm.name, FILE_OUTPUT_MODE); - if(dpm.fd < 0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", - dpm.name, strerror(errno)); - return -1; - } - comment = dpm.name; - } - - /* magic */ - if(write_str(".snd") == -1) return -1; - - /* header size */ - if(write_u32((uint32)(24 + strlen(comment))) == -1) return -1; - - /* sample data size */ - if(write_u32((uint32)0xffffffff) == -1) return -1; - - /* audio file encoding */ - if(dpm.encoding & PE_ULAW) - { - if(write_u32((uint32)AUDIO_FILE_ENCODING_MULAW_8) == -1) return -1; - } - else if(dpm.encoding & PE_ALAW) - { - if(write_u32((uint32)AUDIO_FILE_ENCODING_ALAW_8) == -1) return -1; - } - else if(dpm.encoding & PE_16BIT) - { - if(write_u32((uint32)AUDIO_FILE_ENCODING_LINEAR_16) == -1) return -1; - } - else - { - if(write_u32((uint32)AUDIO_FILE_ENCODING_LINEAR_8) == -1) return -1; - } - - /* sample rate */ - if(write_u32((uint32)dpm.rate) == -1) return -1; - /* number of channels */ - if(dpm.encoding & PE_MONO) - { - if(write_u32((uint32)1) == -1) return -1; - } - else - { - if(write_u32((uint32)2) == -1) return -1; + if(dpm.name == NULL) { + dpm.flag |= PF_AUTO_SPLIT_FILE; + dpm.name = NULL; + } else { + dpm.flag &= ~PF_AUTO_SPLIT_FILE; + if(au_output_open(dpm.name, NULL) == -1) + return -1; } - /* comment */ - if(write_str(comment) == -1) return -1; - + bytes_output = 0; next_bytes = bytes_output + UPDATE_HEADER_STEP; already_warning_lseek = 0; @@ -235,6 +275,9 @@ { int n; + if(dpm.fd == -1) + return -1; + while(((n = write(dpm.fd, buf, bytes)) == -1) && errno == EINTR) ; if(n == -1) @@ -258,25 +301,29 @@ static void close_output(void) { - if(dpm.fd != 1) /* We don't close stdout */ - { - if(dpm.fd != 1 && /* We don't close stdout */ - dpm.fd != -1) - { - if(update_header() == -1) - return; - close(dpm.fd); - dpm.fd = -1; - } - } + if(dpm.fd != 1 && /* We don't close stdout */ + dpm.fd != -1) { + update_header(); + close(dpm.fd); + dpm.fd = -1; + } } static int acntl(int request, void *arg) { - switch(request) - { - case PM_REQ_DISCARD: - return 0; + switch(request) { + case PM_REQ_PLAY_START: + if(dpm.flag & PF_AUTO_SPLIT_FILE) + return auto_au_output_open(current_file_info->filename); + break; + case PM_REQ_PLAY_END: + if(dpm.flag & PF_AUTO_SPLIT_FILE) { + close_output(); + return 0; } - return -1; + break; + case PM_REQ_DISCARD: + return 0; + } + return -1; } diff -ruN TiMidity++-2.9.5/timidity/common.c TiMidity++-2.10.0/timidity/common.c --- TiMidity++-2.9.5/timidity/common.c Mon May 8 13:29:16 2000 +++ TiMidity++-2.10.0/timidity/common.c Tue Aug 8 11:12:47 2000 @@ -519,6 +519,8 @@ return p; else { + if(count == 0) + return safe_malloc(1); errflag = 1; ctl->cmsg(CMSG_FATAL, VERB_NORMAL, "Sorry. Couldn't realloc %d bytes.", count); diff -ruN TiMidity++-2.9.5/timidity/controls.c TiMidity++-2.10.0/timidity/controls.c --- TiMidity++-2.9.5/timidity/controls.c Mon Feb 7 08:00:46 2000 +++ TiMidity++-2.10.0/timidity/controls.c Fri Jul 14 19:48:39 2000 @@ -135,6 +135,10 @@ extern ControlMode server_control_mode; #endif /* IA_SERVER */ +#ifdef IA_ALSASEQ +extern ControlMode alsaseq_control_mode; +#endif /* IA_ALSASEQ */ + /* Minimal control mode */ extern ControlMode dumb_control_mode; #ifndef DEFAULT_CONTROL_MODE @@ -193,6 +197,9 @@ #ifdef IA_SERVER &server_control_mode, #endif /* IA_SERVER */ +#ifdef IA_ALSASEQ + &alsaseq_control_mode, +#endif 0 }; diff -ruN TiMidity++-2.9.5/timidity/effect.c TiMidity++-2.10.0/timidity/effect.c --- TiMidity++-2.9.5/timidity/effect.c Mon Feb 7 08:00:07 2000 +++ TiMidity++-2.10.0/timidity/effect.c Mon Jul 17 13:14:17 2000 @@ -106,10 +106,10 @@ if(backoff > count) backoff = count; - if(count < AUDIO_BUFFER_SIZE * 2) + if(count < audio_buffer_size * 2) { - memset(buff + count, 0, 4 * (AUDIO_BUFFER_SIZE * 2 - count)); - count = AUDIO_BUFFER_SIZE * 2; + memset(buff + count, 0, 4 * (audio_buffer_size * 2 - count)); + count = audio_buffer_size * 2; } memcpy(save, buff, 4 * count); diff -ruN TiMidity++-2.9.5/timidity/esd_a.c TiMidity++-2.10.0/timidity/esd_a.c --- TiMidity++-2.9.5/timidity/esd_a.c Mon Feb 7 08:00:04 2000 +++ TiMidity++-2.10.0/timidity/esd_a.c Sat Jul 15 02:53:30 2000 @@ -60,7 +60,7 @@ PlayMode dpm = { DEFAULT_RATE, PE_16BIT|PE_SIGNED, - PF_PCM_STREAM|PF_CAN_TRACE|PF_BUFF_FRAGM_OPT, + PF_PCM_STREAM/*|PF_CAN_TRACE*/, -1, {0}, /* default: get all the buffer fragments you can */ "Enlightened sound daemon", 'e', @@ -109,6 +109,8 @@ static int output_data(char *buf, int32 nbytes) { int n; + + // write(1, buf, nbytes);return 0; while(nbytes > 0) { diff -ruN TiMidity++-2.9.5/timidity/oss_a.c TiMidity++-2.10.0/timidity/oss_a.c --- TiMidity++-2.9.5/timidity/oss_a.c Tue Apr 11 17:50:12 2000 +++ TiMidity++-2.10.0/timidity/oss_a.c Mon Jul 24 16:43:27 2000 @@ -203,7 +203,7 @@ #ifdef SNDCTL_DSP_SETFRAGMENT /* Set buffer fragments (in extra_param[0]) */ - tmp = AUDIO_BUFFER_BITS; + tmp = audio_buffer_bits; if(!(dpm.encoding & PE_MONO)) tmp++; if(dpm.encoding & PE_16BIT) tmp++; i = tmp; @@ -227,8 +227,11 @@ #endif #ifdef SNDCTL_DSP_GETOSPACE - if(ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) != -1) + if(ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) != -1) { total_bytes = info.fragstotal * info.fragsize; + ctl->cmsg(CMSG_INFO, VERB_NOISY, "Audio device buffer: %d x %d bytes", + info.fragstotal, info.fragsize); + } else #endif /* SNDCTL_DSP_GETOSPACE */ total_bytes = -1; /* Unknown */ @@ -266,7 +269,9 @@ } buf += n; nbytes -= n; +#ifdef SNDCTL_DSP_GETODELAY output_counter += n; +#endif } return 0; @@ -292,14 +297,6 @@ switch(request) { - case PM_REQ_DISCARD: - output_counter = 0; - return ioctl(dpm.fd, SNDCTL_DSP_RESET); - - case PM_REQ_FLUSH: - output_counter = 0; - return ioctl(dpm.fd, SNDCTL_DSP_SYNC); - case PM_REQ_RATE: i = *(int *)arg; /* sample rate in and out */ if(ioctl(dpm.fd, SNDCTL_DSP_SPEED, &i) < 0) @@ -314,9 +311,18 @@ return 0; #ifdef SNDCTL_DSP_GETODELAY + case PM_REQ_DISCARD: + output_counter = 0; + return ioctl(dpm.fd, SNDCTL_DSP_RESET); + + case PM_REQ_FLUSH: + output_counter = 0; + return ioctl(dpm.fd, SNDCTL_DSP_SYNC); + case PM_REQ_GETFILLED: if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) return -1; + if (i > total_bytes) i = total_bytes; if(!(dpm.encoding & PE_MONO)) i >>= 1; if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; @@ -325,21 +331,39 @@ case PM_REQ_GETFILLABLE: if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) return -1; - i = total_bytes - i; + if (i > total_bytes) i = 0; + else i = total_bytes - i; if(!(dpm.encoding & PE_MONO)) i >>= 1; if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; return 0; case PM_REQ_GETSAMPLES: - if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) + if(ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) return -1; i = output_counter - i; if(!(dpm.encoding & PE_MONO)) i >>= 1; if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; return 0; + #else /* SNDCTL_DSP_GETODELAY */ + case PM_REQ_DISCARD: + if(ioctl(dpm.fd, SNDCTL_DSP_RESET) == -1) + return -1; + if(ioctl(dpm.fd, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + return -1; + output_counter = cinfo.bytes; + return 0; + + case PM_REQ_FLUSH: + if(ioctl(dpm.fd, SNDCTL_DSP_SYNC) == -1) + return -1; + if(ioctl(dpm.fd, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + return -1; + output_counter = cinfo.bytes; + return 0; + # ifdef SNDCTL_DSP_GETOSPACE case PM_REQ_GETFILLABLE: if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETOSPACE, &info) == -1) @@ -360,12 +384,12 @@ if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; return 0; - # endif /* SNDCTL_DSP_GETOSPACE */ + case PM_REQ_GETSAMPLES: - if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + if(ioctl(dpm.fd, SNDCTL_DSP_GETOPTR, &cinfo) == -1) return -1; - i = cinfo.bytes; + i = cinfo.bytes - output_counter; if(!(dpm.encoding & PE_MONO)) i >>= 1; if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; diff -ruN TiMidity++-2.9.5/timidity/output.c TiMidity++-2.10.0/timidity/output.c --- TiMidity++-2.9.5/timidity/output.c Mon Feb 7 07:57:31 2000 +++ TiMidity++-2.10.0/timidity/output.c Mon Jul 24 16:58:58 2000 @@ -36,14 +36,7 @@ #include "controls.h" #include "audio_cnv.h" - - -extern PlayMode alsa_play_mode; - - -extern PlayMode hpux_nplay_mode; - - +int audio_buffer_bits = DEFAULT_AUDIO_BUFFER_BITS; /* These are very likely mutually exclusive.. */ #if defined(AU_AUDRIV) @@ -95,9 +88,11 @@ /* These are always compiled in. */ extern PlayMode raw_play_mode, wave_play_mode, au_play_mode, aiff_play_mode; extern PlayMode list_play_mode; +#ifdef AU_VORBIS +extern PlayMode vorbis_play_mode; +#endif /* AU_VORBIS */ #endif /* !__MACOS__ */ - PlayMode *play_mode_list[] = { #ifdef DEV_PLAY_MODE DEV_PLAY_MODE, @@ -124,6 +119,9 @@ &raw_play_mode, &au_play_mode, &aiff_play_mode, +#ifdef AU_VORBIS + &vorbis_play_mode, +#endif /* AU_VORBIS */ &list_play_mode, #endif /* __MACOS__ */ 0 diff -ruN TiMidity++-2.9.5/timidity/output.h TiMidity++-2.10.0/timidity/output.h --- TiMidity++-2.9.5/timidity/output.h Mon Feb 7 07:57:28 2000 +++ TiMidity++-2.10.0/timidity/output.h Mon Jul 24 09:59:26 2000 @@ -113,6 +113,7 @@ #define PF_CAN_TRACE (1u<<2) /* Enable realtime tracing */ #define PF_BUFF_FRAGM_OPT (1u<<3) /* Enable set extra_param[0] to specify the number of audio buffer fragments */ +#define PF_AUTO_SPLIT_FILE (1u<<4) /* Split PCM files automatically */ #define IS_STREAM_TRACE ((play_mode->flag & (PF_PCM_STREAM|PF_CAN_TRACE)) == (PF_PCM_STREAM|PF_CAN_TRACE)) typedef struct { @@ -136,6 +137,8 @@ extern PlayMode *play_mode_list[], *play_mode; extern PlayMode *target_play_mode; +extern int audio_buffer_bits; +#define audio_buffer_size (1<= AUDIO_BUFFER_SIZE) + while ((count+buffered_count) >= audio_buffer_size) { int i; if((rc = apply_controls()) != RC_NONE) return rc; - do_compute_data(AUDIO_BUFFER_SIZE-buffered_count); - count -= AUDIO_BUFFER_SIZE-buffered_count; + do_compute_data(audio_buffer_size-buffered_count); + count -= audio_buffer_size-buffered_count; ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY, - "output data (%d)", AUDIO_BUFFER_SIZE); + "output data (%d)", audio_buffer_size); #ifdef SUPPORT_SOUNDSPEC - soundspec_update_wave(common_buffer, AUDIO_BUFFER_SIZE); + soundspec_update_wave(common_buffer, audio_buffer_size); #endif /* SUPPORT_SOUNDSPEC */ #if defined(CSPLINE_INTERPOLATION) || defined(LAGRANGE_INTERPOLATION) @@ -3628,7 +3628,7 @@ filled_limit = REDUCE_VOICE_TIME_TUNING; if(filled_limit > maxfill / 5) /* too small audio buffer */ { - rate_limit -= 100 * AUDIO_BUFFER_SIZE / maxfill / 5; + rate_limit -= 100 * audio_buffer_size / maxfill / 5; filled_limit = 1; } } @@ -3786,7 +3786,7 @@ } #endif - if(aq_add(common_buffer, AUDIO_BUFFER_SIZE) == -1) + if(aq_add(common_buffer, audio_buffer_size) == -1) return RC_ERROR; buffer_pointer=common_buffer; @@ -4717,7 +4717,7 @@ { first = 0; init_mblock(&playmidi_pool); - current_file_info = get_midi_file_info("TiMidity server", 1); + current_file_info = get_midi_file_info("TiMidity", 1); } else reuse_mblock(&playmidi_pool); diff -ruN TiMidity++-2.9.5/timidity/raw_a.c TiMidity++-2.10.0/timidity/raw_a.c --- TiMidity++-2.9.5/timidity/raw_a.c Mon Feb 7 07:57:16 2000 +++ TiMidity++-2.10.0/timidity/raw_a.c Mon Jul 24 15:56:10 2000 @@ -50,8 +50,12 @@ #endif #include "timidity.h" +#include "common.h" #include "output.h" #include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ static void close_output(void); @@ -67,7 +71,7 @@ -1, {0,0,0,0,0}, "Raw waveform data", 'r', - "output.raw", + NULL, open_output, close_output, output_data, @@ -76,30 +80,114 @@ /*************************************************************************/ -static int open_output(void) +/* + * Get the filename extention from the encoding + * This extension is available for sox. + */ +static const char *encoding_ext(int32 encoding) { + static char ext[4], *p; + + if(encoding & PE_ULAW) { + return ".ul"; + } + if(encoding & PE_ALAW) { + return ".raw"; /* ?? */ + } + + p = ext; + *p++ = '.'; + if(encoding & PE_SIGNED) + *p++ = 's'; + else + *p++ = 'u'; + if(encoding & PE_16BIT) + *p++ = 'w'; + else + *p++ = 'b'; + *p = '\0'; + return ext; +} + +static int raw_output_open(const char *fname) { - dpm.encoding = validate_encoding(dpm.encoding, 0, 0); + int fd; - if(dpm.name && dpm.name[0] == '-' && dpm.name[1] == '\0') - dpm.fd = 1; /* data to stdout */ - else - { - /* Open the audio file */ - dpm.fd = open(dpm.name, FILE_OUTPUT_MODE); - if(dpm.fd < 0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", - dpm.name, strerror(errno)); - return -1; - } + if(strcmp(fname, "-") == 0) + return 1; /* data to stdout */ + if((fd = open(fname, FILE_OUTPUT_MODE)) < 0) + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + fname, strerror(errno)); + return fd; +} + +static int auto_raw_output_open(const char *input_filename) +{ + + char *output_filename = (char *)safe_malloc(strlen(input_filename) + 5); + char *ext, *p; + + strcpy(output_filename, input_filename); + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + else { + /* strip ".gz" */ + if(strcasecmp(ext, ".gz") == 0) { + *ext = '\0'; + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); } - return 0; + } + + /* replace '.' and '#' before ext */ + for(p = output_filename; p < ext; p++) + if(*p == '.' || *p == '#') + *p = '_'; + + if(*ext && isupper(*(ext + 1))) { + strcpy(ext, encoding_ext(dpm.encoding)); + ext++; + while(*ext) { + if(islower(*ext)) + *ext = toupper(*ext); + ext++; + } + } else + strcpy(ext, encoding_ext(dpm.encoding)); + if((dpm.fd = raw_output_open(output_filename)) < 0) { + free(output_filename); + return -1; + } + if(dpm.name != NULL) + free(dpm.name); + dpm.name = output_filename; + ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Output %s", dpm.name); + return 0; + +} + +static int open_output(void) +{ + dpm.encoding = validate_encoding(dpm.encoding, 0, 0); + + if(dpm.name == NULL) { + dpm.flag |= PF_AUTO_SPLIT_FILE; + dpm.name = NULL; + } else { + dpm.flag &= ~PF_AUTO_SPLIT_FILE; + if((dpm.fd = raw_output_open(dpm.name)) == -1) + return -1; + } + + return 0; } static int output_data(char *buf, int32 bytes) { int n; + if(dpm.fd == -1) + return -1; + while(((n = write(dpm.fd, buf, bytes)) == -1) && errno == EINTR) ; if(n == -1) @@ -120,10 +208,19 @@ static int acntl(int request, void *arg) { - switch(request) - { - case PM_REQ_DISCARD: - return 0; + switch(request) { + case PM_REQ_PLAY_START: + if(dpm.flag & PF_AUTO_SPLIT_FILE) + return auto_raw_output_open(current_file_info->filename); + break; + case PM_REQ_PLAY_END: + if(dpm.flag & PF_AUTO_SPLIT_FILE) { + close_output(); + return 0; } - return -1; + break; + case PM_REQ_DISCARD: + return 0; + } + return -1; } diff -ruN TiMidity++-2.9.5/timidity/timidity.c TiMidity++-2.10.0/timidity/timidity.c --- TiMidity++-2.9.5/timidity/timidity.c Tue Jul 4 16:53:35 2000 +++ TiMidity++-2.10.0/timidity/timidity.c Thu Jul 20 02:42:35 2000 @@ -83,8 +83,8 @@ #include "w32g_utl.h" #endif -#define OPTCOMMANDS "4A:aB:b:C:c:D:d:E:eFfg:hI:i:jk:L:M:m:n:O:o:P:p:Q:q:R:rS:s:t:T:UW:w:x:Z:" -#define INTERACTIVE_INTERFACE_IDS "kmqagrw" +#define OPTCOMMANDS "4A:aB:b:C:c:D:d:E:eFfg:hI:i:jk:L:M:m:n:O:o:P:p:Q:q:R:rS:s:t:T:UW:w:x:Z:" /* Only GHJKlNuVvXz are remain... */ +#define INTERACTIVE_INTERFACE_IDS "kmqagrwA" /* main interfaces (To be used another main) */ #if defined(main) || defined(ANOTHER_MAIN) @@ -330,7 +330,7 @@ #endif " -A n Amplify volume by n percent (may cause clipping)", " -a Enable the antialiasing filter", -" -B n Set number of buffer fragments", +" -B n,m Set number of buffer fragments(n), and buffer size(2^m)", " -C n Set ratio of sampling and control frequencies", " -c file Read extra configuration file", " -D n Play drums on channel n", @@ -2421,6 +2421,29 @@ #endif /* SUPPORT_SOUNDSPEC */ int opt_buffer_fragments = -1; +static int parse_opt_B(char *opt) +{ + char *p; + int32 val; + + /* num */ + if(*opt != ',') { + if(set_value(&val, atoi(opt), 0, 1000, "Buffer fragments (num)")) + return -1; + if(val >= 0) + opt_buffer_fragments = val; + } + + /* bits */ + if((p = strchr(opt, ',')) != NULL) { + if(set_value(&val, atoi(p + 1), 0, AUDIO_BUFFER_BITS, "Buffer fragments (bit)")) + return -1; + if(val >= 0) + audio_buffer_bits = val; + } + return 0; +} + MAIN_INTERFACE int set_tim_opt(int c, char *optarg) { int32 tmpi32; @@ -2444,9 +2467,14 @@ break; case 'B': + if(parse_opt_B(optarg)) + return 1; + break; +#if 0 if(set_value(&tmpi32, atoi(optarg), 0, 1000, "Buffer fragments")) return 1; opt_buffer_fragments = tmpi32; +#endif break; case 'b': @@ -2732,7 +2760,7 @@ s[2] = '\n'; write(2, s, 3); - if(sig == SIGINT && intr < 3) + if(sig == SIGINT && intr < 0) { intr++; signal(SIGINT, sigterm_exit); /* For SysV base */ @@ -3359,7 +3387,7 @@ nfiles = argc - optind; files = argv + optind; - if(nfiles > 0 && ctl->id_character != 'r') + if(nfiles > 0 && ctl->id_character != 'r' && ctl->id_character != 'A') files = expand_file_archives(files, &nfiles); if(dumb_error_count) sleep(1); diff -ruN TiMidity++-2.9.5/timidity/timidity.h TiMidity++-2.10.0/timidity/timidity.h --- TiMidity++-2.9.5/timidity/timidity.h Mon Feb 7 07:55:37 2000 +++ TiMidity++-2.10.0/timidity/timidity.h Fri Jul 14 19:14:14 2000 @@ -130,10 +130,15 @@ You should probably use a larger number for improved performance. */ + +#define AUDIO_BUFFER_BITS 12 /* Maxmum audio buffer size (2^bits) */ + +#ifndef DEFAULT_AUDIO_BUFFER_BITS #ifdef __W32__ -#define AUDIO_BUFFER_BITS 12 +#define DEFAULT_AUDIO_BUFFER_BITS 12 #else -#define AUDIO_BUFFER_BITS 11 +#define DEFAULT_AUDIO_BUFFER_BITS 11 +#endif #endif diff -ruN TiMidity++-2.9.5/timidity/vorbis_a.c TiMidity++-2.10.0/timidity/vorbis_a.c --- TiMidity++-2.9.5/timidity/vorbis_a.c Thu Jan 1 09:00:00 1970 +++ TiMidity++-2.10.0/timidity/vorbis_a.c Tue Aug 8 10:44:01 2000 @@ -0,0 +1,329 @@ +/* + TiMidity++ -- MIDI to WAVE converter and player + Copyright (C) 1999,2000 Masanao Izumo + Copyright (C) 1995 Tuukka Toivonen + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + ogg_a.c + + Functions to output Ogg Vorbis (*.ogg). +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ +#include + +#ifdef __W32__ +#include +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ + +#ifndef NO_STRING_H +#include +#else +#include +#endif +#include +#include + +#include "timidity.h" +#include "common.h" +#include "output.h" +#include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" + +static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ +static void close_output(void); +static int output_data(char *buf, int32 bytes); +static int acntl(int request, void *arg); + +/* export the playback mode */ +#define dpm vorbis_play_mode + +PlayMode dpm = { + 44100, PE_16BIT|PE_SIGNED, PF_PCM_STREAM, + -1, + {0,0,0,0,0}, + "Ogg Vorbis", 'v', + NULL, + open_output, + close_output, + output_data, + acntl +}; + +static ogg_stream_state os; /* take physical pages, weld into a logical + stream of packets */ +static vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ +static vorbis_block vb; /* local working space for packet->PCM decode */ + + +/*************************************************************************/ + +static int ogg_output_open(const char *fname, const char *comment) +{ + int fd; + static vorbis_info ogg_info; + vorbis_info *vi; /* struct that stores all the static vorbis bitstream + settings */ + vorbis_comment vc; /* struct that stores all the user comments */ + + + if(strcmp(fname, "-") == 0) { + fd = 1; /* data to stdout */ + if(comment == NULL) + comment = "(stdout)"; + } else { + /* Open the audio file */ + fd = open(fname, FILE_OUTPUT_MODE); + if(fd < 0) { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + fname, strerror(errno)); + return -1; + } + if(comment == NULL) + comment = fname; + } + + /* choose an encoding mode */ + /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */ + memcpy(&ogg_info, &info_A, sizeof(ogg_info)); + if(dpm.encoding & PE_MONO) + ogg_info.channels = 1; + else + ogg_info.channels = 2; + ogg_info.rate = dpm.rate; + + vi = &ogg_info; + + /* add a comment */ + vorbis_comment_init(&vc); + vorbis_comment_add(&vc, (char *)comment); + + /* set up the analysis state and auxiliary encoding storage */ + vorbis_analysis_init(&vd, vi); + vorbis_block_init(&vd, &vb); + + /* set up our packet->stream encoder */ + /* pick a random serial number; that way we can more likely build + chained streams just by concatenation */ + srand(time(NULL)); + ogg_stream_init(&os, rand()); + + /* Vorbis streams begin with three headers; the initial header (with + most of the codec setup parameters) which is mandated by the Ogg + bitstream spec. The second header holds any comment fields. The + third header holds the bitstream codebook. We merely need to + make the headers, then pass them to libvorbis one at a time; + libvorbis handles the additional Ogg bitstream constraints */ + + { + ogg_packet header; + ogg_packet header_comm; + ogg_packet header_code; + + vorbis_analysis_headerout(&vd, &vc, &header, &header_comm, &header_code); + ogg_stream_packetin(&os, &header); /* automatically placed in its own + page */ + ogg_stream_packetin(&os, &header_comm); + ogg_stream_packetin(&os, &header_code); + + /* no need to write out here. We'll get to that in the main loop */ + } + + return fd; +} + +static int auto_ogg_output_open(const char *input_filename) +{ + char *output_filename = (char *)safe_malloc(strlen(input_filename) + 5); + char *ext, *p; + + strcpy(output_filename, input_filename); + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + else { + /* strip ".gz" */ + if(strcasecmp(ext, ".gz") == 0) { + *ext = '\0'; + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + } + } + + /* replace '.' and '#' before ext */ + for(p = output_filename; p < ext; p++) + if(*p == '.' || *p == '#') + *p = '_'; + + if(*ext && isupper(*(ext + 1))) + strcpy(ext, ".OGG"); + else + strcpy(ext, ".ogg"); + if((dpm.fd = ogg_output_open(output_filename, input_filename)) == -1) { + free(output_filename); + return -1; + } + if(dpm.name != NULL) + free(dpm.name); + dpm.name = output_filename; + ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Output %s", dpm.name); + return 0; +} + +static int open_output(void) +{ + int include_enc, exclude_enc; + + /********** Encode setup ************/ + + include_enc = exclude_enc = 0; + + /* only 16 bit is supported */ + include_enc |= PE_16BIT|PE_SIGNED; + exclude_enc |= PE_BYTESWAP; + dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc); + + if(dpm.name == NULL) { + dpm.flag |= PF_AUTO_SPLIT_FILE; + dpm.name = NULL; + } else { + dpm.flag &= ~PF_AUTO_SPLIT_FILE; + if((dpm.fd = ogg_output_open(dpm.name, NULL)) == -1) + return -1; + } + + return 0; +} + +static int output_data(char *readbuffer, int32 bytes) +{ + int i, j, ch = ((dpm.encoding & PE_MONO) ? 1 : 2); + double **buffer; + int16 *samples = (int16 *)readbuffer; + int nsamples = bytes / (2 * ch); + ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ + ogg_packet op; /* one raw packet of data for decode */ + + /* data to encode */ + + /* expose the buffer to submit data */ + buffer = vorbis_analysis_buffer(&vd, nsamples); + + /* uninterleave samples */ + for(j = 0; j < ch; j++) + for(i = 0; i < nsamples; i++) + buffer[j][i] = samples[i*ch+j] * (1.0/32768.0); + + /* tell the library how much we actually submitted */ + vorbis_analysis_wrote(&vd, nsamples); + + /* vorbis does some data preanalysis, then divvies up blocks for + more involved (potentially parallel) processing. Get a single + block for encoding now */ + while(vorbis_analysis_blockout(&vd, &vb) == 1) { + + /* analysis */ + vorbis_analysis(&vb, &op); + + /* weld the packet into the bitstream */ + ogg_stream_packetin(&os, &op); + + /* write out pages (if any) */ + while(ogg_stream_pageout(&os, &og) != 0) { + write(dpm.fd, og.header, og.header_len); + write(dpm.fd, og.body, og.body_len); + } + } + return 0; +} + +static void close_output(void) +{ + int eos = 0; + ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ + ogg_packet op; /* one raw packet of data for decode */ + + if(dpm.fd < 0) + return; + + /* end of file. this can be done implicitly in the mainline, + but it's easier to see here in non-clever fashion. + Tell the library we're at end of stream so that it can handle + the last frame and mark end of stream in the output properly */ + vorbis_analysis_wrote(&vd, 0); + + /* vorbis does some data preanalysis, then divvies up blocks for + more involved (potentially parallel) processing. Get a single + block for encoding now */ + while(vorbis_analysis_blockout(&vd, &vb) == 1) { + + /* analysis */ + vorbis_analysis(&vb, &op); + + /* weld the packet into the bitstream */ + ogg_stream_packetin(&os, &op); + + /* write out pages (if any) */ + while(!eos){ + int result = ogg_stream_pageout(&os,&og); + if(result == 0) + break; + write(dpm.fd, og.header, og.header_len); + write(dpm.fd, og.body, og.body_len); + + /* this could be set above, but for illustrative purposes, I do + it here (to show that vorbis does know where the stream ends) */ + + if(ogg_page_eos(&og)) + eos = 1; + } + } + + /* clean up and exit. vorbis_info_clear() must be called last */ + + ogg_stream_clear(&os); + vorbis_block_clear(&vb); + vorbis_dsp_clear(&vd); + close(dpm.fd); + dpm.fd = -1; +} + +static int acntl(int request, void *arg) +{ + switch(request) { + case PM_REQ_PLAY_START: + if(dpm.flag & PF_AUTO_SPLIT_FILE) + return auto_ogg_output_open(current_file_info->filename); + break; + case PM_REQ_PLAY_END: + if(dpm.flag & PF_AUTO_SPLIT_FILE) { + close_output(); + return 0; + } + break; + case PM_REQ_DISCARD: + return 0; + } + return -1; +} diff -ruN TiMidity++-2.9.5/timidity/w32_a.c TiMidity++-2.10.0/timidity/w32_a.c --- TiMidity++-2.9.5/timidity/w32_a.c Mon Feb 7 07:55:28 2000 +++ TiMidity++-2.10.0/timidity/w32_a.c Tue Aug 8 12:39:07 2000 @@ -137,8 +137,8 @@ static int acntl (int request, void * arg); #ifdef IA_W32GUI -volatile int data_block_time = 400; // Milliseconds -volatile int data_block_num = 20; +volatile int data_block_bits = DEFAULT_AUDIO_BUFFER_BITS; +volatile int data_block_num = 64; #endif #define DATA_BLOCK_SIZE (4 * AUDIO_BUFFER_SIZE) diff -ruN TiMidity++-2.9.5/timidity/w32g_a.c TiMidity++-2.10.0/timidity/w32g_a.c --- TiMidity++-2.9.5/timidity/w32g_a.c Mon Feb 7 07:55:24 2000 +++ TiMidity++-2.10.0/timidity/w32g_a.c Tue Aug 8 12:39:07 2000 @@ -140,9 +140,10 @@ // #define DATA_BLOCK_NUM (dpm.extra_param[0]) #define DATA_BLOCK_NUM 16 #define DATA_MIN_NBLOCKS (DATA_BLOCK_NUM-1) -volatile int data_block_size = 4*AUDIO_BUFFER_SIZE*4; -volatile int data_block_time = 400; // msec -volatile int data_block_num = 20; +static int data_block_size; +static int data_block_time; // msec +volatile int data_block_bits = DEFAULT_AUDIO_BUFFER_BITS; +volatile int data_block_num = 64; volatile struct data_block_t { HGLOBAL data_hg; @@ -394,11 +395,18 @@ "functionality supported by driver: 0x%x", caps.dwSupport); /* Prepere audio queue buffer */ - data_block_size = (int)((double)wf.nAvgBytesPerSec * data_block_time / 1000); +// data_block_size = (int)((double)wf.nAvgBytesPerSec * data_block_time / 1000); + data_block_size = audio_buffer_size; + if(!(dpm.encoding & PE_MONO)) + data_block_size *= 2; + if(dpm.encoding & PE_16BIT) + data_block_size *= 2; + data_block_time = data_block_size * 1000 / wf.nAvgBytesPerSec; + // PrintfDebugWnd("DATA_BLOCK_SIZE: %ld\n",data_block_size); all_data_block = (struct data_block_t *) - safe_malloc(data_block_num * sizeof(struct data_block_t)); - all_data_block_used_flag = (int *)safe_malloc(data_block_num * sizeof(int)); + safe_malloc(data_block_num * sizeof(struct data_block_t)); + all_data_block_used_flag = (int *)safe_malloc(data_block_num * sizeof(int)); for(i = 0; i < data_block_num; i++) { struct data_block_t *block; @@ -526,16 +534,8 @@ { switch(request) { - case PM_REQ_GETQSIZ: -#if 0 - *(int *)arg = data_block_num * AUDIO_BUFFER_SIZE; - if(!(dpm.encoding & PE_MONO)) - *(int *)arg *= 2; - if(dpm.encoding & PE_16BIT) - *(int *)arg *= 2; -#else - *(int *)arg = data_block_num * data_block_size; -#endif + case PM_REQ_GETQSIZ: + *(int *)arg = data_block_num * audio_buffer_size; return 0; case PM_REQ_DISCARD: case PM_REQ_FLUSH: diff -ruN TiMidity++-2.9.5/timidity/wave_a.c TiMidity++-2.10.0/timidity/wave_a.c --- TiMidity++-2.9.5/timidity/wave_a.c Mon Feb 7 07:55:21 2000 +++ TiMidity++-2.10.0/timidity/wave_a.c Mon Jul 24 16:54:53 2000 @@ -47,10 +47,15 @@ #ifdef __FreeBSD__ #include #endif +#include #include "timidity.h" +#include "common.h" #include "output.h" #include "controls.h" +#include "instrum.h" +#include "playmidi.h" +#include "readmidi.h" static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ static void close_output(void); @@ -72,7 +77,7 @@ -1, {0,0,0,0,0}, "RIFF WAVE file", 'w', - "output.wav", + NULL, open_output, close_output, output_data, @@ -110,10 +115,111 @@ #define WAVE_FORMAT_MULAW 0x07 +static int wav_output_open(const char *fname) +{ + int t; + char RIFFheader[44]; + int fd; + + if(strcmp(fname, "-") == 0) + fd = 1; /* data to stdout */ + else { + /* Open the audio file */ + fd = open(fname, FILE_OUTPUT_MODE); + if(fd < 0) { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + fname, strerror(errno)); + return -1; + } + } + + /* Generate a (rather non-standard) RIFF header. We don't know yet + what the block lengths will be. We'll fix that at close if this + is a seekable file. */ + + memcpy(RIFFheader, orig_RIFFheader, 44); + + if(dpm.encoding & PE_ALAW) + RIFFheader[20] = WAVE_FORMAT_ALAW; + else if(dpm.encoding & PE_ULAW) + RIFFheader[20] = WAVE_FORMAT_MULAW; + else + RIFFheader[20] = WAVE_FORMAT_PCM; + + if(dpm.encoding & PE_MONO) + RIFFheader[22] = 1; + else + RIFFheader[22] = 2; + + *((int *)(RIFFheader+24)) = LE_LONG(dpm.rate); + + t = dpm.rate; + if(!(dpm.encoding & PE_MONO)) t *= 2; + if(dpm.encoding & PE_16BIT) t *= 2; + *((int *)(RIFFheader+28)) = LE_LONG(t); + + /* Bug fixed from Masaaki Koyanagi */ + if((dpm.encoding & (PE_MONO | PE_16BIT)) == PE_MONO) + RIFFheader[32]='\001'; + else if (!(dpm.encoding & PE_MONO) && (dpm.encoding & PE_16BIT)) + RIFFheader[32]='\004'; + else + RIFFheader[32]='\002'; + + if(dpm.encoding & PE_16BIT) + RIFFheader[34] = 16; + else + RIFFheader[34] = 8; + + if(write(fd, RIFFheader, 44) == -1) { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", + dpm.name, strerror(errno)); + close_output(); + return -1; + } + + return fd; +} + +static int auto_wav_output_open(const char *input_filename) +{ + char *output_filename = (char *)safe_malloc(strlen(input_filename) + 5); + char *ext, *p; + + strcpy(output_filename, input_filename); + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + else { + /* strip ".gz" */ + if(strcasecmp(ext, ".gz") == 0) { + *ext = '\0'; + if((ext = strrchr(output_filename, '.')) == NULL) + ext = output_filename + strlen(output_filename); + } + } + + /* replace '.' and '#' before ext */ + for(p = output_filename; p < ext; p++) + if(*p == '.' || *p == '#') + *p = '_'; + + if(*ext && isupper(*(ext + 1))) + strcpy(ext, ".WAV"); + else + strcpy(ext, ".wav"); + if((dpm.fd = wav_output_open(output_filename)) == -1) { + free(output_filename); + return -1; + } + if(dpm.name != NULL) + free(dpm.name); + dpm.name = output_filename; + ctl->cmsg(CMSG_INFO, VERB_NORMAL, "Output %s", dpm.name); + return 0; +} + static int open_output(void) { - char RIFFheader[44]; - int t; int include_enc, exclude_enc; include_enc = exclude_enc = 0; @@ -133,64 +239,12 @@ dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc); - if (dpm.name && dpm.name[0]=='-' && dpm.name[1]=='\0') - dpm.fd = 1; /* data to stdout */ - else - { - /* Open the audio file */ - dpm.fd = open(dpm.name, FILE_OUTPUT_MODE); - if(dpm.fd<0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", - dpm.name, strerror(errno)); - return -1; - } - } - - /* Generate a (rather non-standard) RIFF header. We don't know yet - what the block lengths will be. We'll fix that at close if this - is a seekable file. */ - - memcpy(RIFFheader, orig_RIFFheader, 44); - - if(dpm.encoding & PE_ALAW) - RIFFheader[20] = WAVE_FORMAT_ALAW; - else if(dpm.encoding & PE_ULAW) - RIFFheader[20] = WAVE_FORMAT_MULAW; - else - RIFFheader[20] = WAVE_FORMAT_PCM; - - if(dpm.encoding & PE_MONO) - RIFFheader[22] = 1; - else - RIFFheader[22] = 2; - - *((int *)(RIFFheader+24)) = LE_LONG(dpm.rate); - - t = dpm.rate; - if(!(dpm.encoding & PE_MONO)) t *= 2; - if(dpm.encoding & PE_16BIT) t *= 2; - *((int *)(RIFFheader+28)) = LE_LONG(t); - - /* Bug fixed from Masaaki Koyanagi */ - if((dpm.encoding & (PE_MONO | PE_16BIT)) == PE_MONO) - RIFFheader[32]='\001'; - else if (!(dpm.encoding & PE_MONO) && (dpm.encoding & PE_16BIT)) - RIFFheader[32]='\004'; - else - RIFFheader[32]='\002'; - - if(dpm.encoding & PE_16BIT) - RIFFheader[34] = 16; - else - RIFFheader[34] = 8; - - if(write(dpm.fd, RIFFheader, 44) == -1) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: write: %s", - dpm.name, strerror(errno)); - close(dpm.fd); - dpm.fd = -1; + if(dpm.name == NULL) { + dpm.flag |= PF_AUTO_SPLIT_FILE; + dpm.name = NULL; + } else { + dpm.flag &= ~PF_AUTO_SPLIT_FILE; + if((dpm.fd = wav_output_open(dpm.name)) == -1) return -1; } @@ -241,6 +295,9 @@ { int n; + if(dpm.fd == -1) + return -1; + while(((n = write(dpm.fd, buf, bytes)) == -1) && errno == EINTR) ; if(n == -1) @@ -276,10 +333,19 @@ static int acntl(int request, void *arg) { - switch(request) - { - case PM_REQ_DISCARD: - return 0; + switch(request) { + case PM_REQ_PLAY_START: + if(dpm.flag & PF_AUTO_SPLIT_FILE) + return auto_wav_output_open(current_file_info->filename); + break; + case PM_REQ_PLAY_END: + if(dpm.flag & PF_AUTO_SPLIT_FILE) { + close_output(); + return 0; } - return -1; + break; + case PM_REQ_DISCARD: + return 0; + } + return -1; }