comparison src/audio/SDL_audiodev.c @ 1402:d910939febfa

Use consistent identifiers for the various platforms we support. Make sure every source file includes SDL_config.h, so the proper system headers are chosen.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Feb 2006 08:46:50 +0000
parents c0a74f199ecf
children 12b6d331d82a
comparison
equal deleted inserted replaced
1401:1819fd069e89 1402:d910939febfa
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 #include "SDL_config.h"
22 23
23 /* Get the name of the audio device we use for output */ 24 /* Get the name of the audio device we use for output */
24 25
25 #if defined(unix) || defined(__unix__) || defined(__riscos__) 26 #if SDL_AUDIO_DRIVER_OPENBSD || SDL_AUDIO_DRIVER_OSS || SDL_AUDIO_DRIVER_SUNAUDIO
26 27
27 #include <fcntl.h> 28 #include <fcntl.h>
28 #include <sys/types.h> 29 #include <sys/types.h>
29 #include <sys/stat.h> 30 #include <sys/stat.h>
30 31
31 #include "SDL_stdinc.h" 32 #include "SDL_stdinc.h"
32 #include "SDL_audiodev_c.h" 33 #include "SDL_audiodev_c.h"
33 34
34 #ifndef _PATH_DEV_DSP 35 #ifndef _PATH_DEV_DSP
35 #if defined(__NetBSD__) || defined(__OpenBSD__) 36 #if defined(__NETBSD__) || defined(__OPENBSD__)
36 #define _PATH_DEV_DSP "/dev/audio" 37 #define _PATH_DEV_DSP "/dev/audio"
37 #else 38 #else
38 #define _PATH_DEV_DSP "/dev/dsp" 39 #define _PATH_DEV_DSP "/dev/dsp"
39 #endif 40 #endif
40 #endif 41 #endif
93 path[maxlen-1] = '\0'; 94 path[maxlen-1] = '\0';
94 } 95 }
95 return(audio_fd); 96 return(audio_fd);
96 } 97 }
97 98
98 #elif defined(_AIX) 99 #elif SDL_AUDIO_DRIVER_PAUD
99 100
100 /* Get the name of the audio device we use for output */ 101 /* Get the name of the audio device we use for output */
101 102
102 #include <sys/types.h> 103 #include <sys/types.h>
103 #include <sys/stat.h> 104 #include <sys/stat.h>
173 } 174 }
174 } 175 }
175 return -1; 176 return -1;
176 } 177 }
177 178
178 #endif /* UNIX system */ 179 #endif /* Audio driver selection */