aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-04-28 15:07:38 -0700
committerChris Robinson <[email protected]>2010-04-28 15:07:38 -0700
commit5730ccaa394714baed84177a5f2742275486a2c0 (patch)
treef64fb8c1ccbe38932af64d81ecb640af0417c03c
parentaaa7082aa81c5862c0c11daab0ca4e93e9c47591 (diff)
Combine AL and ALC function lists
-rw-r--r--Alc/ALc.c130
-rw-r--r--OpenAL32/alExtension.c148
2 files changed, 133 insertions, 145 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index b02d800e..438594e2 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -121,6 +121,136 @@ static const ALCfunction alcFunctions[] = {
{ "alcSetThreadContext", (ALCvoid *) alcSetThreadContext },
{ "alcGetThreadContext", (ALCvoid *) alcGetThreadContext },
+ { "alEnable", (ALCvoid *) alEnable },
+ { "alDisable", (ALCvoid *) alDisable },
+ { "alIsEnabled", (ALCvoid *) alIsEnabled },
+ { "alGetString", (ALCvoid *) alGetString },
+ { "alGetBooleanv", (ALCvoid *) alGetBooleanv },
+ { "alGetIntegerv", (ALCvoid *) alGetIntegerv },
+ { "alGetFloatv", (ALCvoid *) alGetFloatv },
+ { "alGetDoublev", (ALCvoid *) alGetDoublev },
+ { "alGetBoolean", (ALCvoid *) alGetBoolean },
+ { "alGetInteger", (ALCvoid *) alGetInteger },
+ { "alGetFloat", (ALCvoid *) alGetFloat },
+ { "alGetDouble", (ALCvoid *) alGetDouble },
+ { "alGetError", (ALCvoid *) alGetError },
+ { "alIsExtensionPresent", (ALCvoid *) alIsExtensionPresent },
+ { "alGetProcAddress", (ALCvoid *) alGetProcAddress },
+ { "alGetEnumValue", (ALCvoid *) alGetEnumValue },
+ { "alListenerf", (ALCvoid *) alListenerf },
+ { "alListener3f", (ALCvoid *) alListener3f },
+ { "alListenerfv", (ALCvoid *) alListenerfv },
+ { "alListeneri", (ALCvoid *) alListeneri },
+ { "alListener3i", (ALCvoid *) alListener3i },
+ { "alListeneriv", (ALCvoid *) alListeneriv },
+ { "alGetListenerf", (ALCvoid *) alGetListenerf },
+ { "alGetListener3f", (ALCvoid *) alGetListener3f },
+ { "alGetListenerfv", (ALCvoid *) alGetListenerfv },
+ { "alGetListeneri", (ALCvoid *) alGetListeneri },
+ { "alGetListener3i", (ALCvoid *) alGetListener3i },
+ { "alGetListeneriv", (ALCvoid *) alGetListeneriv },
+ { "alGenSources", (ALCvoid *) alGenSources },
+ { "alDeleteSources", (ALCvoid *) alDeleteSources },
+ { "alIsSource", (ALCvoid *) alIsSource },
+ { "alSourcef", (ALCvoid *) alSourcef },
+ { "alSource3f", (ALCvoid *) alSource3f },
+ { "alSourcefv", (ALCvoid *) alSourcefv },
+ { "alSourcei", (ALCvoid *) alSourcei },
+ { "alSource3i", (ALCvoid *) alSource3i },
+ { "alSourceiv", (ALCvoid *) alSourceiv },
+ { "alGetSourcef", (ALCvoid *) alGetSourcef },
+ { "alGetSource3f", (ALCvoid *) alGetSource3f },
+ { "alGetSourcefv", (ALCvoid *) alGetSourcefv },
+ { "alGetSourcei", (ALCvoid *) alGetSourcei },
+ { "alGetSource3i", (ALCvoid *) alGetSource3i },
+ { "alGetSourceiv", (ALCvoid *) alGetSourceiv },
+ { "alSourcePlayv", (ALCvoid *) alSourcePlayv },
+ { "alSourceStopv", (ALCvoid *) alSourceStopv },
+ { "alSourceRewindv", (ALCvoid *) alSourceRewindv },
+ { "alSourcePausev", (ALCvoid *) alSourcePausev },
+ { "alSourcePlay", (ALCvoid *) alSourcePlay },
+ { "alSourceStop", (ALCvoid *) alSourceStop },
+ { "alSourceRewind", (ALCvoid *) alSourceRewind },
+ { "alSourcePause", (ALCvoid *) alSourcePause },
+ { "alSourceQueueBuffers", (ALCvoid *) alSourceQueueBuffers },
+ { "alSourceUnqueueBuffers", (ALCvoid *) alSourceUnqueueBuffers },
+ { "alGenBuffers", (ALCvoid *) alGenBuffers },
+ { "alDeleteBuffers", (ALCvoid *) alDeleteBuffers },
+ { "alIsBuffer", (ALCvoid *) alIsBuffer },
+ { "alBufferData", (ALCvoid *) alBufferData },
+ { "alBufferf", (ALCvoid *) alBufferf },
+ { "alBuffer3f", (ALCvoid *) alBuffer3f },
+ { "alBufferfv", (ALCvoid *) alBufferfv },
+ { "alBufferi", (ALCvoid *) alBufferi },
+ { "alBuffer3i", (ALCvoid *) alBuffer3i },
+ { "alBufferiv", (ALCvoid *) alBufferiv },
+ { "alGetBufferf", (ALCvoid *) alGetBufferf },
+ { "alGetBuffer3f", (ALCvoid *) alGetBuffer3f },
+ { "alGetBufferfv", (ALCvoid *) alGetBufferfv },
+ { "alGetBufferi", (ALCvoid *) alGetBufferi },
+ { "alGetBuffer3i", (ALCvoid *) alGetBuffer3i },
+ { "alGetBufferiv", (ALCvoid *) alGetBufferiv },
+ { "alDopplerFactor", (ALCvoid *) alDopplerFactor },
+ { "alDopplerVelocity", (ALCvoid *) alDopplerVelocity },
+ { "alSpeedOfSound", (ALCvoid *) alSpeedOfSound },
+ { "alDistanceModel", (ALCvoid *) alDistanceModel },
+
+ { "alGenFilters", (ALCvoid *) alGenFilters },
+ { "alDeleteFilters", (ALCvoid *) alDeleteFilters },
+ { "alIsFilter", (ALCvoid *) alIsFilter },
+ { "alFilteri", (ALCvoid *) alFilteri },
+ { "alFilteriv", (ALCvoid *) alFilteriv },
+ { "alFilterf", (ALCvoid *) alFilterf },
+ { "alFilterfv", (ALCvoid *) alFilterfv },
+ { "alGetFilteri", (ALCvoid *) alGetFilteri },
+ { "alGetFilteriv", (ALCvoid *) alGetFilteriv },
+ { "alGetFilterf", (ALCvoid *) alGetFilterf },
+ { "alGetFilterfv", (ALCvoid *) alGetFilterfv },
+
+ { "alGenEffects", (ALCvoid *) alGenEffects },
+ { "alDeleteEffects", (ALCvoid *) alDeleteEffects },
+ { "alIsEffect", (ALCvoid *) alIsEffect },
+ { "alEffecti", (ALCvoid *) alEffecti },
+ { "alEffectiv", (ALCvoid *) alEffectiv },
+ { "alEffectf", (ALCvoid *) alEffectf },
+ { "alEffectfv", (ALCvoid *) alEffectfv },
+ { "alGetEffecti", (ALCvoid *) alGetEffecti },
+ { "alGetEffectiv", (ALCvoid *) alGetEffectiv },
+ { "alGetEffectf", (ALCvoid *) alGetEffectf },
+ { "alGetEffectfv", (ALCvoid *) alGetEffectfv },
+
+ { "alGenAuxiliaryEffectSlots", (ALCvoid *) alGenAuxiliaryEffectSlots},
+ { "alDeleteAuxiliaryEffectSlots",(ALCvoid *) alDeleteAuxiliaryEffectSlots},
+ { "alIsAuxiliaryEffectSlot", (ALCvoid *) alIsAuxiliaryEffectSlot },
+ { "alAuxiliaryEffectSloti", (ALCvoid *) alAuxiliaryEffectSloti },
+ { "alAuxiliaryEffectSlotiv", (ALCvoid *) alAuxiliaryEffectSlotiv },
+ { "alAuxiliaryEffectSlotf", (ALCvoid *) alAuxiliaryEffectSlotf },
+ { "alAuxiliaryEffectSlotfv", (ALCvoid *) alAuxiliaryEffectSlotfv },
+ { "alGetAuxiliaryEffectSloti", (ALCvoid *) alGetAuxiliaryEffectSloti},
+ { "alGetAuxiliaryEffectSlotiv", (ALCvoid *) alGetAuxiliaryEffectSlotiv},
+ { "alGetAuxiliaryEffectSlotf", (ALCvoid *) alGetAuxiliaryEffectSlotf},
+ { "alGetAuxiliaryEffectSlotfv", (ALCvoid *) alGetAuxiliaryEffectSlotfv},
+
+ { "alBufferSubDataEXT", (ALCvoid *) alBufferSubDataEXT },
+
+ { "alGenDatabuffersEXT", (ALCvoid *) alGenDatabuffersEXT },
+ { "alDeleteDatabuffersEXT", (ALCvoid *) alDeleteDatabuffersEXT },
+ { "alIsDatabufferEXT", (ALCvoid *) alIsDatabufferEXT },
+ { "alDatabufferDataEXT", (ALCvoid *) alDatabufferDataEXT },
+ { "alDatabufferSubDataEXT", (ALCvoid *) alDatabufferSubDataEXT },
+ { "alGetDatabufferSubDataEXT", (ALCvoid *) alGetDatabufferSubDataEXT},
+ { "alDatabufferfEXT", (ALCvoid *) alDatabufferfEXT },
+ { "alDatabufferfvEXT", (ALCvoid *) alDatabufferfvEXT },
+ { "alDatabufferiEXT", (ALCvoid *) alDatabufferiEXT },
+ { "alDatabufferivEXT", (ALCvoid *) alDatabufferivEXT },
+ { "alGetDatabufferfEXT", (ALCvoid *) alGetDatabufferfEXT },
+ { "alGetDatabufferfvEXT", (ALCvoid *) alGetDatabufferfvEXT },
+ { "alGetDatabufferiEXT", (ALCvoid *) alGetDatabufferiEXT },
+ { "alGetDatabufferivEXT", (ALCvoid *) alGetDatabufferivEXT },
+ { "alSelectDatabufferEXT", (ALCvoid *) alSelectDatabufferEXT },
+ { "alMapDatabufferEXT", (ALCvoid *) alMapDatabufferEXT },
+ { "alUnmapDatabufferEXT", (ALCvoid *) alUnmapDatabufferEXT },
+
{ NULL, (ALCvoid *) NULL }
};
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index 5f2f1c53..15b8c0e2 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -35,151 +35,12 @@
#include "AL/al.h"
#include "AL/alc.h"
-typedef struct ALfunction {
- const ALchar *funcName;
- ALvoid *address;
-} ALfunction;
-
typedef struct ALenums {
const ALchar *enumName;
ALenum value;
} ALenums;
-static const ALfunction function[] = {
- { "alEnable", (ALvoid *) alEnable },
- { "alDisable", (ALvoid *) alDisable },
- { "alIsEnabled", (ALvoid *) alIsEnabled },
- { "alGetString", (ALvoid *) alGetString },
- { "alGetBooleanv", (ALvoid *) alGetBooleanv },
- { "alGetIntegerv", (ALvoid *) alGetIntegerv },
- { "alGetFloatv", (ALvoid *) alGetFloatv },
- { "alGetDoublev", (ALvoid *) alGetDoublev },
- { "alGetBoolean", (ALvoid *) alGetBoolean },
- { "alGetInteger", (ALvoid *) alGetInteger },
- { "alGetFloat", (ALvoid *) alGetFloat },
- { "alGetDouble", (ALvoid *) alGetDouble },
- { "alGetError", (ALvoid *) alGetError },
- { "alIsExtensionPresent", (ALvoid *) alIsExtensionPresent },
- { "alGetProcAddress", (ALvoid *) alGetProcAddress },
- { "alGetEnumValue", (ALvoid *) alGetEnumValue },
- { "alListenerf", (ALvoid *) alListenerf },
- { "alListener3f", (ALvoid *) alListener3f },
- { "alListenerfv", (ALvoid *) alListenerfv },
- { "alListeneri", (ALvoid *) alListeneri },
- { "alListener3i", (ALvoid *) alListener3i },
- { "alListeneriv", (ALvoid *) alListeneriv },
- { "alGetListenerf", (ALvoid *) alGetListenerf },
- { "alGetListener3f", (ALvoid *) alGetListener3f },
- { "alGetListenerfv", (ALvoid *) alGetListenerfv },
- { "alGetListeneri", (ALvoid *) alGetListeneri },
- { "alGetListener3i", (ALvoid *) alGetListener3i },
- { "alGetListeneriv", (ALvoid *) alGetListeneriv },
- { "alGenSources", (ALvoid *) alGenSources },
- { "alDeleteSources", (ALvoid *) alDeleteSources },
- { "alIsSource", (ALvoid *) alIsSource },
- { "alSourcef", (ALvoid *) alSourcef },
- { "alSource3f", (ALvoid *) alSource3f },
- { "alSourcefv", (ALvoid *) alSourcefv },
- { "alSourcei", (ALvoid *) alSourcei },
- { "alSource3i", (ALvoid *) alSource3i },
- { "alSourceiv", (ALvoid *) alSourceiv },
- { "alGetSourcef", (ALvoid *) alGetSourcef },
- { "alGetSource3f", (ALvoid *) alGetSource3f },
- { "alGetSourcefv", (ALvoid *) alGetSourcefv },
- { "alGetSourcei", (ALvoid *) alGetSourcei },
- { "alGetSource3i", (ALvoid *) alGetSource3i },
- { "alGetSourceiv", (ALvoid *) alGetSourceiv },
- { "alSourcePlayv", (ALvoid *) alSourcePlayv },
- { "alSourceStopv", (ALvoid *) alSourceStopv },
- { "alSourceRewindv", (ALvoid *) alSourceRewindv },
- { "alSourcePausev", (ALvoid *) alSourcePausev },
- { "alSourcePlay", (ALvoid *) alSourcePlay },
- { "alSourceStop", (ALvoid *) alSourceStop },
- { "alSourceRewind", (ALvoid *) alSourceRewind },
- { "alSourcePause", (ALvoid *) alSourcePause },
- { "alSourceQueueBuffers", (ALvoid *) alSourceQueueBuffers },
- { "alSourceUnqueueBuffers", (ALvoid *) alSourceUnqueueBuffers },
- { "alGenBuffers", (ALvoid *) alGenBuffers },
- { "alDeleteBuffers", (ALvoid *) alDeleteBuffers },
- { "alIsBuffer", (ALvoid *) alIsBuffer },
- { "alBufferData", (ALvoid *) alBufferData },
- { "alBufferf", (ALvoid *) alBufferf },
- { "alBuffer3f", (ALvoid *) alBuffer3f },
- { "alBufferfv", (ALvoid *) alBufferfv },
- { "alBufferi", (ALvoid *) alBufferi },
- { "alBuffer3i", (ALvoid *) alBuffer3i },
- { "alBufferiv", (ALvoid *) alBufferiv },
- { "alGetBufferf", (ALvoid *) alGetBufferf },
- { "alGetBuffer3f", (ALvoid *) alGetBuffer3f },
- { "alGetBufferfv", (ALvoid *) alGetBufferfv },
- { "alGetBufferi", (ALvoid *) alGetBufferi },
- { "alGetBuffer3i", (ALvoid *) alGetBuffer3i },
- { "alGetBufferiv", (ALvoid *) alGetBufferiv },
- { "alDopplerFactor", (ALvoid *) alDopplerFactor },
- { "alDopplerVelocity", (ALvoid *) alDopplerVelocity },
- { "alSpeedOfSound", (ALvoid *) alSpeedOfSound },
- { "alDistanceModel", (ALvoid *) alDistanceModel },
-
- { "alGenFilters", (ALvoid *) alGenFilters },
- { "alDeleteFilters", (ALvoid *) alDeleteFilters },
- { "alIsFilter", (ALvoid *) alIsFilter },
- { "alFilteri", (ALvoid *) alFilteri },
- { "alFilteriv", (ALvoid *) alFilteriv },
- { "alFilterf", (ALvoid *) alFilterf },
- { "alFilterfv", (ALvoid *) alFilterfv },
- { "alGetFilteri", (ALvoid *) alGetFilteri },
- { "alGetFilteriv", (ALvoid *) alGetFilteriv },
- { "alGetFilterf", (ALvoid *) alGetFilterf },
- { "alGetFilterfv", (ALvoid *) alGetFilterfv },
-
- { "alGenEffects", (ALvoid *) alGenEffects },
- { "alDeleteEffects", (ALvoid *) alDeleteEffects },
- { "alIsEffect", (ALvoid *) alIsEffect },
- { "alEffecti", (ALvoid *) alEffecti },
- { "alEffectiv", (ALvoid *) alEffectiv },
- { "alEffectf", (ALvoid *) alEffectf },
- { "alEffectfv", (ALvoid *) alEffectfv },
- { "alGetEffecti", (ALvoid *) alGetEffecti },
- { "alGetEffectiv", (ALvoid *) alGetEffectiv },
- { "alGetEffectf", (ALvoid *) alGetEffectf },
- { "alGetEffectfv", (ALvoid *) alGetEffectfv },
-
- { "alGenAuxiliaryEffectSlots", (ALvoid *) alGenAuxiliaryEffectSlots },
- { "alDeleteAuxiliaryEffectSlots",(ALvoid *) alDeleteAuxiliaryEffectSlots},
- { "alIsAuxiliaryEffectSlot", (ALvoid *) alIsAuxiliaryEffectSlot },
- { "alAuxiliaryEffectSloti", (ALvoid *) alAuxiliaryEffectSloti },
- { "alAuxiliaryEffectSlotiv", (ALvoid *) alAuxiliaryEffectSlotiv },
- { "alAuxiliaryEffectSlotf", (ALvoid *) alAuxiliaryEffectSlotf },
- { "alAuxiliaryEffectSlotfv", (ALvoid *) alAuxiliaryEffectSlotfv },
- { "alGetAuxiliaryEffectSloti", (ALvoid *) alGetAuxiliaryEffectSloti },
- { "alGetAuxiliaryEffectSlotiv", (ALvoid *) alGetAuxiliaryEffectSlotiv},
- { "alGetAuxiliaryEffectSlotf", (ALvoid *) alGetAuxiliaryEffectSlotf },
- { "alGetAuxiliaryEffectSlotfv", (ALvoid *) alGetAuxiliaryEffectSlotfv},
-
- { "alBufferSubDataEXT", (ALvoid *) alBufferSubDataEXT },
-
- { "alGenDatabuffersEXT", (ALvoid *) alGenDatabuffersEXT },
- { "alDeleteDatabuffersEXT", (ALvoid *) alDeleteDatabuffersEXT },
- { "alIsDatabufferEXT", (ALvoid *) alIsDatabufferEXT },
- { "alDatabufferDataEXT", (ALvoid *) alDatabufferDataEXT },
- { "alDatabufferSubDataEXT", (ALvoid *) alDatabufferSubDataEXT },
- { "alGetDatabufferSubDataEXT", (ALvoid *) alGetDatabufferSubDataEXT },
- { "alDatabufferfEXT", (ALvoid *) alDatabufferfEXT },
- { "alDatabufferfvEXT", (ALvoid *) alDatabufferfvEXT },
- { "alDatabufferiEXT", (ALvoid *) alDatabufferiEXT },
- { "alDatabufferivEXT", (ALvoid *) alDatabufferivEXT },
- { "alGetDatabufferfEXT", (ALvoid *) alGetDatabufferfEXT },
- { "alGetDatabufferfvEXT", (ALvoid *) alGetDatabufferfvEXT },
- { "alGetDatabufferiEXT", (ALvoid *) alGetDatabufferiEXT },
- { "alGetDatabufferivEXT", (ALvoid *) alGetDatabufferivEXT },
- { "alSelectDatabufferEXT", (ALvoid *) alSelectDatabufferEXT },
- { "alMapDatabufferEXT", (ALvoid *) alMapDatabufferEXT },
- { "alUnmapDatabufferEXT", (ALvoid *) alUnmapDatabufferEXT },
-
- { NULL, (ALvoid *) NULL }
-};
-
static const ALenums enumeration[] = {
// Types
{ "AL_INVALID", AL_INVALID },
@@ -451,12 +312,9 @@ AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
AL_API ALvoid* AL_APIENTRY alGetProcAddress(const ALchar *funcName)
{
- ALsizei i = 0;
-
- while(function[i].funcName && strcmp(function[i].funcName, funcName) != 0)
- i++;
-
- return function[i].address;
+ if(!funcName)
+ return NULL;
+ return alcGetProcAddress(NULL, funcName);
}
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *enumName)