summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in30
-rw-r--r--hfpd/objects.cpp18
-rw-r--r--hfpd/objects.h3
3 files changed, 45 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index b288caf..66a92b6 100644
--- a/configure.in
+++ b/configure.in
@@ -290,6 +290,21 @@ if test $use_alsa = "yes"; then
AC_DEFINE([USE_ALSA_SOUNDIO], [], [Enable support for libasound])
libhfp_CXXFLAGS="$libhfp_CXXFLAGS $ALSA_CFLAGS"
libhfp_LIBS="$libhfp_LIBS $ALSA_LIBS"
+else
+ if test $want_alsa != "no"; then
+ echo "***"
+ echo "***"
+ echo "*** WARNING: Support for ALSA is being omitted"
+ echo "*** WARNING: This probably isn't what you want"
+ echo "*** WARNING: Install libasound development package"
+ echo "***"
+ echo "***"
+ echo -n -e "\a"
+ sleep 1
+ echo -n -e "\a"
+ sleep 1
+ echo -n -e "\a"
+ fi
fi
if test $want_oss = "yes"; then
AC_DEFINE([USE_OSS_SOUNDIO], [], [Enable support for OSS])
@@ -303,6 +318,21 @@ if test $use_speexdsp = "yes"; then
AC_DEFINE([USE_SPEEXDSP], [], [Enable support for libspeexdsp])
libhfp_CXXFLAGS="$libhfp_CXXFLAGS $SPEEXDSP_CFLAGS"
libhfp_LIBS="$libhfp_LIBS $SPEEXDSP_LIBS"
+else
+ if test $want_speexdsp != "no"; then
+ echo "***"
+ echo "***"
+ echo "*** WARNING: Support for libspeexdsp is being omitted"
+ echo "*** WARNING: This probably isn't what you want"
+ echo "*** WARNING: Install libspeexdsp development package"
+ echo "***"
+ echo "***"
+ echo -n -e "\a"
+ sleep 1
+ echo -n -e "\a"
+ sleep 1
+ echo -n -e "\a"
+ fi
fi
if test $use_nghost = "yes"; then
diff --git a/hfpd/objects.cpp b/hfpd/objects.cpp
index 3bc0c84..88f5b63 100644
--- a/hfpd/objects.cpp
+++ b/hfpd/objects.cpp
@@ -743,6 +743,8 @@ HandsFree::
bool HandsFree::
Init(const char *cfgfile)
{
+ bool res;
+
m_config = new ConfigHandler(GetDi());
if (!m_config)
goto failed;
@@ -767,7 +769,8 @@ Init(const char *cfgfile)
m_hfp->cb_HfpSessionFactory.Register(this,
&HandsFree::SessionFactory);
- m_hub->AddService(m_hfp);
+ res = m_hub->AddService(m_hfp);
+ assert(res);
m_sound = new SoundIoObj(this);
if (!m_sound)
@@ -801,6 +804,7 @@ Cleanup(void)
m_sound = 0;
}
if (m_hfp) {
+ m_hub->RemoveService(m_hfp);
delete m_hfp;
m_hfp = 0;
}
@@ -1909,6 +1913,13 @@ Init(DbusSession *dbusp)
m_config->Get("audio", "jitterwindow", val, 0);
m_sound->SetJitterWindowHint(val);
+#if defined(USE_SPEEXDSP)
+ m_sigproc = SoundIoFltCreateSpeex(GetDi());
+ if (!m_sigproc) {
+ GetDi()->LogWarn("Could not create DSP filter object\n");
+ goto failed;
+ }
+
m_config->Get("dsp", "denoise",
m_procprops.noisereduce, true);
m_config->Get("dsp", "echocancel_ms",
@@ -1920,16 +1931,13 @@ Init(DbusSession *dbusp)
m_config->Get("dsp", "dereverb_decay",
m_procprops.dereverb_decay, 0.0);
- m_sigproc = SoundIoFltCreateSpeex(GetDi());
- if (!m_sigproc)
- goto failed;
-
if (!m_sigproc->Configure(m_procprops)) {
GetDi()->LogWarn("Could not configure DSP settings\n");
goto failed;
}
m_sound->SetDsp(m_sigproc);
+#endif /* defined(USE_SPEEXDSP) */
if (!dbusp->ExportObject(this))
goto failed;
diff --git a/hfpd/objects.h b/hfpd/objects.h
index 846f5f2..521cd81 100644
--- a/hfpd/objects.h
+++ b/hfpd/objects.h
@@ -474,6 +474,7 @@ static const DbusProperty g_SoundIo_properties[] = {
GetMinBufferFillHint, SetMinBufferFillHint),
DbusPropertyMarshall(dbus_uint32_t, JitterWindowHint, SoundIoObj,
GetJitterWindowHint, SetJitterWindowHint),
+#if defined(USE_SPEEXDSP)
DbusPropertyMarshall(bool, Denoise, SoundIoObj,
GetDenoise, SetDenoise),
DbusPropertyMarshall(dbus_uint32_t, AutoGain, SoundIoObj,
@@ -484,7 +485,7 @@ static const DbusProperty g_SoundIo_properties[] = {
GetDereverbLevel, SetDereverbLevel),
DbusPropertyMarshall(float, DereverbDecay, SoundIoObj,
GetDereverbDecay, SetDereverbDecay),
-
+#endif /* defined(USE_SPEEXDSP) */
{ 0, }
};