[Plib-cvs] plib/src/sl sl.h,1.17,1.18 slDSP.cxx,1.18,1.19 slMODPrivate.h,1.6,1.7 slPortability.h,1.1
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-11-30 00:41:53
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/sl Modified Files: sl.h slDSP.cxx slMODPrivate.h slPortability.h sm.h smMixer.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- sl.h 15 Sep 2002 00:39:03 -0000 1.17 +++ sl.h 30 Nov 2002 00:41:49 -0000 1.18 @@ -29,15 +29,15 @@ #ifdef SL_USING_OSS_AUDIO #define SLDSP_DEFAULT_DEVICE "/dev/dsp" -#elif defined(WIN32) +#elif defined(UL_WIN32) #define SLDSP_DEFAULT_DEVICE "dsp" -#elif defined(BSD) +#elif defined(UL_BSD) #define SLDSP_DEFAULT_DEVICE "/dev/audio" -#elif defined(sgi) +#elif defined(UL_IRIX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy ... -#elif defined(SOLARIS) +#elif defined(UL_SOLARIS) #define SLDSP_DEFAULT_DEVICE "/dev/audio" -#elif defined(macintosh) || defined(__APPLE__) +#elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy #else #error "Port me !" @@ -71,19 +71,19 @@ int error ; int fd ; -#if defined (__NetBSD__) || defined(__OpenBSD__) +#ifdef UL_BSD audio_info_t ainfo; // ioctl structure audio_offset_t audio_offset; // offset in audiostream long counter; // counter-written packets -#elif defined(SOLARIS) +#elif defined(UL_SOLARIS) audio_info_t ainfo; long counter; #elif defined(SL_USING_OSS_AUDIO) audio_buf_info buff_info ; -#elif defined(sgi) +#elif defined(UL_IRIX) ALconfig config; // configuration stuff ALport port; // .. we are here -#elif defined(macintosh) || defined(__APPLE__) +#elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) // Size of the data chunks written with write(). // This should be a multiple of 1024. @@ -115,7 +115,7 @@ #endif -#if !defined(WIN32) && !defined(macintosh) +#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) int ioctl ( int cmd, int param = 0 ) { if ( error ) return param ; @@ -129,7 +129,7 @@ return param ; } -#elif defined(WIN32) +#elif defined(UL_WIN32) #define BUFFER_COUNT (3*8) #define BUFFER_SIZE (1024*1) Index: slDSP.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slDSP.cxx,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- slDSP.cxx 2 Sep 2002 06:05:47 -0000 1.18 +++ slDSP.cxx 30 Nov 2002 00:41:49 -0000 1.19 @@ -155,7 +155,7 @@ #endif -#ifdef WIN32 +#ifdef UL_WIN32 /* ------------------------------------------------------------ */ /* win32 */ @@ -413,7 +413,7 @@ /* NetBSD/OpenBSD 2.3 this should be very close to SUN Audio */ /* ------------------------------------------------------------ */ [...66 lines suppressed...] } @@ -625,7 +625,7 @@ /* SGI IRIX audio */ /* ------------------------------------------------------------ */ -#elif defined(sgi) +#elif defined(UL_IRIX) void slDSP::open ( const char *device, int _rate, int _stereo, int _bps ) { @@ -773,7 +773,7 @@ #endif -#if defined(macintosh) || defined(__APPLE__) +#if defined(UL_MACINTOSH) || defined(UL_MAC_OSX) // Print out debugging info when secondsUsed is called, Index: slMODPrivate.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slMODPrivate.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- slMODPrivate.h 2 Sep 2002 06:05:47 -0000 1.6 +++ slMODPrivate.h 30 Nov 2002 00:41:49 -0000 1.7 @@ -29,7 +29,7 @@ #include <fcntl.h> #include <sys/stat.h> -#if defined( WIN32 ) && !defined( __CYGWIN32__ ) +#ifdef UL_MSVC #include <windows.h> #include <io.h> #else Index: slPortability.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slPortability.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- slPortability.h 2 Sep 2002 06:05:47 -0000 1.11 +++ slPortability.h 30 Nov 2002 00:41:49 -0000 1.12 @@ -33,50 +33,29 @@ #include <stdio.h> #include <stdlib.h> -/* the next lines are to define BSD */ -/* see http://www.freebsd.org/handbook/porting.html for why we do this */ -#if (defined(__unix__) || defined(unix)) && !defined(USG) -#include <sys/param.h> -#endif - -#ifdef macintosh +#ifdef UL_MAC_OSX #include <Sound.h> #include <Timer.h> #ifdef __MWERKS__ #include <unix.h> #endif -#endif - -#ifdef __APPLE__ #include <Carbon/Carbon.h> #endif -#ifndef WIN32 -#include <unistd.h> -#include <sys/ioctl.h> -#else -#include <windows.h> -#ifdef __CYGWIN32__ -# define NEAR /* */ -# define FAR /* */ -# define WHERE_EVER_YOU_ARE /* Curt: optional, but it reminds me of a song */ -#endif -#include <mmsystem.h> -#endif - #include <fcntl.h> #include <sys/stat.h> #include <string.h> #include <limits.h> #include <math.h> -#if (defined(__linux__) || defined(BSD)) && !defined(__NetBSD__) +#if (defined(UL_LINUX) || defined(UL_BSD)) && !defined(__NetBSD__) #define SL_USING_OSS_AUDIO 1 #endif #ifdef SL_USING_OSS_AUDIO -# if defined(__linux__) +# if defined(UL_LINUX) # include <linux/soundcard.h> +# include <sys/ioctl.h> # elif defined(__FreeBSD__) # include <machine/soundcard.h> # else @@ -92,20 +71,19 @@ # endif #endif -#if defined (__NetBSD__) || defined(__OpenBSD__) +#ifdef UL_BSD # include <sys/audioio.h> #endif /* Tom */ -#ifdef sgi +#ifdef UL_IRIX # include <audio.h> #endif -#if defined(__svr4__) || defined(__SVR4) +#ifdef UL_SOLARIS # include <sys/audioio.h> # include <sys/stropts.h> -# define SOLARIS #endif #endif Index: sm.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sm.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sm.h 2 Sep 2002 06:05:47 -0000 1.5 +++ sm.h 30 Nov 2002 00:41:49 -0000 1.6 @@ -29,7 +29,7 @@ #ifdef SL_USING_OSS_AUDIO #define SMMIXER_DEFAULT_DEVICE "/dev/mixer" -#elif defined(WIN32) +#elif defined(UL_WIN32) #define SMMIXER_DEFAULT_DEVICE "mixer" #else #endif Index: smMixer.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/smMixer.cxx,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- smMixer.cxx 2 Sep 2002 06:05:47 -0000 1.8 +++ smMixer.cxx 30 Nov 2002 00:41:49 -0000 1.9 @@ -179,7 +179,7 @@ setVolume ( SOUND_MIXER_CD , left, right ) ; } -#elif defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(UL_BSD) /* ------------------------------------------------------------ */ /* NetBSD or OpenBSD 2.3 */ |