1 #ifndef _ALUT_H_
2 #define _ALUT_H_
3 
4 /* define platform type */
5 #if !defined(MACINTOSH_AL) && !defined(LINUX_AL) && !defined(WINDOWS_AL)
6   #ifdef __APPLE__
7     #define MACINTOSH_AL
8     #else
9     #ifdef _WIN32
10       #define WINDOWS_AL
11     #else
12       #define LINUX_AL
13     #endif
14   #endif
15 #endif
16 
17 #include "altypes.h"
18 
19 #ifdef _WIN32
20 #define ALUTAPI
21 #define ALUTAPIENTRY    __cdecl
22 #define AL_CALLBACK
23 #else  /* _WIN32 */
24 
25 #ifdef TARGET_OS_MAC
26 #if TARGET_OS_MAC
27 #pragma export on
28 #endif /* TARGET_OS_MAC */
29 #endif /* TARGET_OS_MAC */
30 
31 #ifndef ALUTAPI
32 #define ALUTAPI
33 #endif
34 
35 #ifndef ALUTAPIENTRY
36 #define ALUTAPIENTRY
37 #endif
38 
39 #ifndef AL_CALLBACK
40 #define AL_CALLBACK
41 #endif
42 
43 #endif /* _WIN32 */
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #ifndef ALUT_NO_PROTOTYPES
50 
51 ALUTAPI void ALUTAPIENTRY alutInit(int *argc, char *argv[]);
52 ALUTAPI void ALUTAPIENTRY alutExit(ALvoid);
53 
54 #ifndef MACINTOSH_AL
55 /* Windows and Linux versions have a loop parameter, Macintosh doesn't */
56 ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
57 ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq, ALboolean *loop);
58 #else
59 ALUTAPI void ALUTAPIENTRY alutLoadWAVFile(ALbyte *file, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
60 ALUTAPI void ALUTAPIENTRY alutLoadWAVMemory(ALbyte *memory, ALenum *format, ALvoid **data, ALsizei *size, ALsizei *freq);
61 #endif
62 
63 ALUTAPI void ALUTAPIENTRY alutUnloadWAV(ALenum format, ALvoid *data, ALsizei size, ALsizei freq);
64 
65 #else /* ALUT_NO_PROTOTYPES */
66 
67     void      (ALUTAPIENTRY *alutInit)( int *argc, char *argv[] );
68     void 	  (ALUTAPIENTRY *alutExit)( ALvoid );
69 #ifndef MACINTOSH_AL
70     void      (ALUTAPIENTRY *alutLoadWAVFile)( ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop );
71     void      (ALUTAPIENTRY *alutLoadWAVMemory)( ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop );
72 #else
73     void      (ALUTAPIENTRY *alutLoadWAVFile( ALbyte *file,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq );
74     void      (ALUTAPIENTRY *alutLoadWAVMemory)( ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq );
75 #endif
76     void      (ALUTAPIENTRY *alutUnloadWAV)( ALenum format,ALvoid *data,ALsizei size,ALsizei freq );
77 
78 #endif /* ALUT_NO_PROTOTYPES */
79 
80 #ifdef TARGET_OS_MAC
81 #if TARGET_OS_MAC
82 #pragma export off
83 #endif /* TARGET_OS_MAC */
84 #endif /* TARGET_OS_MAC */
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
91