From: Heiga Z. <hei...@us...> - 2007-10-16 02:21:24
|
Update of /cvsroot/sp-tk/SPTK/src/bin/da In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11613/src/bin/da Modified Files: da.h dawrite.c Log Message: Arrange spaces for macros. Wrap strrchr() by rindex() if string.h does not exist. Index: dawrite.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/da/dawrite.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dawrite.c 9 Oct 2007 09:06:21 -0000 1.20 --- dawrite.c 16 Oct 2007 02:21:20 -0000 1.21 *************** *** 79,91 **** #include <stdio.h> #include <stdlib.h> ! #include <string.h> ! #ifndef WIN32 ! #include <unistd.h> #endif - #include <SPTK.h> - #include "da.h" ! #ifdef WIN32 ! #include "winplay.h" #endif --- 79,100 ---- #include <stdio.h> #include <stdlib.h> ! ! #ifdef HAVE_STRING_H ! # include <string.h> ! #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif ! #ifndef WIN32 ! # include <unistd.h> ! # include <SPTK.h> ! # include "da.h" ! #else ! # include "SPTK.h" ! # include "da.h" ! # include "winplay.h" #endif Index: da.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/da/da.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** da.h 9 Oct 2007 09:06:21 -0000 1.10 --- da.h 16 Oct 2007 02:21:20 -0000 1.11 *************** *** 57,90 **** #if defined(LINUX) || defined(FreeBSD) ! #include <sys/soundcard.h> ! #define AUDIO_DEV "/dev/dsp" ! #define MIXER_DEV "/dev/mixer" ! #define MAXAMPGAIN 100 ! #define AVAILABLE_FREQ "8,11.025,22.05,44.1" ! #define DEFAULT_FREQ 11 #endif /* LINUX or FreeBSD */ #ifdef SUNOS ! #define SPARC ! #include <sun/audioio.h> #endif /* SUNOS */ #ifdef SOLARIS ! #define SPARC ! #include <sys/audioio.h> #endif /* SOLARIS */ #ifdef SPARC ! #define AUDIO_DEV "/dev/audio" ! #define AUDIO_CTLDEV "/dev/audioctl" ! #define MAXAMPGAIN 255 ! #define AVAILABLE_FREQ "8,11.025,16,22.05,32,44.1,48" ! #define DEFAULT_FREQ 16 #endif /* SPARC */ #ifdef WIN32 ! #define AVAILABLE_FREQ "8,11.025,22.05,44.1" ! #define MAXAMPGAIN 65535 ! #define DEFAULT_FREQ 16 #endif --- 57,90 ---- #if defined(LINUX) || defined(FreeBSD) ! # include <sys/soundcard.h> ! # define AUDIO_DEV "/dev/dsp" ! # define MIXER_DEV "/dev/mixer" ! # define MAXAMPGAIN 100 ! # define AVAILABLE_FREQ "8,11.025,22.05,44.1" ! # define DEFAULT_FREQ 11 #endif /* LINUX or FreeBSD */ #ifdef SUNOS ! # define SPARC ! # include <sun/audioio.h> #endif /* SUNOS */ #ifdef SOLARIS ! # define SPARC ! # include <sys/audioio.h> #endif /* SOLARIS */ #ifdef SPARC ! # define AUDIO_DEV "/dev/audio" ! # define AUDIO_CTLDEV "/dev/audioctl" ! # define MAXAMPGAIN 255 ! # define AVAILABLE_FREQ "8,11.025,16,22.05,32,44.1,48" ! # define DEFAULT_FREQ 16 #endif /* SPARC */ #ifdef WIN32 ! # define AVAILABLE_FREQ "8,11.025,22.05,44.1" ! # define MAXAMPGAIN 65535 ! # define DEFAULT_FREQ 16 #endif |