AboutForm.ui: About dialog for mines3d v2.
[mines3d.git] / sound / include / alut.h
blob4b05a3cb923b5c1377584c19d4e4fe4aba5616a3
1 #if !defined(AL_ALUT_H)
2 #define AL_ALUT_H
4 #if defined(_MSC_VER)
5 #include <alc.h>
6 #include <al.h>
7 #elif defined(__APPLE__)
8 #include <OpenAL/alc.h>
9 #include <OpenAL/al.h>
10 #else
11 #include <AL/al.h>
12 #include <AL/alc.h>
13 #endif
15 #if defined(__cplusplus)
16 extern "C" {
17 #endif
19 #if defined(_WIN32) && !defined(_XBOX)
20 #if defined (ALUT_BUILD_LIBRARY)
21 #define ALUT_API __declspec(dllexport)
22 #else
23 #define ALUT_API __declspec(dllimport)
24 #endif
25 #else
26 #if defined(ALUT_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
27 #define ALUT_API __attribute__((visibility("default")))
28 #else
29 #define ALUT_API extern
30 #endif
31 #endif
33 #if defined(_WIN32)
34 #define ALUT_APIENTRY __cdecl
35 #else
36 #define ALUT_APIENTRY
37 #endif
39 #if defined(__MWERKS_)
40 #pragma export on
41 #endif
43 /* Flag deprecated functions if possible (VisualC++ .NET and GCC >= 3.1.1). */
44 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(MIDL_PASS)
45 #define ALUT_ATTRIBUTE_DEPRECATED __declspec(deprecated)
46 #elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))))
47 #define ALUT_ATTRIBUTE_DEPRECATED __attribute__((deprecated))
48 #else
49 #define ALUT_ATTRIBUTE_DEPRECATED
50 #endif
52 #define ALUT_API_MAJOR_VERSION 1
53 #define ALUT_API_MINOR_VERSION 1
55 #define ALUT_ERROR_NO_ERROR 0
56 #define ALUT_ERROR_OUT_OF_MEMORY 0x200
57 #define ALUT_ERROR_INVALID_ENUM 0x201
58 #define ALUT_ERROR_INVALID_VALUE 0x202
59 #define ALUT_ERROR_INVALID_OPERATION 0x203
60 #define ALUT_ERROR_NO_CURRENT_CONTEXT 0x204
61 #define ALUT_ERROR_AL_ERROR_ON_ENTRY 0x205
62 #define ALUT_ERROR_ALC_ERROR_ON_ENTRY 0x206
63 #define ALUT_ERROR_OPEN_DEVICE 0x207
64 #define ALUT_ERROR_CLOSE_DEVICE 0x208
65 #define ALUT_ERROR_CREATE_CONTEXT 0x209
66 #define ALUT_ERROR_MAKE_CONTEXT_CURRENT 0x20A
67 #define ALUT_ERROR_DESTROY_CONTEXT 0x20B
68 #define ALUT_ERROR_GEN_BUFFERS 0x20C
69 #define ALUT_ERROR_BUFFER_DATA 0x20D
70 #define ALUT_ERROR_IO_ERROR 0x20E
71 #define ALUT_ERROR_UNSUPPORTED_FILE_TYPE 0x20F
72 #define ALUT_ERROR_UNSUPPORTED_FILE_SUBTYPE 0x210
73 #define ALUT_ERROR_CORRUPT_OR_TRUNCATED_DATA 0x211
75 #define ALUT_WAVEFORM_SINE 0x100
76 #define ALUT_WAVEFORM_SQUARE 0x101
77 #define ALUT_WAVEFORM_SAWTOOTH 0x102
78 #define ALUT_WAVEFORM_WHITENOISE 0x103
79 #define ALUT_WAVEFORM_IMPULSE 0x104
81 #define ALUT_LOADER_BUFFER 0x300
82 #define ALUT_LOADER_MEMORY 0x301
84 ALUT_API ALboolean ALUT_APIENTRY alutInit (int *argcp, char **argv);
85 ALUT_API ALboolean ALUT_APIENTRY alutInitWithoutContext (int *argcp, char **argv);
86 ALUT_API ALboolean ALUT_APIENTRY alutExit (void);
88 ALUT_API ALenum ALUT_APIENTRY alutGetError (void);
89 ALUT_API const char *ALUT_APIENTRY alutGetErrorString (ALenum error);
91 ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFile (const char *fileName);
92 ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFileImage (const ALvoid *data, ALsizei length);
93 ALUT_API ALuint ALUT_APIENTRY alutCreateBufferHelloWorld (void);
94 ALUT_API ALuint ALUT_APIENTRY alutCreateBufferWaveform (ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration);
96 ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryFromFile (const char *fileName, ALenum *format, ALsizei *size, ALfloat *frequency);
97 ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryFromFileImage (const ALvoid *data, ALsizei length, ALenum *format, ALsizei *size, ALfloat *frequency);
98 ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryHelloWorld (ALenum *format, ALsizei *size, ALfloat *frequency);
99 ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryWaveform (ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration, ALenum *format, ALsizei *size, ALfloat *freq);
101 ALUT_API const char *ALUT_APIENTRY alutGetMIMETypes (ALenum loader);
103 ALUT_API ALint ALUT_APIENTRY alutGetMajorVersion (void);
104 ALUT_API ALint ALUT_APIENTRY alutGetMinorVersion (void);
106 ALUT_API ALboolean ALUT_APIENTRY alutSleep (ALfloat duration);
108 /* Nasty Compatibility stuff, WARNING: THESE FUNCTIONS ARE STRONGLY DEPRECATED */
109 #if defined(__APPLE__)
110 ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVFile (ALbyte *fileName, ALenum *format, void **data, ALsizei *size, ALsizei *frequency);
111 ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVMemory (ALbyte *buffer, ALenum *format, void **data, ALsizei *size, ALsizei *frequency);
112 #else
113 ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVFile (ALbyte *fileName, ALenum *format, void **data, ALsizei *size, ALsizei *frequency, ALboolean *loop);
114 ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVMemory (ALbyte *buffer, ALenum *format, void **data, ALsizei *size, ALsizei *frequency, ALboolean *loop);
115 #endif
116 ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutUnloadWAV (ALenum format, ALvoid *data, ALsizei size, ALsizei frequency);
118 #if defined(__MWERKS_)
119 #pragma export off
120 #endif
122 #if defined(__cplusplus)
124 #endif
126 #endif