1 2 /* 3 * xa_audio.h 4 * 5 * Copyright (C) 1994-1998,1999 by Mark Podlipec. 6 * All rights reserved. 7 * 8 * This software may be freely used, copied and redistributed without 9 * fee for non-commerical purposes provided that this copyright 10 * notice is preserved intact on all copies. 11 * 12 * There is no warranty or other guarantee of fitness of this software. 13 * It is provided solely "as is". The author disclaims all 14 * responsibility and liability with respect to this software's usage 15 * or its effect upon hardware or computer systems. 16 * 17 */ 18 19 20 #include "xanim.h" 21 #include <Intrinsic.h> 22 #include <StringDefs.h> 23 #include <Shell.h> 24 25 #include "xa_x11.h" 26 #include "xa_ipc.h" 27 #include "xa_ipc_cmds.h" 28 29 extern xaULONG xa_forkit; 30 31 /* Rather than spend time figuring out which ones are common 32 * across machine types, just redo them all each time. 33 * Eventually I'll simplify. 34 */ 35 36 37 /*********************** SPARC INCLUDES ********************************/ 38 #ifdef XA_SPARC_AUDIO 39 /* Sun 4.1 -I/usr/demo/SOUND/multimedia ??? */ 40 #include <errno.h> 41 #include <fcntl.h> 42 #include <stropts.h> 43 #ifdef SVR4 /* was SOLARIS */ 44 #include <sys/audioio.h> 45 #else 46 #include <sun/audioio.h> 47 #endif 48 #include <sys/file.h> 49 #include <sys/stat.h> 50 #endif 51 52 /*********************** DEC Multimedia Services INCLUDES = **************/ 53 #ifdef XA_MMS_AUDIO 54 /* 55 #ifdef BYTE 56 #undef BYTE 57 #endif 58 #ifdef WORD 59 #undef WORD 60 #endif 61 #ifdef LONG 62 #undef LONG 63 #endif 64 #ifdef UWORD 65 #undef UWORD 66 #endif 67 #ifdef SHORT 68 #undef SHORT 69 #endif 70 */ 71 #include <mme/mme_api.h> 72 #ifdef XA_MMS_160 73 #include <mme/mmsystem.h> 74 #endif 75 #endif 76 77 78 /*********************** IBM S6000 INCLUDES ******************************/ 79 #ifdef XA_AIX_AUDIO 80 #include <errno.h> 81 #include <fcntl.h> 82 #include <sys/audio.h> 83 #include <stropts.h> 84 #include <sys/types.h> 85 #include <sys/file.h> 86 #include <sys/stat.h> 87 #include <sys/param.h> 88 #endif 89 90 /*********************** NEC EWS INCLUDES ******************************/ 91 #ifdef XA_EWS_AUDIO 92 #include <errno.h> 93 #include <sys/audio.h> 94 #endif 95 96 /*********************** SONY NEWS INCLUDES ****************************/ 97 #ifdef XA_SONY_AUDIO 98 #include <errno.h> 99 #ifdef SVR4 100 #include <sys/sound.h> 101 #else /* SVR4 */ 102 #include <newsiodev/sound.h> 103 #endif 104 #endif /* XA_SONY_AUDIO */ 105 106 /*********************** NetBSD INCLUDES *******************************/ 107 #ifdef XA_NetBSD_AUDIO 108 #include <errno.h> 109 #include <fcntl.h> 110 #include <sys/audioio.h> 111 #include <sys/file.h> 112 #include <sys/stat.h> 113 #include <sys/ioctl.h> 114 #include <sys/ioccom.h> 115 #endif 116 117 118 /*********************** LINUX INCLUDES ********************************/ 119 #ifdef XA_LINUX_AUDIO 120 #include <errno.h> 121 #include <fcntl.h> 122 #include <sys/time.h> 123 /* POD NOTE: possibly <machine/soundcard.h> ???*/ 124 125 #if defined(__bsdi__) && _BSDI_VERSION < 199510 126 #include <i386/isa/sblast.h> 127 #define SNDCTL_DSP_SYNC DSP_IOCTL_FLUSH 128 #define SNDCTL_DSP_STEREO DSP_IOCTL_STEREO 129 #define SNDCTL_DSP_SPEED DSP_IOCTL_SPEED 130 /* #define SNDCTL_DSP_SAMPLESIZE */ 131 /* #define SNDCTL_DSP_GETBLKSIZE this value is ignored anyway */ 132 #define SOUND_MIXER_READ_DEVMASK MIXER_IOCTL_READ_PARAMS 133 #define SOUND_MIXER_PCM 10 /* to make sure it's ignored */ 134 #define SOUND_MIXER_VOLUME MIXER_IOCTL_SET_LEVELS 135 #define MIXER_WRITE(n) n 136 #define _FILE_DSP "/dev/sb_dsp" 137 #define _FILE_MIXER "/dev/sb_mixer" 138 #else 139 #define _FILE_DSP "/dev/dsp" 140 #define _FILE_MIXER "/dev/mixer" 141 #ifdef __FreeBSD__ 142 #if __FreeBSD__ > 3 143 #include <sys/soundcard.h> 144 #else 145 #include <machine/soundcard.h> 146 #endif 147 #else 148 #include <sys/soundcard.h> 149 #endif 150 #endif /* end __bsdi__ */ 151 152 #endif /* end LINUX */ 153 154 /*********************** SGI INCLUDES **********************************/ 155 #ifdef XA_SGI_AUDIO 156 #include <errno.h> 157 #include <fcntl.h> 158 #include <stropts.h> 159 #include <sys/time.h> 160 #include <audio.h> 161 #include <math.h> 162 #endif 163 164 /*********************** HP INCLUDES ***********************************/ 165 #ifdef XA_HP_AUDIO 166 #include <fcntl.h> 167 #include <time.h> 168 #include <sys/socket.h> 169 #include <netinet/in.h> 170 #include <errno.h> 171 #ifdef XA_HP10 172 #include <Alib.h> 173 #include <CUlib.h> 174 #else /* HPUX 9.x */ 175 #include <audio/Alib.h> 176 #include <audio/CUlib.h> 177 #endif 178 #endif 179 180 #ifdef XA_HPDEV_AUDIO 181 #include <stdlib.h> 182 #include <stdio.h> 183 #include <fcntl.h> 184 #include <time.h> 185 #include <errno.h> 186 #include <sys/audio.h> 187 #endif 188 189 190 /*********************** AF(AudioFile) INCLUDES ************************/ 191 #ifdef XA_AF_AUDIO 192 #include <AF/audio.h> 193 #include <AF/AFlib.h> 194 #include <AF/AFUtils.h> 195 #endif 196 197 /*********************** NAS(Network Audio System) INCLUDES *************/ 198 #ifdef XA_NAS_AUDIO 199 #undef xaBYTE 200 #include <audio/audiolib.h> 201 #include <audio/soundlib.h> 202 #include <audio/Xtutil.h> 203 #endif 204 205 /*********************** TOWNS Linux INCLUDES **************************/ 206 #ifdef XA_TOWNS_AUDIO 207 #include <linux/fmmidi.h> 208 #endif 209 210 /*********************** TOWNS Linux 8 bit PCM INCLUDES *****************/ 211 #ifdef XA_TOWNS8_AUDIO 212 #endif 213 214 215 /*********************** END INCLUDES ********************************/ 216 217