summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-05-03 16:40:09 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-05-03 17:04:11 +0100
commit4db03f700cfaa8261db11a3a0c7162f0e7b71f0d (patch)
treed4846cb38e27f024e5d4ecdfb4fc27ade33279da
parent73a088141e4c247ae1ac2d573b7ac4b7e92ff070 (diff)
downloadefl-4db03f700cfaa8261db11a3a0c7162f0e7b71f0d.tar.gz
ecore_audio: Add alsa support
This is not well tested and thus disabled by default Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
-rw-r--r--configure.ac16
-rw-r--r--src/Makefile_Ecore_Audio.am8
-rw-r--r--src/lib/ecore_audio/Ecore_Audio.h2
-rw-r--r--src/lib/ecore_audio/ecore_audio_private.h8
4 files changed, 24 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 5e0b3fe0c0..1418f634d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2461,8 +2461,19 @@ EFL_LIB_START_OPTIONAL([Ecore_Audio], [test "${want_audio}" = "yes"])
### Additional options to configure
-# ALSA support is still not there, thus no option for it yet.
-want_alsa="no"
+# ALSA support is not well tested, disable by default
+AC_ARG_ENABLE([alsa],
+ [AC_HELP_STRING([--enable-alsa],
+ [enable alsa sound support. @<:@default=enabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ want_alsa="yes"
+ else
+ want_alsa="no"
+ fi
+ ],
+ [want_alsa="no"])
+
# sndfile is mandatory otherwise it won't read from/write to files.
# TODO: if confirmed sndfile is mandatory, remove this variable
@@ -2520,6 +2531,7 @@ EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
### Checks for library functions
EFL_LIB_END_OPTIONAL([Ecore_Audio])
+AM_CONDITIONAL([HAVE_ECORE_AUDIO_ALSA], [test "x${want_alsa}" = "xyes"])
AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
diff --git a/src/Makefile_Ecore_Audio.am b/src/Makefile_Ecore_Audio.am
index 35a414cc52..62f2485410 100644
--- a/src/Makefile_Ecore_Audio.am
+++ b/src/Makefile_Ecore_Audio.am
@@ -27,6 +27,14 @@ lib_ecore_audio_libecore_audio_la_LIBADD = @ECORE_AUDIO_LIBS@
lib_ecore_audio_libecore_audio_la_DEPENDENCIES = @ECORE_AUDIO_INTERNAL_LIBS@
lib_ecore_audio_libecore_audio_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
+if HAVE_ECORE_AUDIO_ALSA
+dist_installed_ecoreaudiomainheaders_DATA += \
+lib/ecore_audio/ecore_audio_obj_out_alsa.h
+
+lib_ecore_audio_libecore_audio_la_SOURCES += \
+lib/ecore_audio/ecore_audio_obj_out_alsa.c
+endif
+
if HAVE_ECORE_AUDIO_PULSE
dist_installed_ecoreaudiomainheaders_DATA += \
lib/ecore_audio/ecore_audio_obj_out_pulse.h
diff --git a/src/lib/ecore_audio/Ecore_Audio.h b/src/lib/ecore_audio/Ecore_Audio.h
index e97706032f..5e676348f0 100644
--- a/src/lib/ecore_audio/Ecore_Audio.h
+++ b/src/lib/ecore_audio/Ecore_Audio.h
@@ -212,6 +212,8 @@ EAPI int ecore_audio_shutdown(void);
#include <ecore_audio_obj_out_pulse.h>
+#include <ecore_audio_obj_out_alsa.h>
+
/**
* @}
*/
diff --git a/src/lib/ecore_audio/ecore_audio_private.h b/src/lib/ecore_audio/ecore_audio_private.h
index 35afa85f4c..a28ca7c374 100644
--- a/src/lib/ecore_audio/ecore_audio_private.h
+++ b/src/lib/ecore_audio/ecore_audio_private.h
@@ -146,14 +146,6 @@ extern Eina_List *ecore_audio_modules;
#ifdef HAVE_ALSA
/* ecore_audio_alsa */
-struct _Ecore_Audio_Alsa
-{
- ECORE_MAGIC;
- snd_pcm_t *handle;
- unsigned int channels;
- unsigned int samplerate;
-};
-
Ecore_Audio_Module *ecore_audio_alsa_init(void);
void ecore_audio_alsa_shutdown(void);
#endif /* HAVE_ALSA */