[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] add --with-audio-output-method=<name> option
From: |
Andrei Kholodnyi |
Subject: |
[PATCH 1/1] add --with-audio-output-method=<name> option |
Date: |
Wed, 1 Dec 2010 21:55:15 +0100 |
it is possible now to set a default audio output method during configure
if option is not set during configure,
then the first available audio method is used,
e.g. if alsa, libao and pulse are available, alsa will be taken as default
---
configure.ac | 9 +++++++++
src/server/Makefile.am | 5 ++++-
src/server/configuration.c | 8 ++------
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 58a233c..cb2192f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,6 +277,15 @@ AM_CONDITIONAL([pulse_support], [test $with_pulse = "yes"])
AC_SUBST([PULSE_CFLAGS])
AC_SUBST([PULSE_LIBS])
+AC_MSG_CHECKING(for default audio output method)
+AC_ARG_WITH([audio-output-method],
+ [AS_HELP_STRING([--with-audio-output-method=<name>], [defines audio
output method (default - pulse)])],
+ [],
+ [with_audio_output_method=`echo $STATIC_AUDIO_PLUGINS_LIST | cut -d ' '
-f 1`])
+
+AC_SUBST([with_audio_output_method])
+AC_MSG_RESULT($with_audio_output_method)
+
for name in $STATIC_AUDIO_PLUGINS_LIST; do
STATIC_AUDIO_PLUGINS_GET="$STATIC_AUDIO_PLUGINS_GET${name}_plugin_get,";
STATIC_AUDIO_PLUGINS_EXTERN="${STATIC_AUDIO_PLUGINS_EXTERN} extern
spd_audio_plugin_t const * ${name}_plugin_get (void); "
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 47f69de..13493d0 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -11,7 +11,10 @@ speech_dispatcher_SOURCES = speechd.c speechd.h server.c
server.h \
output.c output.h sem_functions.c sem_functions.h \
index_marking.c index_marking.h
speech_dispatcher_CFLAGS = $(ERROR_CFLAGS)
-speech_dispatcher_CPPFLAGS = $(inc_local) $(DOTCONF_CFLAGS) $(GLIB_CFLAGS)
$(GMODULE_CFLAGS) $(GTHREAD_CFLAGS) -DSYS_CONF=\"$(spdconfdir)\"
-DSND_DATA=\"$(snddatadir)\" -DMODULEBINDIR=\"$(modulebindir)\" -D_GNU_SOURCE
+speech_dispatcher_CPPFLAGS = $(inc_local) $(DOTCONF_CFLAGS) $(GLIB_CFLAGS) \
+ $(GMODULE_CFLAGS) $(GTHREAD_CFLAGS) -DSYS_CONF=\"$(spdconfdir)\" \
+ -DSND_DATA=\"$(snddatadir)\" -DMODULEBINDIR=\"$(modulebindir)\" \
+ -D_GNU_SOURCE -DDEFAULT_AUDIO_METHOD=\"$(with_audio_output_method)\"
speech_dispatcher_LDFLAGS = $(RDYNAMIC)
speech_dispatcher_LDADD = $(lib_common) $(DOTCONF_LIBS) $(GLIB_LIBS) \
$(GMODULE_LIBS) $(GTHREAD_LIBS) -lpthread $(EXTRA_SOCKET_LIBS)
diff --git a/src/server/configuration.c b/src/server/configuration.c
index 6306015..d9acada 100644
--- a/src/server/configuration.c
+++ b/src/server/configuration.c
@@ -454,12 +454,8 @@ load_default_global_set_options()
GlobalFDSet.ssml_mode = SPD_DATA_TEXT;
GlobalFDSet.notification = 0;
-#ifdef __SUNPRO_C
-/* Added by Willie Walker - default to OSS for Solaris */
- GlobalFDSet.audio_output_method = g_strdup("oss");
-#else
- GlobalFDSet.audio_output_method = g_strdup("pulse");
-#endif /* __SUNPRO_C */
+
+ GlobalFDSet.audio_output_method = g_strdup(DEFAULT_AUDIO_METHOD);
GlobalFDSet.audio_oss_device = g_strdup("/dev/dsp");
GlobalFDSet.audio_alsa_device = g_strdup("default");
GlobalFDSet.audio_nas_server = g_strdup("tcp/localhost:5450");
--
1.6.0.4
- [PATCH 1/1] add --with-audio-output-method=<name> option, (continued)
- [PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/01
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei Kholodnyi, 2010/12/01
- [PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/01
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei Kholodnyi, 2010/12/01
- [PATCH 1/1] add --with-audio-output-method=<name> option, Halim Sahin, 2010/12/01
- [PATCH 1/1] add --with-audio-output-method=<name> option, Steve Holmes, 2010/12/03
- [PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/03
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei . Kholodnyi, 2010/12/04
[PATCH 1/1] add --with-audio-output-method=<name> option, Christopher Brannon, 2010/12/04
[PATCH 1/1] add --with-audio-output-method=<name> option,
Andrei Kholodnyi <=
[PATCH 1/1] add --with-audio-output-method=<name> option, Andrei Kholodnyi, 2010/12/02
- [PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/02
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei . Kholodnyi, 2010/12/02
- [PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/03
- [PATCH 1/1] add --with-audio-output-method=<name> option, William Hubbs, 2010/12/04
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei Kholodnyi, 2010/12/04
- [PATCH 1/1] add --with-audio-output-method=<name> option, William Hubbs, 2010/12/04
- [PATCH 1/1] add --with-audio-output-method=<name> option, Andrei Kholodnyi, 2010/12/04
[PATCH 1/1] add --with-audio-output-method=<name> option, Bohdan R . Rau, 2010/12/05
[PATCH 1/1] add --with-audio-output-method=<name> option, Halim Sahin, 2010/12/02