zenilib
0.5.3.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
alExtension.c
Go to the documentation of this file.
1
21
#include "config.h"
22
23
#include <stdlib.h>
24
#include <
string.h
>
25
#include <ctype.h>
26
27
#include "
alError.h
"
28
#include "
alMain.h
"
29
#include "
alFilter.h
"
30
#include "
alEffect.h
"
31
#include "
alAuxEffectSlot.h
"
32
#include "
alSource.h
"
33
#include "
alBuffer.h
"
34
#include "AL/al.h"
35
#include "AL/alc.h"
36
37
38
const
struct
EffectList
EffectList
[] = {
39
{
"eaxreverb"
,
EAXREVERB
,
"AL_EFFECT_EAXREVERB"
,
AL_EFFECT_EAXREVERB
},
40
{
"reverb"
,
REVERB
,
"AL_EFFECT_REVERB"
,
AL_EFFECT_REVERB
},
41
{
"echo"
,
ECHO
,
"AL_EFFECT_ECHO"
,
AL_EFFECT_ECHO
},
42
{
"modulator"
,
MODULATOR
,
"AL_EFFECT_RING_MODULATOR"
,
AL_EFFECT_RING_MODULATOR
},
43
{
"dedicated"
,
DEDICATED
,
"AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT"
,
AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
},
44
{
"dedicated"
,
DEDICATED
,
"AL_EFFECT_DEDICATED_DIALOGUE"
,
AL_EFFECT_DEDICATED_DIALOGUE
},
45
{
NULL
, 0,
NULL
, (
ALenum
)0 }
46
};
47
48
49
AL_API
ALboolean
AL_APIENTRY
alIsExtensionPresent
(
const
ALchar
*extName)
50
{
51
ALboolean
ret
=
AL_FALSE
;
52
ALCcontext
*Context;
53
const
char
*ptr;
54
size_t
len
;
55
56
Context =
GetContextRef
();
57
if
(!Context)
return
AL_FALSE
;
58
59
al_try
60
{
61
CHECK_VALUE
(Context, extName);
62
63
len = strlen(extName);
64
ptr = Context->
ExtensionList
;
65
while
(ptr && *ptr)
66
{
67
if
(strncasecmp(ptr, extName, len) == 0 &&
68
(ptr[len] ==
'\0'
|| isspace(ptr[len])))
69
{
70
ret =
AL_TRUE
;
71
break
;
72
}
73
if
((ptr=strchr(ptr,
' '
)) != NULL)
74
{
75
do
{
76
++ptr;
77
}
while
(isspace(*ptr));
78
}
79
}
80
}
81
al_endtry
;
82
83
ALCcontext_DecRef
(Context);
84
return
ret
;
85
}
86
87
88
AL_API
ALvoid
*
AL_APIENTRY
alGetProcAddress
(
const
ALchar
*funcName)
89
{
90
if
(!funcName)
91
return
NULL
;
92
return
alcGetProcAddress
(NULL, funcName);
93
}
94
95
AL_API
ALenum
AL_APIENTRY
alGetEnumValue
(
const
ALchar
*enumName)
96
{
97
if
(!enumName)
98
return
(
ALenum
)0;
99
return
alcGetEnumValue
(NULL, enumName);
100
}
AL_APIENTRY
#define AL_APIENTRY
Definition:
al.h:21
ALvoid
void ALvoid
Definition:
al.h:74
alGetProcAddress
AL_API void *AL_APIENTRY alGetProcAddress(const ALchar *fname)
Definition:
alExtension.c:88
EffectList
Definition:
alMain.h:530
CHECK_VALUE
#define CHECK_VALUE(ctx, cond)
Definition:
alMain.h:875
AL_TRUE
#define AL_TRUE
Definition:
al.h:86
ALchar
char ALchar
Definition:
al.h:41
NULL
#define NULL
Definition:
ftobjs.h:61
ALCcontext_struct::ExtensionList
const ALCchar * ExtensionList
Definition:
alMain.h:705
al_try
#define al_try
Definition:
alMain.h:838
ECHO
Definition:
alEffect.h:13
AL_FALSE
#define AL_FALSE
Definition:
al.h:83
MODULATOR
Definition:
alEffect.h:14
alBuffer.h
alcGetProcAddress
ALC_API ALCvoid *ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcName)
Definition:
ALc.c:2411
alError.h
alFilter.h
alSource.h
al_endtry
#define al_endtry
Definition:
alMain.h:853
alcGetEnumValue
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumName)
Definition:
ALc.c:2437
len
GLenum GLsizei len
Definition:
glew.h:7035
GetContextRef
ALCcontext * GetContextRef(void)
Definition:
ALc.c:1999
ret
ret
Definition:
glew_str_glx.c:2
alGetEnumValue
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename)
Definition:
alExtension.c:95
REVERB
Definition:
alEffect.h:12
EAXREVERB
Definition:
alEffect.h:11
DEDICATED
Definition:
alEffect.h:15
alAuxEffectSlot.h
alMain.h
AL_EFFECT_REVERB
#define AL_EFFECT_REVERB
Definition:
efx.h:155
AL_EFFECT_DEDICATED_DIALOGUE
#define AL_EFFECT_DEDICATED_DIALOGUE
Definition:
alext.h:202
ALenum
int ALenum
Definition:
al.h:65
AL_API
#define AL_API
Definition:
al.h:14
ALCcontext_DecRef
void ALCcontext_DecRef(ALCcontext *context)
Definition:
ALc.c:1949
alIsExtensionPresent
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname)
Definition:
alExtension.c:49
alEffect.h
ALCcontext_struct
Definition:
alMain.h:675
String.h
ALboolean
char ALboolean
Definition:
al.h:38
AL_EFFECT_RING_MODULATOR
#define AL_EFFECT_RING_MODULATOR
Definition:
efx.h:163
AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
Definition:
alext.h:203
AL_EFFECT_ECHO
#define AL_EFFECT_ECHO
Definition:
efx.h:158
AL_EFFECT_EAXREVERB
#define AL_EFFECT_EAXREVERB
Definition:
efx.h:167
zenilib
jni
external
openal-soft
OpenAL32
alExtension.c
Generated on Thu Oct 3 2013 19:56:27 for zenilib by
1.8.5