Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/freealut-1.1.0/include/AL/alut.h @ 19

Last change on this file since 19 was 14, checked in by landauf, 17 years ago

added freealut

File size: 5.1 KB
RevLine 
[14]1#if !defined(AL_ALUT_H)
2#define AL_ALUT_H
3
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
14
15#if defined(__cplusplus)
16extern "C" {
17#endif
18
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
32
33#if defined(_WIN32)
34 #define ALUT_APIENTRY __cdecl
35#else
36 #define ALUT_APIENTRY
37#endif
38
39#if defined(__MWERKS_)
40 #pragma export on
41#endif
42
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
51
52#define ALUT_API_MAJOR_VERSION                 1
53#define ALUT_API_MINOR_VERSION                 1
54
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
74
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
80
81#define ALUT_LOADER_BUFFER                     0x300
82#define ALUT_LOADER_MEMORY                     0x301
83
84ALUT_API ALboolean ALUT_APIENTRY alutInit (int *argcp, char **argv);
85ALUT_API ALboolean ALUT_APIENTRY alutInitWithoutContext (int *argcp, char **argv);
86ALUT_API ALboolean ALUT_APIENTRY alutExit (void);
87
88ALUT_API ALenum ALUT_APIENTRY alutGetError (void);
89ALUT_API const char *ALUT_APIENTRY alutGetErrorString (ALenum error);
90
91ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFile (const char *fileName);
92ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFileImage (const ALvoid *data, ALsizei length);
93ALUT_API ALuint ALUT_APIENTRY alutCreateBufferHelloWorld (void);
94ALUT_API ALuint ALUT_APIENTRY alutCreateBufferWaveform (ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration);
95
96ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryFromFile (const char *fileName, ALenum *format, ALsizei *size, ALfloat *frequency);
97ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryFromFileImage (const ALvoid *data, ALsizei length, ALenum *format, ALsizei *size, ALfloat *frequency);
98ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryHelloWorld (ALenum *format, ALsizei *size, ALfloat *frequency);
99ALUT_API ALvoid *ALUT_APIENTRY alutLoadMemoryWaveform (ALenum waveshape, ALfloat frequency, ALfloat phase, ALfloat duration, ALenum *format, ALsizei *size, ALfloat *freq);
100
101ALUT_API const char *ALUT_APIENTRY alutGetMIMETypes (ALenum loader);
102
103ALUT_API ALint ALUT_APIENTRY alutGetMajorVersion (void);
104ALUT_API ALint ALUT_APIENTRY alutGetMinorVersion (void);
105
106ALUT_API ALboolean ALUT_APIENTRY alutSleep (ALfloat duration);
107
108/* Nasty Compatibility stuff, WARNING: THESE FUNCTIONS ARE STRONGLY DEPRECATED */
109#if defined(__APPLE__)
110ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVFile (ALbyte *fileName, ALenum *format, void **data, ALsizei *size, ALsizei *frequency);
111ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVMemory (ALbyte *buffer, ALenum *format, void **data, ALsizei *size, ALsizei *frequency);
112#else
113ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVFile (ALbyte *fileName, ALenum *format, void **data, ALsizei *size, ALsizei *frequency, ALboolean *loop);
114ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutLoadWAVMemory (ALbyte *buffer, ALenum *format, void **data, ALsizei *size, ALsizei *frequency, ALboolean *loop);
115#endif
116ALUT_API ALUT_ATTRIBUTE_DEPRECATED void ALUT_APIENTRY alutUnloadWAV (ALenum format, ALvoid *data, ALsizei size, ALsizei frequency);
117
118#if defined(__MWERKS_)
119 #pragma export off
120#endif
121
122#if defined(__cplusplus)
123}
124#endif
125
126#endif
Note: See TracBrowser for help on using the repository browser.