Commit 006ccecb authored by jpbl's avatar jpbl
Browse files

put the new Audio stuff to be a maintener stuff (--enable-maintener)

parent 66da2307
......@@ -163,6 +163,23 @@ fi
sflphone_datadir=$datadir/sflphone
AC_SUBST(sflphone_datadir)
AC_MSG_CHECKING([whether to enable the maintener code])
AC_ARG_ENABLE(maintener,
[ --enable-maintener Enable maintener code [default=no]],
[
CXXFLAGS="$CXXFLAGS -DENABLE_MAINTENER"
AC_MSG_RESULT(yes)
maintener="yes"
],
[
AC_MSG_RESULT(no)
maintener="no"
]
)
AM_CONDITIONAL(MAINTENER_CODE, test x$maintener = xyes)
AC_SUBST(LIB_DNSSD)
AM_CONDITIONAL(USE_ZEROCONF, test "$have_libdns_sd" = "yes")
......
SUBDIRS = gsm pacpp OpenAL
if MAINTENER_CODE
maintener_directories = OpenAL
endif
SUBDIRS = gsm pacpp ${maintener_directories}
noinst_LTLIBRARIES = libaudio.la
......
......@@ -26,6 +26,8 @@
#include <AL/al.h>
#include <AL/alc.h>
#define DEFAULT_DEVICE_NAME "default"
SFLAudio::OpenALLayer::OpenALLayer()
: AudioLayer("openal")
{}
......@@ -42,6 +44,10 @@ SFLAudio::OpenALLayer::getDevicesNames()
devname += sizeof(ALCchar) * (strlen(devname) + 1);
}
}
else {
devices.push_back(DEFAULT_DEVICE_NAME);
}
return devices;
......@@ -51,7 +57,10 @@ SFLAudio::Device *
SFLAudio::OpenALLayer::openDevice()
{
Device *dev = new OpenALDevice();
if(dev->load() == false) {
if(dev->load()) {
dev->setName(DEFAULT_DEVICE_NAME);
}
else {
delete dev;
dev = new NullDevice();
}
......
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