[Julius-cvs 203] CVS update: julius4/libjulius/src

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2008年 7月 18日 (金) 07:56:21 JST


Index: julius4/libjulius/src/m_adin.c
diff -u julius4/libjulius/src/m_adin.c:1.5 julius4/libjulius/src/m_adin.c:1.6
--- julius4/libjulius/src/m_adin.c:1.5	Tue Jul  1 13:29:45 2008
+++ julius4/libjulius/src/m_adin.c	Fri Jul 18 07:56:21 2008
@@ -12,7 +12,7 @@
  * @author Akinobu LEE
  * @date   Fri Mar 18 16:17:23 2005
  *
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
  * 
  */
 /*
@@ -74,24 +74,32 @@
       a->ad_end 	     = adin_mic_end;
       a->ad_read 	     = adin_mic_read;
       break;
+#ifdef HAS_ALSA
     case SP_INPUT_ALSA:
       a->ad_standby 	     = adin_alsa_standby;
       a->ad_begin 	     = adin_alsa_begin;
       a->ad_end 	     = adin_alsa_end;
       a->ad_read 	     = adin_alsa_read;
       break;
+#endif
+#ifdef HAS_OSS
     case SP_INPUT_OSS:
       a->ad_standby 	     = adin_oss_standby;
       a->ad_begin 	     = adin_oss_begin;
       a->ad_end 	     = adin_oss_end;
       a->ad_read 	     = adin_oss_read;
       break;
+#endif
+#ifdef HAS_ESD
     case SP_INPUT_ESD:
       a->ad_standby 	     = adin_esd_standby;
       a->ad_begin 	     = adin_esd_begin;
       a->ad_end 	     = adin_esd_end;
       a->ad_read 	     = adin_esd_read;
       break;
+#endif
+    default:
+      jlog("ERROR: m_adin: invalid input device specified\n");
     }
     break;
 #endif
Index: julius4/libjulius/src/m_options.c
diff -u julius4/libjulius/src/m_options.c:1.10 julius4/libjulius/src/m_options.c:1.11
--- julius4/libjulius/src/m_options.c:1.10	Tue Jul  1 13:29:45 2008
+++ julius4/libjulius/src/m_options.c	Fri Jul 18 07:56:21 2008
@@ -18,7 +18,7 @@
  * @author Akinobu Lee
  * @date   Thu May 12 18:52:07 2005
  *
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
  * 
  */
 /*
@@ -286,17 +286,32 @@
 	jconf->input.device = SP_INPUT_DEFAULT;
 	jconf->decodeopt.realtime_flag = TRUE;
       } else if (strmatch(tmparg,"alsa")) {
+#ifdef HAS_ALSA
 	jconf->input.speech_input = SP_MIC;
 	jconf->input.device = SP_INPUT_ALSA;
 	jconf->decodeopt.realtime_flag = TRUE;
+#else
+	jlog("ERROR: m_options: \"-input alsa\": ALSA support is not built-in\n");
+	return FALSE;
+#endif
       } else if (strmatch(tmparg,"oss")) {
+#ifdef HAS_OSS
 	jconf->input.speech_input = SP_MIC;
 	jconf->input.device = SP_INPUT_OSS;
 	jconf->decodeopt.realtime_flag = TRUE;
+#else
+	jlog("ERROR: m_options: \"-input oss\": OSS support is not built-in\n");
+	return FALSE;
+#endif
       } else if (strmatch(tmparg,"esd")) {
+#ifdef HAS_ESD
 	jconf->input.speech_input = SP_MIC;
 	jconf->input.device = SP_INPUT_ESD;
 	jconf->decodeopt.realtime_flag = TRUE;
+#else
+	jlog("ERROR: m_options: \"-input oss\": OSS support is not built-in\n");
+	return FALSE;
+#endif
 #endif
       } else if (strmatch(tmparg,"file")) { /* for 1.1 compat */
 	jconf->input.speech_input = SP_RAWFILE;


Julius-cvs メーリングリストの案内
アーカイブの一覧に戻る