summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-07-28 23:40:58 +0000
committerBenny Prijono <bennylp@teluu.com>2008-07-28 23:40:58 +0000
commitb2019f321854e3e9a3a810e2420a1979fce7de7c (patch)
treea818779720ec0573aeae45c640ee1216c451f53f
parentacdf2f35a1555531f855e01801ce420416a87725 (diff)
Ticket #463: Configuration option to have external sound device implementation
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2182 74dad513-b988-da41-8d7b-12977e46ad98
-rwxr-xr-xaconfigure12
-rw-r--r--aconfigure.ac9
-rw-r--r--pjmedia/build/os-auto.mak.in11
-rw-r--r--pjmedia/include/pjmedia/config.h6
-rw-r--r--pjsip-apps/build/Makefile2
5 files changed, 38 insertions, 2 deletions
diff --git a/aconfigure b/aconfigure
index fac14405..4e8e2e50 100755
--- a/aconfigure
+++ b/aconfigure
@@ -859,6 +859,7 @@ Optional Features:
--disable-sound Exclude sound (i.e. use null sound)
--disable-oss Disable OSS audio (default: not disabled)
+ --enable-ext-sound PJMEDIA will not provide any sound device backend
--disable-small-filter Exclude small filter in resampling
--disable-large-filter Exclude large filter in resampling
--disable-speex-aec Exclude Speex Acoustic Echo Canceller/AEC
@@ -10206,6 +10207,17 @@ fi;
esac
fi
+# Check whether --enable-ext_sound or --disable-ext_sound was given.
+if test "${enable_ext_sound+set}" = set; then
+ enableval="$enable_ext_sound"
+ if test "$enable_ext_sound" = "yes"; then
+ ac_pjmedia_snd=external
+ echo "$as_me:$LINENO: result: Checking if external sound is set... yes" >&5
+echo "${ECHO_T}Checking if external sound is set... yes" >&6
+ fi
+
+fi;
+
# Check whether --enable-small-filter or --disable-small-filter was given.
if test "${enable_small_filter+set}" = set; then
diff --git a/aconfigure.ac b/aconfigure.ac
index e55ae1fe..808bc61f 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -414,6 +414,15 @@ else
esac
fi
+AC_ARG_ENABLE(ext_sound,
+ AC_HELP_STRING([--enable-ext-sound],
+ [PJMEDIA will not provide any sound device backend]),
+ [if test "$enable_ext_sound" = "yes"; then
+ [ac_pjmedia_snd=external]
+ AC_MSG_RESULT([Checking if external sound is set... yes])
+ fi]
+ )
+
dnl # Include resampling small filter
AC_SUBST(ac_no_small_filter)
AC_ARG_ENABLE(small-filter,
diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in
index ce823913..656e3d58 100644
--- a/pjmedia/build/os-auto.mak.in
+++ b/pjmedia/build/os-auto.mak.in
@@ -11,6 +11,7 @@ export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@
# - pa_win32: PortAudio on Win32 (WMME)
# - ds: Win32 DirectSound (dsound.c)
# - null: Null sound device (nullsound.c)
+# - external: Link with no sounddev (app will provide)
AC_PJMEDIA_SND=@ac_pjmedia_snd@
# For Unix, specify if ALSA should be supported
@@ -90,11 +91,19 @@ export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
endif
#
-# Last resort, null sound device
+# Null sound device
#
ifeq ($(AC_PJMEDIA_SND),null)
export SOUND_OBJS = nullsound.o
export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
endif
+#
+# External sound device
+#
+ifeq ($(AC_PJMEDIA_SND),external)
+export SOUND_OBJS =
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_EXTERNAL
+endif
+
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index 70f9d8b9..8855edd9 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -56,6 +56,12 @@
/** Constant for Win32 DirectSound sound backend. */
#define PJMEDIA_SOUND_WIN32_DIRECT_SOUND 2
+/** When this is set, pjmedia will not provide any sound device backend.
+ * Application will have to provide its own sound device backend
+ * and link the application with it.
+ */
+#define PJMEDIA_SOUND_EXTERNAL 3
+
/**
* Unless specified otherwise, sound device uses PortAudio implementation
diff --git a/pjsip-apps/build/Makefile b/pjsip-apps/build/Makefile
index 0704abb1..206bddaa 100644
--- a/pjsip-apps/build/Makefile
+++ b/pjsip-apps/build/Makefile
@@ -34,7 +34,7 @@ export PJSUA_SRCDIR = ../src/pjsua
export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
main.o pjsua_app.o
export PJSUA_CFLAGS += $(_CFLAGS)
-export PJSUA_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS)
+export PJSUA_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS)
export PJSUA_EXE:=../bin/pjsua-$(TARGET_NAME)$(HOST_EXE)