r2707 - in trunk/libminisip: . source/soundcard

erik at minisip.org erik at minisip.org
Fri Aug 18 00:51:32 CEST 2006


Author: erik
Date: 2006-08-18 00:51:31 +0200 (Fri, 18 Aug 2006)
New Revision: 2707

Modified:
   trunk/libminisip/Makefile.am
   trunk/libminisip/configure.ac
   trunk/libminisip/source/soundcard/SoundDevice.cxx
   trunk/libminisip/source/soundcard/SoundIO.cxx
Log:

 * Made it possible to disable OSS support: We used to always include OSS
   support when we were not compiling for W32. There are other platforms 
   where we want to use other sound devices, and/or where OSS is not
   available.




Modified: trunk/libminisip/Makefile.am
===================================================================
--- trunk/libminisip/Makefile.am	2006-08-17 22:40:35 UTC (rev 2706)
+++ trunk/libminisip/Makefile.am	2006-08-17 22:51:31 UTC (rev 2707)
@@ -223,7 +223,9 @@
 libsoundcard_src = $(BASIC_SOUNDCARD_SRC)
 
 if !OS_WIN
+if ENABLE_OSS
         libsoundcard_src += source/soundcard/OssSoundDevice.cxx 
+endif ENABLE_OSS
 endif !OS_WIN
 
 if HAVE_LIBASOUND

Modified: trunk/libminisip/configure.ac
===================================================================
--- trunk/libminisip/configure.ac	2006-08-17 22:40:35 UTC (rev 2706)
+++ trunk/libminisip/configure.ac	2006-08-17 22:51:31 UTC (rev 2707)
@@ -15,8 +15,12 @@
 AM_CONFIG_HEADER(include/compilation_config.h)
 
 AM_MINISIP_LIBTOOL_EXTRAS
+
 AC_PROG_LIBTOOL
 
+
+
+
 dnl
 dnl Linker flags
 dnl mingw needs --enable-runtime-pseudo-reloc since it can't
@@ -85,7 +89,21 @@
       	AC_DEFINE(NBUZZER, [], [No iPAQ buzzer support])
       fi ])
 
+dnl OSS support
+AC_ARG_ENABLE(oss,
+    AS_HELP_STRING([--disable-oss], 
+    	[disables OSS sound IO support (default enabled)]),
+    [ if test "${enable_oss}" = "no"
+      then
+      	AC_DEFINE(NO_OSS, [], [No OSS support])
+      else
+        AC_DEFINE(ENABLE_OSS, [], [OSS support])
+      fi ])
 
+AM_CONDITIONAL(ENABLE_OSS, [test "${enable_oss}" = "yes"])
+
+
+
 dnl --with-avcodec argument
 AC_ARG_WITH(avcodec,
     AS_HELP_STRING([--with-avcodec=DIR],[location of the libavcodec tree]),

Modified: trunk/libminisip/source/soundcard/SoundDevice.cxx
===================================================================
--- trunk/libminisip/source/soundcard/SoundDevice.cxx	2006-08-17 22:40:35 UTC (rev 2706)
+++ trunk/libminisip/source/soundcard/SoundDevice.cxx	2006-08-17 22:51:31 UTC (rev 2707)
@@ -29,8 +29,10 @@
 #include<libminisip/soundcard/SoundDriverRegistry.h>
 
 #ifndef WIN32
+#ifdef ENABLE_OSS
 #	include<libminisip/soundcard/OssSoundDevice.h>
 #endif
+#endif
 
 #ifdef WAVE_SOUND
 #	include<libminisip/soundcard/WaveSoundDevice.h>
@@ -54,17 +56,26 @@
 	}
 
 #ifdef WAVE_SOUND
+#define SOUND_DEVICE_IMPLEMENTED
 	if( devideId.substr( 0, 5 ) == "wave:" ){
 		return new WaveSoundDevice( devideId.substr( 5, string::npos ) );
 	}
 #endif
 
 #ifndef WIN32
+#ifdef ENABLE_OSS
+#define SOUND_DEVICE_IMPLEMENTED
 	return new OssSoundDevice( devideId );
+#endif
 #else
 	cerr << "WARNING: No sound device is created! (BUG?)"<<endl;
 	return NULL;
 #endif
+
+
+#ifndef SOUND_DEVICE_IMPLEMENTED
+#error Minisip does not have any audio I/O capabilities as the source is configured!
+#endif
 }
 
 SoundDevice::SoundDevice( string device ):openedRecord(false),openedPlayback(false){

Modified: trunk/libminisip/source/soundcard/SoundIO.cxx
===================================================================
--- trunk/libminisip/source/soundcard/SoundIO.cxx	2006-08-17 22:40:35 UTC (rev 2706)
+++ trunk/libminisip/source/soundcard/SoundIO.cxx	2006-08-17 22:51:31 UTC (rev 2707)
@@ -70,7 +70,9 @@
 #include<libminisip/soundcard/SoundDevice.h>
 
 #ifndef WIN32
+#	ifdef ENABLE_OSS
 #	include<libminisip/soundcard/OssSoundDevice.h>
+#	endif
 #	ifdef HAVE_LIBASOUND
 #		include<libminisip/soundcard/SoundDevice.h>
 #	endif



More information about the Minisip-devel mailing list