]> git.jsancho.org Git - lugaru.git/blob - Dependencies/OpenAL/include/AL/alc.h
Moving OpenAL into dependencies.
[lugaru.git] / Dependencies / OpenAL / include / AL / alc.h
1 #ifndef ALC_CONTEXT_H_
2 #define ALC_CONTEXT_H_
3
4 #include "altypes.h"
5 #include "alctypes.h"
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 #define ALC_VERSION_0_1         1
12
13 #ifdef _WIN32
14  #ifdef _OPENAL32LIB
15   #define ALCAPI __declspec(dllexport)
16  #else
17   #define ALCAPI __declspec(dllimport)
18  #endif
19
20  typedef struct ALCdevice_struct ALCdevice;
21  typedef struct ALCcontext_struct ALCcontext;
22
23  #define ALCAPIENTRY __cdecl
24 #else
25  #ifdef TARGET_OS_MAC
26   #if TARGET_OS_MAC
27    #pragma export on
28   #endif
29  #endif
30
31  #define ALCAPI
32  #define ALCAPIENTRY
33 #endif
34
35 #ifndef AL_NO_PROTOTYPES
36
37 ALCAPI ALCcontext * ALCAPIENTRY alcCreateContext( ALCdevice *dev,
38                                                 ALint* attrlist );
39
40 /**
41  * There is no current context, as we can mix
42  *  several active contexts. But al* calls
43  *  only affect the current context.
44  */
45 ALCAPI ALCenum ALCAPIENTRY alcMakeContextCurrent( ALCcontext *alcHandle );
46
47 /**
48  * Perform processing on a synced context, non-op on a asynchronous
49  * context.
50  */
51 ALCAPI ALCcontext * ALCAPIENTRY alcProcessContext( ALCcontext *alcHandle );
52
53 /**
54  * Suspend processing on an asynchronous context, non-op on a
55  * synced context.
56  */
57 ALCAPI void ALCAPIENTRY alcSuspendContext( ALCcontext *alcHandle );
58
59 ALCAPI ALCenum ALCAPIENTRY alcDestroyContext( ALCcontext *alcHandle );
60
61 ALCAPI ALCenum ALCAPIENTRY alcGetError( ALCdevice *dev );
62
63 ALCAPI ALCcontext * ALCAPIENTRY alcGetCurrentContext( ALvoid );
64
65 ALCAPI ALCdevice *alcOpenDevice( const ALubyte *tokstr );
66 ALCAPI void alcCloseDevice( ALCdevice *dev );
67
68 ALCAPI ALboolean ALCAPIENTRY alcIsExtensionPresent(ALCdevice *device, ALubyte *extName);
69 ALCAPI ALvoid  * ALCAPIENTRY alcGetProcAddress(ALCdevice *device, ALubyte *funcName);
70 ALCAPI ALenum    ALCAPIENTRY alcGetEnumValue(ALCdevice *device, ALubyte *enumName);
71
72 ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *context);
73
74
75 /**
76  * Query functions
77  */
78 const ALubyte * alcGetString( ALCdevice *deviceHandle, ALenum token );
79 void alcGetIntegerv( ALCdevice *deviceHandle, ALenum  token , ALsizei  size , ALint *dest );
80
81 #else
82       ALCcontext *   (*alcCreateContext)( ALCdevice *dev, ALint* attrlist );
83       ALCenum        (*alcMakeContextCurrent)( ALCcontext *alcHandle );
84       ALCcontext *   (*alcProcessContext)( ALCcontext *alcHandle );
85       void           (*alcSuspendContext)( ALCcontext *alcHandle );
86       ALCenum        (*alcDestroyContext)( ALCcontext *alcHandle );
87       ALCenum        (*alcGetError)( ALCdevice *dev );
88       ALCcontext *   (*alcGetCurrentContext)( ALvoid );
89       ALCdevice *    (*alcOpenDevice)( const ALubyte *tokstr );
90       void           (*alcCloseDevice)( ALCdevice *dev );
91       ALboolean      (*alcIsExtensionPresent)( ALCdevice *device, ALubyte *extName );
92       ALvoid  *      (*alcGetProcAddress)(ALCdevice *device, ALubyte *funcName );
93       ALenum         (*alcGetEnumValue)(ALCdevice *device, ALubyte *enumName);
94       ALCdevice*     (*alcGetContextsDevice)(ALCcontext *context);
95       const ALubyte* (*alcGetString)( ALCdevice *deviceHandle, ALenum token );
96       void           (*alcGetIntegerv*)( ALCdevice *deviceHandle, ALenum  token , ALsizei  size , ALint *dest );
97
98 #endif /* AL_NO_PROTOTYPES */
99
100 #ifdef TARGET_OS_MAC
101 #if TARGET_OS_MAC
102 #pragma export off
103 #endif /* TARGET_OS_MAC */
104 #endif /* TARGET_OS_MAC */
105
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif /* ALC_CONTEXT_H_ */