Commit 46f913e1 authored by yanmorin's avatar yanmorin

Removing portaudio from internal compilation

Loading dynamic number of account, depending on user_cfg.h constant
parent 880a1c0e
......@@ -27,7 +27,6 @@ AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libs/Makefile \
libs/taxidermy/Makefile \
libs/portaudio/Makefile \
libs/stund/Makefile \
libs/utilspp/Makefile \
libs/utilspp/functor/Makefile \
......@@ -36,11 +35,6 @@ AC_CONFIG_FILES([src/Makefile \
src/sflphone \
src/audio/Makefile \
src/audio/gsm/Makefile \
src/audio/pacpp/Makefile \
src/audio/pacpp/include/Makefile \
src/audio/pacpp/include/portaudiocpp/Makefile \
src/audio/pacpp/source/Makefile \
src/audio/pacpp/source/portaudiocpp/Makefile \
src/config/Makefile \
src/gui/Makefile \
src/gui/qt/Makefile \
......@@ -128,7 +122,7 @@ AC_CHECK_FUNCS([bzero floor gethostbyname gethrtime gettimeofday \
strchr strdup strerror strrchr strstr strtol utime])
dnl Check for portaudio
PORTAUDIO_SETUP
dnl PORTAUDIO_SETUP
dnl Check for exosip2
LP_CHECK_EXOSIP2
......@@ -164,6 +158,16 @@ PKG_CHECK_MODULES(libccrtp1, libccrtp1 >= ${LIBCCRT_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libccrtp1_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccrtp1_LIBS"
LIBPORTAUDIO_MIN_VERSION=19
PKG_CHECK_MODULES(libportaudio, portaudio-2.0 >= ${LIBPORTAUDIO_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudio_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudio_LIBS"
LIBPORTAUDIOCPP_MIN_VERSION=12
PKG_CHECK_MODULES(libportaudiocpp, portaudiocpp >= ${LIBPORTAUDIOCPP_MIN_VERSION})
SFLPHONE_CFLAGS="$SFLPHONE_CFLAGS $libportaudiocpp_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libportaudiocpp_LIBS"
dnl Check for speex
AC_ARG_ENABLE(speex,
AS_HELP_STRING(
......
......@@ -37,13 +37,12 @@ sflphoned_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone
#sflphoned_LDFLAGS = -static
sflphoned_LDADD = ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) $(IAX_LIBS) $(EXOSIP_LIBS)
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs -I$(srcdir)/audio/pacpp/include $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(portaudio_CFLAGS) -I$(top_srcdir)/libs/portaudio/pa_common $(IAX_CFLAGS) $(USER_INCLUDES)
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(IAX_CFLAGS) $(USER_INCLUDES)
#libsflphone_la_LDFLAGS= -version-info 0:1:0
libsflphone_la_LIBADD = \
$(top_builddir)/libs/stund/libstun.la \
$(top_builddir)/libs/utilspp/libutilspp.la \
$(top_builddir)/libs/portaudio/libportaudio.la \
./audio/libaudio.la \
./gui/libguiframework.la \
./config/libconfig.la \
......
......@@ -25,8 +25,8 @@ audiortp.cpp dtmf.cpp tone.cpp audiocodec.cpp audiolayer.cpp dtmfgen
tonegenerator.cpp ulaw.cpp codecDescriptor.cpp \
audioloop.cpp ringbuffer.cpp $(SPEEX_SOURCES)
AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs -I$(srcdir)/pacpp/include/ $(libccext2_CFLAGS) $(libccrtp1_CFLAGS) $(portaudio_CFLAGS) -I$(top_srcdir)/libs/portaudio/pa_common $(USER_INCLUDES)
libaudio_la_LIBADD = gsm/libgsm.la pacpp/source/portaudiocpp/libportaudiocpp.la $(SPEEX_LIB) $(SAMPLERATE_LIB)
AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccrtp1_CFLAGS) $(USER_INCLUDES)
libaudio_la_LIBADD = gsm/libgsm.la $(SPEEX_LIB) $(SAMPLERATE_LIB)
libaudio_la_CPPFLAGS = $(SPEEX_FLAG) $(SAMPLERATE_FLAG)
......
......@@ -995,19 +995,10 @@ ManagerImpl::initConfigFile (void)
std::string section;
section = SIGNALISATION;
fill_config_int(SYMMETRIC, YES_STR);
//fill_config_str(FULL_NAME, EMPTY_FIELD);
//fill_config_str(USER_PART, EMPTY_FIELD);
//fill_config_str(AUTH_USER_NAME, EMPTY_FIELD);
//fill_config_str(PASSWORD, EMPTY_FIELD);
//fill_config_str(HOST_PART, EMPTY_FIELD);
//fill_config_str(PROXY, EMPTY_FIELD);
//fill_config_int(AUTO_REGISTER, YES_STR);
fill_config_int(PLAY_DTMF, YES_STR);
fill_config_int(PLAY_TONES, YES_STR);
fill_config_int(PULSE_LENGTH, DFT_PULSE_LENGTH_STR);
fill_config_int(SEND_DTMF_AS, SIP_INFO_STR);
//fill_config_str(STUN_SERVER, DFT_STUN_SERVER);
//fill_config_int(USE_STUN, NO_STR);
section = AUDIO;
fill_config_int(DRIVER_NAME, DFT_DRIVER_STR);
......@@ -1604,8 +1595,8 @@ ManagerImpl::loadAccountMap()
{
short nbAccount = 0;
// SIP Loading 4 account...
short nbAccountSIP = 4;
// SIP Loading X account...
short nbAccountSIP = ACCOUNT_SIP_COUNT_DEFAULT;
for (short iAccountSIP = 0; iAccountSIP<nbAccountSIP; iAccountSIP++) {
std::ostringstream accountName;
accountName << "SIP" << iAccountSIP;
......@@ -1613,13 +1604,14 @@ ManagerImpl::loadAccountMap()
nbAccount++;
}
Account* account = AccountCreator::createAccount(AccountCreator::IAX_ACCOUNT, ACCOUNT_IAX0);
if (account != 0) {
_accountMap[ACCOUNT_IAX0] = account;
nbAccount++;
// IAX Loading X account...
short nbAccountIAX = ACCOUNT_IAX_COUNT_DEFAULT;
for (short iAccountIAX = 0; iAccountIAX<nbAccountIAX; iAccountIAX++) {
std::ostringstream accountName;
accountName << "IAX" << iAccountIAX;
_accountMap[accountName.str()] = AccountCreator::createAccount(AccountCreator::IAX_ACCOUNT, accountName.str());
nbAccount++;
}
account = 0;
return nbAccount;
}
......
......@@ -66,7 +66,8 @@
#define CODEC2 "Codecs.codec2"
#define CODEC3 "Codecs.codec3"
#define RING_CHOICE "Rings.ringChoice"
#define ACCOUNT_SIP_COUNT_DEFAULT 4
#define ACCOUNT_IAX_COUNT_DEFAULT 1
// speakers and volume 0 to 100
#define VOLUME_SPKR "Volume.speakers"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment