From sumomo @ users.sourceforge.jp Fri Mar 4 12:01:48 2011 From: sumomo @ users.sourceforge.jp (sumomo @ users.sourceforge.jp) Date: Fri, 04 Mar 2011 12:01:48 +0900 Subject: [Julius-cvs 625] CVS update: julius4/libsent/include/sent Message-ID: <1299207708.528158.19912.nullmailer@users.sourceforge.jp> Index: julius4/libsent/include/sent/adin.h diff -u julius4/libsent/include/sent/adin.h:1.8 julius4/libsent/include/sent/adin.h:1.9 --- julius4/libsent/include/sent/adin.h:1.8 Thu Feb 24 19:07:03 2011 +++ julius4/libsent/include/sent/adin.h Fri Mar 4 12:01:48 2011 @@ -19,7 +19,7 @@ * @author Akinobu LEE * @date Thu Feb 10 17:22:36 2005 * - * $Revision: 1.8 $ + * $Revision: 1.9 $ */ /* * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University @@ -34,21 +34,6 @@ #include #include -#if defined(HAVE_ALSA_ASOUNDLIB_H) || defined(HAVE_SYS_ASOUNDLIB_H) -#define HAS_ALSA -#endif -#ifdef __linux__ -#if defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_MACHINE_SOUNDCARD_H) -#define HAS_OSS -#endif -#endif /* __linux__ */ -#ifdef HAVE_ESD_H -#define HAS_ESD -#endif -#ifdef HAVE_PULSE_SIMPLE_H -#define HAS_PULSEAUDIO -#endif - /// Speech input type enum { INPUT_WAVEFORM, Index: julius4/libsent/include/sent/config.h.in diff -u julius4/libsent/include/sent/config.h.in:1.7 julius4/libsent/include/sent/config.h.in:1.8 --- julius4/libsent/include/sent/config.h.in:1.7 Thu Feb 24 19:07:03 2011 +++ julius4/libsent/include/sent/config.h.in Fri Mar 4 12:01:48 2011 @@ -33,7 +33,7 @@ * @author Akinobu LEE * @date Thu Feb 10 17:48:32 2005 * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * */ @@ -142,5 +142,17 @@ /* Define if exist */ #undef HAVE_PULSE_SIMPLE_H +/* Define if enable alsa */ +#undef HAS_ALSA + +/* Define if enable oss */ +#undef HAS_OSS + +/* Define if enable pulseaudio */ +#undef HAS_PULSEAUDIO + +/* Define if enable esd */ +#undef HAS_ESD + /* Define if MSD-HMM support is enabled */ #undef ENABLE_MSD From sumomo @ users.sourceforge.jp Fri Mar 4 12:01:48 2011 From: sumomo @ users.sourceforge.jp (sumomo @ users.sourceforge.jp) Date: Fri, 04 Mar 2011 12:01:48 +0900 Subject: [Julius-cvs 626] CVS update: julius4/libsent Message-ID: <1299207708.456588.19902.nullmailer@users.sourceforge.jp> Index: julius4/libsent/configure diff -u julius4/libsent/configure:1.26 julius4/libsent/configure:1.27 --- julius4/libsent/configure:1.26 Thu Feb 24 19:07:03 2011 +++ julius4/libsent/configure Fri Mar 4 12:01:48 2011 @@ -1986,7 +1986,6 @@ # avoid ALSA/OSS detection for Windows environment has_alsa=no has_oss=no - has_pulseaudio=no ;; *) # ALSA @@ -1995,17 +1994,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1999: checking for $ac_hdr" >&5 +echo "configure:1998: 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:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2008: \"$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* @@ -2032,17 +2031,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2036: checking for $ac_hdr" >&5 +echo "configure:2035: 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:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2045: \"$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* @@ -2079,17 +2078,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2083: checking for $ac_hdr" >&5 +echo "configure:2082: 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:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2092: \"$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* @@ -2116,17 +2115,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2120: checking for $ac_hdr" >&5 +echo "configure:2119: 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:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2129: \"$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* @@ -2166,17 +2165,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2170: checking for $ac_hdr" >&5 +echo "configure:2169: 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:2180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2179: \"$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* @@ -2207,7 +2206,7 @@ # PulseAudio has_pulseaudio=no echo $ac_n "checking for pa_simple_new in -lpulse-simple""... $ac_c" 1>&6 -echo "configure:2211: checking for pa_simple_new in -lpulse-simple" >&5 +echo "configure:2210: checking for pa_simple_new in -lpulse-simple" >&5 ac_lib_var=`echo pulse-simple'_'pa_simple_new | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2215,7 +2214,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpulse-simple $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2229: \"$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 @@ -2245,17 +2244,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2249: checking for $ac_hdr" >&5 +echo "configure:2248: 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:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2258: \"$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* @@ -2287,18 +2286,18 @@ if test "$with_mictype" = auto; then - echo $ac_n "checking for input device type""... $ac_c" 1>&6 -echo "configure:2292: checking for input device type" >&5 + echo $ac_n "checking for default input device type""... $ac_c" 1>&6 +echo "configure:2291: checking for default input device type" >&5 altype=no case "$host_os" in linux*) # Linux - availability already checked, set default if test "$has_alsa" = yes; then altype=alsa - elif test "$has_oss" = yes; then - altype=oss elif test "$has_pulseaudio" = yes; then altype=pulseaudio + elif test "$has_oss" = yes; then + altype=oss elif test "$has_esd" = yes; then altype=esd else @@ -2318,12 +2317,12 @@ darwin*) # MacOSX (CoreAudio) cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2326: \"$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* @@ -2338,12 +2337,12 @@ solaris2*) # Solaris2.x Built-in Audio cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2346: \"$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* @@ -2358,12 +2357,12 @@ sunos4*) # SunOS4 Audio cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2366: \"$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* @@ -2378,12 +2377,12 @@ irix6*) # O2 (SGI IRIX6.3) cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2386: \"$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* @@ -2415,7 +2414,7 @@ portaudio) pa_system=no echo $ac_n "checking for Pa_Initialize in -lportaudio""... $ac_c" 1>&6 -echo "configure:2419: checking for Pa_Initialize in -lportaudio" >&5 +echo "configure:2418: checking for Pa_Initialize in -lportaudio" >&5 ac_lib_var=`echo portaudio'_'Pa_Initialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2423,7 +2422,7 @@ ac_save_LIBS="$LIBS" LIBS="-lportaudio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2437: \"$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 @@ -2453,17 +2452,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2457: checking for $ac_hdr" >&5 +echo "configure:2456: 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:2467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2466: \"$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* @@ -2507,7 +2506,7 @@ ;; cygwin*|mingw*) echo $ac_n "checking for main in -ldsound""... $ac_c" 1>&6 -echo "configure:2511: checking for main in -ldsound" >&5 +echo "configure:2510: checking for main in -ldsound" >&5 ac_lib_var=`echo dsound'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2515,14 +2514,14 @@ ac_save_LIBS="$LIBS" LIBS="-ldsound $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2525: \"$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 @@ -2541,17 +2540,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2545: checking for $ac_hdr" >&5 +echo "configure:2544: 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:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2554: \"$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* @@ -2594,24 +2593,49 @@ # set appropritate parameters for the determined API SOUNDLIB="" ADINOBJ="" -# if PulseAudio exist, include it -if test "$has_pulseaudio" = yes; then - SOUNDLIB="$SOUNDLIB -lpulse-simple -lpulse" - ADINOBJ="$ADINOBJ src/adin/adin_pulseaudio.o" -fi -# if esd exist, include it -if test "$has_esd" = yes; then - SOUNDLIB="$SOUNDLIB -lesd" - ADINOBJ="$ADINOBJ src/adin/adin_esd.o" -fi -# if alsa exist, include it -if test "$has_alsa" = yes; then - SOUNDLIB="$SOUNDLIB -lasound" - ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_alsa.o" -fi -# if oss exist, include it -if test "$has_oss" = yes; then - ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_oss.o" + +# when auto, several available interfaces will be enabled +adinlist="" +if test "$with_mictype" = auto; then + # if PulseAudio exist, include it + if test "$has_pulseaudio" = yes; then + SOUNDLIB="$SOUNDLIB -lpulse-simple -lpulse" + ADINOBJ="$ADINOBJ src/adin/adin_pulseaudio.o" + cat >> confdefs.h <<\EOF +#define HAS_PULSEAUDIO 1 +EOF + + adinlist="$adinlist pulseaudio" + fi + # if alsa exist, include it + if test "$has_alsa" = yes; then + SOUNDLIB="$SOUNDLIB -lasound" + ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_alsa.o" + cat >> confdefs.h <<\EOF +#define HAS_ALSA 1 +EOF + + adinlist="$adinlist alsa" + fi + # if oss exist, include it + if test "$has_oss" = yes; then + ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_oss.o" + cat >> confdefs.h <<\EOF +#define HAS_OSS 1 +EOF + + adinlist="$adinlist oss" + fi + # if esd exist, include it + if test "$has_esd" = yes; then + SOUNDLIB="$SOUNDLIB -lesd" + ADINOBJ="$ADINOBJ src/adin/adin_esd.o" + cat >> confdefs.h <<\EOF +#define HAS_ESD 1 +EOF + + adinlist="$adinlist esd" + fi fi # altype-specific setup @@ -2630,7 +2654,7 @@ case "$host_os" in linux*) echo $ac_n "checking for spInitAudio in -lspa.linux""... $ac_c" 1>&6 -echo "configure:2634: checking for spInitAudio in -lspa.linux" >&5 +echo "configure:2658: checking for spInitAudio in -lspa.linux" >&5 ac_lib_var=`echo spa.linux'_'spInitAudio | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2638,7 +2662,7 @@ ac_save_LIBS="$LIBS" LIBS="-lspa.linux -lspb.linux -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2677: \"$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 @@ -2668,7 +2692,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for spInitAudio in -lspa.linux-glibc""... $ac_c" 1>&6 -echo "configure:2672: checking for spInitAudio in -lspa.linux-glibc" >&5 +echo "configure:2696: checking for spInitAudio in -lspa.linux-glibc" >&5 ac_lib_var=`echo spa.linux-glibc'_'spInitAudio | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2676,7 +2700,7 @@ ac_save_LIBS="$LIBS" LIBS="-lspa.linux-glibc -lspb.linux-glibc -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2715: \"$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 @@ -2793,6 +2817,14 @@ EOF ADINOBJ="$ADINOBJ src/adin/adin_mic_linux.o" + if test "$with_mictype" != auto; then + ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_oss.o" + cat >> confdefs.h <<\EOF +#define HAS_OSS 1 +EOF + + adinlist="$adinlist oss" + fi ;; alsa) if test "$has_alsa" = no; then @@ -2804,6 +2836,15 @@ EOF ADINOBJ="$ADINOBJ src/adin/adin_mic_linux.o" + if test "$with_mictype" != auto; then + SOUNDLIB="$SOUNDLIB -lasound" + ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_alsa.o" + cat >> confdefs.h <<\EOF +#define HAS_ALSA 1 +EOF + + adinlist="$adinlist alsa" + fi ;; esd) if test "$has_esd" = no; then @@ -2815,6 +2856,15 @@ EOF ADINOBJ="$ADINOBJ src/adin/adin_mic_linux.o" + if test "$with_mictype" != auto; then + SOUNDLIB="$SOUNDLIB -lesd" + ADINOBJ="$ADINOBJ src/adin/adin_esd.o" + cat >> confdefs.h <<\EOF +#define HAS_ESD 1 +EOF + + adinlist="$adinlist esd" + fi ;; pulseaudio) if test "$has_pulseaudio" = no; then @@ -2826,6 +2876,15 @@ EOF ADINOBJ="$ADINOBJ src/adin/adin_mic_linux.o" + if test "$with_mictype" != auto; then + SOUNDLIB="$SOUNDLIB -lpulse-simple -lpulse" + ADINOBJ="$ADINOBJ src/adin/adin_pulseaudio.o" + cat >> confdefs.h <<\EOF +#define HAS_PULSEAUDIO 1 +EOF + + adinlist="$adinlist pulseaudio" + fi ;; freebsd) if test "$has_oss" = no; then @@ -2837,6 +2896,14 @@ #define USE_MIC 1 EOF + if test "$with_mictype" != auto; then + ADINOBJ="$ADINOBJ src/adin/adin_mic_linux_oss.o" + cat >> confdefs.h <<\EOF +#define HAS_OSS 1 +EOF + + adinlist="$adinlist oss" + fi ;; coreaudio) aldesc="MacOSX CoreAudio" @@ -2887,21 +2954,21 @@ if test "$with_netaudio_dir" = auto ; then echo $ac_n "checking for DatLink/NetAudio support""... $ac_c" 1>&6 -echo "configure:2891: checking for DatLink/NetAudio support" >&5 +echo "configure:2958: checking for DatLink/NetAudio support" >&5 else echo $ac_n "checking for DatLink/NetAudio support on ${with_netaudio_dir}""... $ac_c" 1>&6 -echo "configure:2894: checking for DatLink/NetAudio support on ${with_netaudio_dir}" >&5 +echo "configure:2961: checking for DatLink/NetAudio support on ${with_netaudio_dir}" >&5 fi TMPCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${with_netaudio_dir}/include" use_netaudio=no cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2972: \"$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* @@ -2913,6 +2980,7 @@ SOUNDINC="-I${with_netaudio_dir}/include" ADINOBJ="$ADINOBJ src/adin/adin_netaudio.o src/adin/adin_na.o " SOUNDLIB="$SOUNDLIB -L${with_netaudio_dir}/lib -lnetaudio -lsupport" + adinlist="$adinlist netaudio" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 @@ -2926,7 +2994,7 @@ have_zlib=no; if test "$use_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:2930: checking for deflate in -lz" >&5 +echo "configure:2998: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2934,7 +3002,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:3017: \"$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 @@ -2964,17 +3032,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2968: checking for $ac_hdr" >&5 +echo "configure:3036: 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:2978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3046: \"$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* @@ -3019,7 +3087,7 @@ # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3023: checking for $ac_word" >&5 +echo "configure:3091: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3066,7 +3134,7 @@ if test "$with_sndfile" = yes; then have_libsndfile=no echo $ac_n "checking for sf_open in -lsndfile""... $ac_c" 1>&6 -echo "configure:3070: checking for sf_open in -lsndfile" >&5 +echo "configure:3138: checking for sf_open in -lsndfile" >&5 ac_lib_var=`echo sndfile'_'sf_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3074,7 +3142,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsndfile $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3157: \"$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 @@ -3104,17 +3172,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3108: checking for $ac_hdr" >&5 +echo "configure:3176: 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:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3186: \"$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* @@ -3156,7 +3224,7 @@ if test "$have_libsndfile" = no; then echo $ac_n "checking for sf_open_read in -lsndfile""... $ac_c" 1>&6 -echo "configure:3160: checking for sf_open_read in -lsndfile" >&5 +echo "configure:3228: checking for sf_open_read in -lsndfile" >&5 ac_lib_var=`echo sndfile'_'sf_open_read | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3164,7 +3232,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsndfile $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3247: \"$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 @@ -3194,17 +3262,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3198: checking for $ac_hdr" >&5 +echo "configure:3266: 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:3208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3276: \"$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* @@ -3263,6 +3331,7 @@ + cat >> confdefs.h <> $CONFIG_STATUS < Index: julius4/libsent/src/adin/adin_mic_linux.c diff -u julius4/libsent/src/adin/adin_mic_linux.c:1.5 julius4/libsent/src/adin/adin_mic_linux.c:1.6 --- julius4/libsent/src/adin/adin_mic_linux.c:1.5 Thu Feb 24 19:07:03 2011 +++ julius4/libsent/src/adin/adin_mic_linux.c Fri Mar 4 12:01:48 2011 @@ -6,7 +6,7 @@ * * マイク入力のための低レベル関数です. * インタフェースを明示指定しない (-input mic) 場合に呼ばれます. - * ALSA, OSS, PulesAudio, ESD の順で最初に見つかったものが使用されます. + * ALSA, PulesAudio, OSS, ESD の順で最初に見つかったものが使用されます. * それぞれの API を明示的に指定したい場合は "-input" にそれぞれ * "alsa", "oss", "pulseaudio", "esd" を指定してください。 * @@ -15,7 +15,7 @@ * * Low level I/O functions for microphone input on Linux. * This will be called when no device was explicitly specified ("-input mic"). - * ALSA, OSS, PulseAudio, ESD will be chosen at compilation time. + * ALSA, PulseAudio, OSS, ESD will be chosen in this order at compilation time. * "-input alsa", "-input oss", "-input pulseaudio" or "-input esd" to * specify which API to use. * @@ -23,7 +23,7 @@ * @author Akinobu LEE * @date Sun Feb 13 16:18:26 2005 * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * */ /* From sumomo @ users.sourceforge.jp Wed Mar 16 11:52:27 2011 From: sumomo @ users.sourceforge.jp (sumomo @ users.sourceforge.jp) Date: Wed, 16 Mar 2011 11:52:27 +0900 Subject: [Julius-cvs 627] CVS update: julius4/libjulius/src Message-ID: <1300243947.633518.29327.nullmailer@users.sourceforge.jp> Index: julius4/libjulius/src/adin-cut.c diff -u julius4/libjulius/src/adin-cut.c:1.14 julius4/libjulius/src/adin-cut.c:1.15 --- julius4/libjulius/src/adin-cut.c:1.14 Thu Feb 24 19:07:03 2011 +++ julius4/libjulius/src/adin-cut.c Wed Mar 16 11:52:27 2011 @@ -95,7 +95,7 @@ * @author Akinobu LEE * @date Sat Feb 12 13:20:53 2005 * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * */ /* @@ -1025,17 +1025,40 @@ if (recog->adin->adinthread_ended) return TRUE; + /* send a cencellation request to the A/D-in thread */ ret = pthread_cancel(recog->adin->adin_thread); - if (ret == 0) { - jlog("STAT: AD-in thread deleted\n"); - } else { + if (ret != 0) { if (ret == ESRCH) { jlog("STAT: adin_thread_cancel: no A/D-in thread\n"); + recog->adin->adinthread_ended = TRUE; + return TRUE; } else { jlog("Error: adin_thread_cancel: failed to cancel A/D-in thread\n"); return FALSE; } } + /* wait for the thread to terminate */ + ret = pthread_join(recog->adin->adin_thread, NULL); + if (ret != 0) { + if (ret == EINVAL) { + jlog("InternalError: adin_thread_cancel: AD-in thread is invalid\n"); + recog->adin->adinthread_ended = TRUE; + return FALSE; + } else if (ret == ESRCH) { + jlog("STAT: adin_thread_cancel: no A/D-in thread\n"); + recog->adin->adinthread_ended = TRUE; + return TRUE; + } else if (ret == EDEADLK) { + jlog("InternalError: adin_thread_cancel: dead lock or self thread?\n"); + recog->adin->adinthread_ended = TRUE; + return FALSE; + } else { + jlog("Error: adin_thread_cancel: failed to wait end of A/D-in thread\n"); + return FALSE; + } + } + + jlog("STAT: AD-in thread deleted\n"); recog->adin->adinthread_ended = TRUE; return TRUE; }