summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2015-11-10 10:36:14 +0000
committerNanang Izzuddin <nanang@teluu.com>2015-11-10 10:36:14 +0000
commitea961f64dd7f8040c35f92ac7a7751d203bda49e (patch)
treeddb91c14396e796e69ecb89ef5b334ca839267ef
parent06deef6b8958d1abc22138aa6b74b0faa6b81ae9 (diff)
Re #1896: Updated default audio device backends: mingw uses WMME, linux/*nix uses alsa (if available).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5199 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-xaconfigure4
-rw-r--r--aconfigure.ac3
-rw-r--r--pjmedia/build/os-auto.mak.in16
3 files changed, 19 insertions, 4 deletions
diff --git a/aconfigure b/aconfigure
index e90656da..e3b7c4f1 100755
--- a/aconfigure
+++ b/aconfigure
@@ -6093,7 +6093,7 @@ $as_echo "Checking sound device backend... coreaudio" >&6; }
fi
;;
*cygwin* | *mingw*)
- ac_pjmedia_snd=pa_win32
+ ac_pjmedia_snd=win32
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... win32 sound" >&5
$as_echo "Checking sound device backend... win32 sound" >&6; }
;;
@@ -6108,6 +6108,8 @@ $as_echo "Checking sound device backend... null sound" >&6; }
if test "x$ac_cv_header_alsa_version_h" = xyes; then :
ac_pa_use_alsa=1
+ ac_pjmedia_snd=alsa
+
LIBS="$LIBS -lasound"
else
diff --git a/aconfigure.ac b/aconfigure.ac
index c62017bf..d0e88a72 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -642,7 +642,7 @@ else
fi
;;
*cygwin* | *mingw*)
- ac_pjmedia_snd=pa_win32
+ ac_pjmedia_snd=win32
AC_MSG_RESULT([Checking sound device backend... win32 sound])
;;
*rtems*)
@@ -654,6 +654,7 @@ else
ac_pjmedia_snd=pa_unix
AC_CHECK_HEADER(alsa/version.h,
[AC_SUBST(ac_pa_use_alsa,1)
+ AC_SUBST(ac_pjmedia_snd,alsa)
LIBS="$LIBS -lasound"
],
[AC_SUBST(ac_pa_use_alsa,0)])
diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in
index ab3627d7..a3e84954 100644
--- a/pjmedia/build/os-auto.mak.in
+++ b/pjmedia/build/os-auto.mak.in
@@ -56,7 +56,9 @@ export LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \
# - pa_darwinos: PortAudio on MacOSX (CoreAudio)
# - pa_old_darwinos: PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
# - pa_win32: PortAudio on Win32 (WMME)
-# - ds: Win32 DirectSound (dsound.c)
+# - win32: Win32 MME (wmme_dev.c)
+# - coreaudio: MaxOSX CoreAudio (coreaudio_dev.m)
+# - alsa: Unix ALSA (alsa_dev.c)
# - null: Null sound device (nullsound.c)
# - external: Link with no sounddev (app will provide)
AC_PJMEDIA_SND=@ac_pjmedia_snd@
@@ -211,10 +213,20 @@ export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_COREAUDIO=1 \
endif
#
+# Unix specific
+#
+ifneq ($(findstring alsa,$(AC_PJMEDIA_SND)),)
+export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_ALSA=1 \
+ -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 \
+ -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
+endif
+
+#
# Windows specific
#
ifneq ($(findstring win32,$(AC_PJMEDIA_SND)),)
-export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=1
+export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=1 \
+ -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0
else
export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
endif