aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-03-24 22:43:08 -0700
committerChris Robinson <[email protected]>2010-03-24 22:43:08 -0700
commitb3c389c0a0f8f9b414741151376c583a10462e8c (patch)
tree5f29d33da6251d5646c00cc1fe388fc268256ed0
parent15b9fc9099da9ce9d7a2848fa09bbb4711aeca87 (diff)
Constify and properly type some variables and struct members
-rw-r--r--Alc/ALc.c129
-rw-r--r--OpenAL32/Include/alExtension.h33
-rw-r--r--OpenAL32/alExtension.c360
3 files changed, 252 insertions, 270 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e7590686..c5d9a00c 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <memory.h>
#include <ctype.h>
+
#include "alMain.h"
#include "alSource.h"
#include "AL/al.h"
@@ -32,7 +33,6 @@
#include "alThunk.h"
#include "alSource.h"
#include "alBuffer.h"
-#include "alExtension.h"
#include "alAuxEffectSlot.h"
#include "alDatabuffer.h"
#include "bs2b.h"
@@ -85,78 +85,83 @@ static BackendInfo BackendList[] = {
///////////////////////////////////////////////////////
// STRING and EXTENSIONS
-typedef struct ALCfunction_struct
-{
- ALCchar *funcName;
- ALvoid *address;
+typedef struct ALCfunction {
+ const ALCchar *funcName;
+ ALCvoid *address;
} ALCfunction;
-static ALCfunction alcFunctions[] = {
- { "alcCreateContext", (ALvoid *) alcCreateContext },
- { "alcMakeContextCurrent", (ALvoid *) alcMakeContextCurrent },
- { "alcProcessContext", (ALvoid *) alcProcessContext },
- { "alcSuspendContext", (ALvoid *) alcSuspendContext },
- { "alcDestroyContext", (ALvoid *) alcDestroyContext },
- { "alcGetCurrentContext", (ALvoid *) alcGetCurrentContext },
- { "alcGetContextsDevice", (ALvoid *) alcGetContextsDevice },
- { "alcOpenDevice", (ALvoid *) alcOpenDevice },
- { "alcCloseDevice", (ALvoid *) alcCloseDevice },
- { "alcGetError", (ALvoid *) alcGetError },
- { "alcIsExtensionPresent", (ALvoid *) alcIsExtensionPresent },
- { "alcGetProcAddress", (ALvoid *) alcGetProcAddress },
- { "alcGetEnumValue", (ALvoid *) alcGetEnumValue },
- { "alcGetString", (ALvoid *) alcGetString },
- { "alcGetIntegerv", (ALvoid *) alcGetIntegerv },
- { "alcCaptureOpenDevice", (ALvoid *) alcCaptureOpenDevice },
- { "alcCaptureCloseDevice", (ALvoid *) alcCaptureCloseDevice },
- { "alcCaptureStart", (ALvoid *) alcCaptureStart },
- { "alcCaptureStop", (ALvoid *) alcCaptureStop },
- { "alcCaptureSamples", (ALvoid *) alcCaptureSamples },
-
- { "alcSetThreadContext", (ALvoid *) alcSetThreadContext },
- { "alcGetThreadContext", (ALvoid *) alcGetThreadContext },
-
- { NULL, (ALvoid *) NULL }
+typedef struct ALCenums {
+ const ALCchar *enumName;
+ ALCenum value;
+} ALCenums;
+
+
+static const ALCfunction alcFunctions[] = {
+ { "alcCreateContext", (ALCvoid *) alcCreateContext },
+ { "alcMakeContextCurrent", (ALCvoid *) alcMakeContextCurrent },
+ { "alcProcessContext", (ALCvoid *) alcProcessContext },
+ { "alcSuspendContext", (ALCvoid *) alcSuspendContext },
+ { "alcDestroyContext", (ALCvoid *) alcDestroyContext },
+ { "alcGetCurrentContext", (ALCvoid *) alcGetCurrentContext },
+ { "alcGetContextsDevice", (ALCvoid *) alcGetContextsDevice },
+ { "alcOpenDevice", (ALCvoid *) alcOpenDevice },
+ { "alcCloseDevice", (ALCvoid *) alcCloseDevice },
+ { "alcGetError", (ALCvoid *) alcGetError },
+ { "alcIsExtensionPresent", (ALCvoid *) alcIsExtensionPresent },
+ { "alcGetProcAddress", (ALCvoid *) alcGetProcAddress },
+ { "alcGetEnumValue", (ALCvoid *) alcGetEnumValue },
+ { "alcGetString", (ALCvoid *) alcGetString },
+ { "alcGetIntegerv", (ALCvoid *) alcGetIntegerv },
+ { "alcCaptureOpenDevice", (ALCvoid *) alcCaptureOpenDevice },
+ { "alcCaptureCloseDevice", (ALCvoid *) alcCaptureCloseDevice },
+ { "alcCaptureStart", (ALCvoid *) alcCaptureStart },
+ { "alcCaptureStop", (ALCvoid *) alcCaptureStop },
+ { "alcCaptureSamples", (ALCvoid *) alcCaptureSamples },
+
+ { "alcSetThreadContext", (ALCvoid *) alcSetThreadContext },
+ { "alcGetThreadContext", (ALCvoid *) alcGetThreadContext },
+
+ { NULL, (ALCvoid *) NULL }
};
-static ALenums enumeration[]={
+static const ALCenums enumeration[] = {
// Types
- { (ALchar *)"ALC_INVALID", ALC_INVALID },
- { (ALchar *)"ALC_FALSE", ALC_FALSE },
- { (ALchar *)"ALC_TRUE", ALC_TRUE },
+ { "ALC_INVALID", ALC_INVALID },
+ { "ALC_FALSE", ALC_FALSE },
+ { "ALC_TRUE", ALC_TRUE },
// ALC Properties
- { (ALchar *)"ALC_MAJOR_VERSION", ALC_MAJOR_VERSION },
- { (ALchar *)"ALC_MINOR_VERSION", ALC_MINOR_VERSION },
- { (ALchar *)"ALC_ATTRIBUTES_SIZE", ALC_ATTRIBUTES_SIZE },
- { (ALchar *)"ALC_ALL_ATTRIBUTES", ALC_ALL_ATTRIBUTES },
- { (ALchar *)"ALC_DEFAULT_DEVICE_SPECIFIER", ALC_DEFAULT_DEVICE_SPECIFIER },
- { (ALchar *)"ALC_DEVICE_SPECIFIER", ALC_DEVICE_SPECIFIER },
- { (ALchar *)"ALC_ALL_DEVICES_SPECIFIER", ALC_ALL_DEVICES_SPECIFIER },
- { (ALchar *)"ALC_DEFAULT_ALL_DEVICES_SPECIFIER", ALC_DEFAULT_ALL_DEVICES_SPECIFIER },
- { (ALchar *)"ALC_EXTENSIONS", ALC_EXTENSIONS },
- { (ALchar *)"ALC_FREQUENCY", ALC_FREQUENCY },
- { (ALchar *)"ALC_REFRESH", ALC_REFRESH },
- { (ALchar *)"ALC_SYNC", ALC_SYNC },
- { (ALchar *)"ALC_MONO_SOURCES", ALC_MONO_SOURCES },
- { (ALchar *)"ALC_STEREO_SOURCES", ALC_STEREO_SOURCES },
- { (ALchar *)"ALC_CAPTURE_DEVICE_SPECIFIER", ALC_CAPTURE_DEVICE_SPECIFIER },
- { (ALchar *)"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER", ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER},
- { (ALchar *)"ALC_CAPTURE_SAMPLES", ALC_CAPTURE_SAMPLES },
+ { "ALC_MAJOR_VERSION", ALC_MAJOR_VERSION },
+ { "ALC_MINOR_VERSION", ALC_MINOR_VERSION },
+ { "ALC_ATTRIBUTES_SIZE", ALC_ATTRIBUTES_SIZE },
+ { "ALC_ALL_ATTRIBUTES", ALC_ALL_ATTRIBUTES },
+ { "ALC_DEFAULT_DEVICE_SPECIFIER", ALC_DEFAULT_DEVICE_SPECIFIER },
+ { "ALC_DEVICE_SPECIFIER", ALC_DEVICE_SPECIFIER },
+ { "ALC_ALL_DEVICES_SPECIFIER", ALC_ALL_DEVICES_SPECIFIER },
+ { "ALC_DEFAULT_ALL_DEVICES_SPECIFIER", ALC_DEFAULT_ALL_DEVICES_SPECIFIER },
+ { "ALC_EXTENSIONS", ALC_EXTENSIONS },
+ { "ALC_FREQUENCY", ALC_FREQUENCY },
+ { "ALC_REFRESH", ALC_REFRESH },
+ { "ALC_SYNC", ALC_SYNC },
+ { "ALC_MONO_SOURCES", ALC_MONO_SOURCES },
+ { "ALC_STEREO_SOURCES", ALC_STEREO_SOURCES },
+ { "ALC_CAPTURE_DEVICE_SPECIFIER", ALC_CAPTURE_DEVICE_SPECIFIER },
+ { "ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER", ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER},
+ { "ALC_CAPTURE_SAMPLES", ALC_CAPTURE_SAMPLES },
// EFX Properties
- { (ALchar *)"ALC_EFX_MAJOR_VERSION", ALC_EFX_MAJOR_VERSION },
- { (ALchar *)"ALC_EFX_MINOR_VERSION", ALC_EFX_MINOR_VERSION },
- { (ALchar *)"ALC_MAX_AUXILIARY_SENDS", ALC_MAX_AUXILIARY_SENDS },
+ { "ALC_EFX_MAJOR_VERSION", ALC_EFX_MAJOR_VERSION },
+ { "ALC_EFX_MINOR_VERSION", ALC_EFX_MINOR_VERSION },
+ { "ALC_MAX_AUXILIARY_SENDS", ALC_MAX_AUXILIARY_SENDS },
// ALC Error Message
- { (ALchar *)"ALC_NO_ERROR", ALC_NO_ERROR },
- { (ALchar *)"ALC_INVALID_DEVICE", ALC_INVALID_DEVICE },
- { (ALchar *)"ALC_INVALID_CONTEXT", ALC_INVALID_CONTEXT },
- { (ALchar *)"ALC_INVALID_ENUM", ALC_INVALID_ENUM },
- { (ALchar *)"ALC_INVALID_VALUE", ALC_INVALID_VALUE },
- { (ALchar *)"ALC_OUT_OF_MEMORY", ALC_OUT_OF_MEMORY },
- { (ALchar *)NULL, (ALenum)0 }
+ { "ALC_NO_ERROR", ALC_NO_ERROR },
+ { "ALC_INVALID_DEVICE", ALC_INVALID_DEVICE },
+ { "ALC_INVALID_CONTEXT", ALC_INVALID_CONTEXT },
+ { "ALC_INVALID_ENUM", ALC_INVALID_ENUM },
+ { "ALC_INVALID_VALUE", ALC_INVALID_VALUE },
+ { "ALC_OUT_OF_MEMORY", ALC_OUT_OF_MEMORY },
+ { NULL, (ALCenum)0 }
};
// Error strings
static const ALCchar alcNoError[] = "No Error";
diff --git a/OpenAL32/Include/alExtension.h b/OpenAL32/Include/alExtension.h
deleted file mode 100644
index 1f33f9af..00000000
--- a/OpenAL32/Include/alExtension.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _AL_EXTENSION_H_
-#define _AL_EXTENSION_H_
-
-#include "AL/al.h"
-#include "AL/alc.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct ALextension_struct
-{
- ALchar *extName;
- ALvoid *address;
-} ALextension;
-
-typedef struct ALfunction_struct
-{
- ALchar *funcName;
- ALvoid *address;
-} ALfunction;
-
-typedef struct ALenum_struct
-{
- ALchar *enumName;
- ALenum value;
-} ALenums;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index 83109a47..e08c78a5 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include "alExtension.h"
+
#include "alError.h"
#include "alMain.h"
#include "alFilter.h"
@@ -35,7 +35,18 @@
#include "AL/al.h"
#include "AL/alc.h"
-static ALfunction function[] = {
+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 },
@@ -169,223 +180,222 @@ static ALfunction function[] = {
{ NULL, (ALvoid *) NULL }
};
-static ALenums enumeration[] = {
+static const ALenums enumeration[] = {
// Types
- { (ALchar *)"AL_INVALID", AL_INVALID },
- { (ALchar *)"AL_NONE", AL_NONE },
- { (ALchar *)"AL_FALSE", AL_FALSE },
- { (ALchar *)"AL_TRUE", AL_TRUE },
+ { "AL_INVALID", AL_INVALID },
+ { "AL_NONE", AL_NONE },
+ { "AL_FALSE", AL_FALSE },
+ { "AL_TRUE", AL_TRUE },
// Source and Listener Properties
- { (ALchar *)"AL_SOURCE_RELATIVE", AL_SOURCE_RELATIVE },
- { (ALchar *)"AL_CONE_INNER_ANGLE", AL_CONE_INNER_ANGLE },
- { (ALchar *)"AL_CONE_OUTER_ANGLE", AL_CONE_OUTER_ANGLE },
- { (ALchar *)"AL_PITCH", AL_PITCH },
- { (ALchar *)"AL_POSITION", AL_POSITION },
- { (ALchar *)"AL_DIRECTION", AL_DIRECTION },
- { (ALchar *)"AL_VELOCITY", AL_VELOCITY },
- { (ALchar *)"AL_LOOPING", AL_LOOPING },
- { (ALchar *)"AL_BUFFER", AL_BUFFER },
- { (ALchar *)"AL_GAIN", AL_GAIN },
- { (ALchar *)"AL_MIN_GAIN", AL_MIN_GAIN },
- { (ALchar *)"AL_MAX_GAIN", AL_MAX_GAIN },
- { (ALchar *)"AL_ORIENTATION", AL_ORIENTATION },
- { (ALchar *)"AL_REFERENCE_DISTANCE", AL_REFERENCE_DISTANCE },
- { (ALchar *)"AL_ROLLOFF_FACTOR", AL_ROLLOFF_FACTOR },
- { (ALchar *)"AL_CONE_OUTER_GAIN", AL_CONE_OUTER_GAIN },
- { (ALchar *)"AL_MAX_DISTANCE", AL_MAX_DISTANCE },
- { (ALchar *)"AL_SEC_OFFSET", AL_SEC_OFFSET },
- { (ALchar *)"AL_SAMPLE_OFFSET", AL_SAMPLE_OFFSET },
- { (ALchar *)"AL_BYTE_OFFSET", AL_BYTE_OFFSET },
- { (ALchar *)"AL_SOURCE_TYPE", AL_SOURCE_TYPE },
- { (ALchar *)"AL_STATIC", AL_STATIC },
- { (ALchar *)"AL_STREAMING", AL_STREAMING },
- { (ALchar *)"AL_UNDETERMINED", AL_UNDETERMINED },
- { (ALchar *)"AL_METERS_PER_UNIT", AL_METERS_PER_UNIT },
+ { "AL_SOURCE_RELATIVE", AL_SOURCE_RELATIVE },
+ { "AL_CONE_INNER_ANGLE", AL_CONE_INNER_ANGLE },
+ { "AL_CONE_OUTER_ANGLE", AL_CONE_OUTER_ANGLE },
+ { "AL_PITCH", AL_PITCH },
+ { "AL_POSITION", AL_POSITION },
+ { "AL_DIRECTION", AL_DIRECTION },
+ { "AL_VELOCITY", AL_VELOCITY },
+ { "AL_LOOPING", AL_LOOPING },
+ { "AL_BUFFER", AL_BUFFER },
+ { "AL_GAIN", AL_GAIN },
+ { "AL_MIN_GAIN", AL_MIN_GAIN },
+ { "AL_MAX_GAIN", AL_MAX_GAIN },
+ { "AL_ORIENTATION", AL_ORIENTATION },
+ { "AL_REFERENCE_DISTANCE", AL_REFERENCE_DISTANCE },
+ { "AL_ROLLOFF_FACTOR", AL_ROLLOFF_FACTOR },
+ { "AL_CONE_OUTER_GAIN", AL_CONE_OUTER_GAIN },
+ { "AL_MAX_DISTANCE", AL_MAX_DISTANCE },
+ { "AL_SEC_OFFSET", AL_SEC_OFFSET },
+ { "AL_SAMPLE_OFFSET", AL_SAMPLE_OFFSET },
+ { "AL_BYTE_OFFSET", AL_BYTE_OFFSET },
+ { "AL_SOURCE_TYPE", AL_SOURCE_TYPE },
+ { "AL_STATIC", AL_STATIC },
+ { "AL_STREAMING", AL_STREAMING },
+ { "AL_UNDETERMINED", AL_UNDETERMINED },
+ { "AL_METERS_PER_UNIT", AL_METERS_PER_UNIT },
// Source EFX Properties
- { (ALchar *)"AL_DIRECT_FILTER", AL_DIRECT_FILTER },
- { (ALchar *)"AL_AUXILIARY_SEND_FILTER", AL_AUXILIARY_SEND_FILTER },
- { (ALchar *)"AL_AIR_ABSORPTION_FACTOR", AL_AIR_ABSORPTION_FACTOR },
- { (ALchar *)"AL_ROOM_ROLLOFF_FACTOR", AL_ROOM_ROLLOFF_FACTOR },
- { (ALchar *)"AL_CONE_OUTER_GAINHF", AL_CONE_OUTER_GAINHF },
- { (ALchar *)"AL_DIRECT_FILTER_GAINHF_AUTO", AL_DIRECT_FILTER_GAINHF_AUTO },
- { (ALchar *)"AL_AUXILIARY_SEND_FILTER_GAIN_AUTO", AL_AUXILIARY_SEND_FILTER_GAIN_AUTO },
- { (ALchar *)"AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO", AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO},
-
+ { "AL_DIRECT_FILTER", AL_DIRECT_FILTER },
+ { "AL_AUXILIARY_SEND_FILTER", AL_AUXILIARY_SEND_FILTER },
+ { "AL_AIR_ABSORPTION_FACTOR", AL_AIR_ABSORPTION_FACTOR },
+ { "AL_ROOM_ROLLOFF_FACTOR", AL_ROOM_ROLLOFF_FACTOR },
+ { "AL_CONE_OUTER_GAINHF", AL_CONE_OUTER_GAINHF },
+ { "AL_DIRECT_FILTER_GAINHF_AUTO", AL_DIRECT_FILTER_GAINHF_AUTO },
+ { "AL_AUXILIARY_SEND_FILTER_GAIN_AUTO", AL_AUXILIARY_SEND_FILTER_GAIN_AUTO },
+ { "AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO", AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO},
// Source State information
- { (ALchar *)"AL_SOURCE_STATE", AL_SOURCE_STATE },
- { (ALchar *)"AL_INITIAL", AL_INITIAL },
- { (ALchar *)"AL_PLAYING", AL_PLAYING },
- { (ALchar *)"AL_PAUSED", AL_PAUSED },
- { (ALchar *)"AL_STOPPED", AL_STOPPED },
+ { "AL_SOURCE_STATE", AL_SOURCE_STATE },
+ { "AL_INITIAL", AL_INITIAL },
+ { "AL_PLAYING", AL_PLAYING },
+ { "AL_PAUSED", AL_PAUSED },
+ { "AL_STOPPED", AL_STOPPED },
// Queue information
- { (ALchar *)"AL_BUFFERS_QUEUED", AL_BUFFERS_QUEUED },
- { (ALchar *)"AL_BUFFERS_PROCESSED", AL_BUFFERS_PROCESSED },
+ { "AL_BUFFERS_QUEUED", AL_BUFFERS_QUEUED },
+ { "AL_BUFFERS_PROCESSED", AL_BUFFERS_PROCESSED },
// Buffer Formats
- { (ALchar *)"AL_FORMAT_MONO8", AL_FORMAT_MONO8 },
- { (ALchar *)"AL_FORMAT_MONO16", AL_FORMAT_MONO16 },
- { (ALchar *)"AL_FORMAT_MONO_FLOAT32", AL_FORMAT_MONO_FLOAT32 },
- { (ALchar *)"AL_FORMAT_MONO_DOUBLE_EXT", AL_FORMAT_MONO_DOUBLE_EXT },
- { (ALchar *)"AL_FORMAT_STEREO8", AL_FORMAT_STEREO8 },
- { (ALchar *)"AL_FORMAT_STEREO16", AL_FORMAT_STEREO16 },
- { (ALchar *)"AL_FORMAT_STEREO_FLOAT32", AL_FORMAT_STEREO_FLOAT32 },
- { (ALchar *)"AL_FORMAT_STEREO_DOUBLE_EXT", AL_FORMAT_STEREO_DOUBLE_EXT },
- { (ALchar *)"AL_FORMAT_MONO_IMA4", AL_FORMAT_MONO_IMA4 },
- { (ALchar *)"AL_FORMAT_STEREO_IMA4", AL_FORMAT_STEREO_IMA4 },
- { (ALchar *)"AL_FORMAT_QUAD8_LOKI", AL_FORMAT_QUAD8_LOKI },
- { (ALchar *)"AL_FORMAT_QUAD16_LOKI", AL_FORMAT_QUAD16_LOKI },
- { (ALchar *)"AL_FORMAT_QUAD8", AL_FORMAT_QUAD8 },
- { (ALchar *)"AL_FORMAT_QUAD16", AL_FORMAT_QUAD16 },
- { (ALchar *)"AL_FORMAT_QUAD32", AL_FORMAT_QUAD32 },
- { (ALchar *)"AL_FORMAT_51CHN8", AL_FORMAT_51CHN8 },
- { (ALchar *)"AL_FORMAT_51CHN16", AL_FORMAT_51CHN16 },
- { (ALchar *)"AL_FORMAT_51CHN32", AL_FORMAT_51CHN32 },
- { (ALchar *)"AL_FORMAT_61CHN8", AL_FORMAT_61CHN8 },
- { (ALchar *)"AL_FORMAT_61CHN16", AL_FORMAT_61CHN16 },
- { (ALchar *)"AL_FORMAT_61CHN32", AL_FORMAT_61CHN32 },
- { (ALchar *)"AL_FORMAT_71CHN8", AL_FORMAT_71CHN8 },
- { (ALchar *)"AL_FORMAT_71CHN16", AL_FORMAT_71CHN16 },
- { (ALchar *)"AL_FORMAT_71CHN32", AL_FORMAT_71CHN32 },
- { (ALchar *)"AL_FORMAT_REAR8", AL_FORMAT_REAR8 },
- { (ALchar *)"AL_FORMAT_REAR16", AL_FORMAT_REAR16 },
- { (ALchar *)"AL_FORMAT_REAR32", AL_FORMAT_REAR32 },
- { (ALchar *)"AL_FORMAT_MONO_MULAW", AL_FORMAT_MONO_MULAW },
- { (ALchar *)"AL_FORMAT_MONO_MULAW_EXT", AL_FORMAT_MONO_MULAW },
- { (ALchar *)"AL_FORMAT_STEREO_MULAW", AL_FORMAT_STEREO_MULAW },
- { (ALchar *)"AL_FORMAT_STEREO_MULAW_EXT", AL_FORMAT_STEREO_MULAW },
- { (ALchar *)"AL_FORMAT_QUAD_MULAW", AL_FORMAT_QUAD_MULAW },
- { (ALchar *)"AL_FORMAT_51CHN_MULAW", AL_FORMAT_51CHN_MULAW },
- { (ALchar *)"AL_FORMAT_61CHN_MULAW", AL_FORMAT_61CHN_MULAW },
- { (ALchar *)"AL_FORMAT_71CHN_MULAW", AL_FORMAT_71CHN_MULAW },
- { (ALchar *)"AL_FORMAT_REAR_MULAW", AL_FORMAT_REAR_MULAW },
+ { "AL_FORMAT_MONO8", AL_FORMAT_MONO8 },
+ { "AL_FORMAT_MONO16", AL_FORMAT_MONO16 },
+ { "AL_FORMAT_MONO_FLOAT32", AL_FORMAT_MONO_FLOAT32 },
+ { "AL_FORMAT_MONO_DOUBLE_EXT", AL_FORMAT_MONO_DOUBLE_EXT },
+ { "AL_FORMAT_STEREO8", AL_FORMAT_STEREO8 },
+ { "AL_FORMAT_STEREO16", AL_FORMAT_STEREO16 },
+ { "AL_FORMAT_STEREO_FLOAT32", AL_FORMAT_STEREO_FLOAT32 },
+ { "AL_FORMAT_STEREO_DOUBLE_EXT", AL_FORMAT_STEREO_DOUBLE_EXT },
+ { "AL_FORMAT_MONO_IMA4", AL_FORMAT_MONO_IMA4 },
+ { "AL_FORMAT_STEREO_IMA4", AL_FORMAT_STEREO_IMA4 },
+ { "AL_FORMAT_QUAD8_LOKI", AL_FORMAT_QUAD8_LOKI },
+ { "AL_FORMAT_QUAD16_LOKI", AL_FORMAT_QUAD16_LOKI },
+ { "AL_FORMAT_QUAD8", AL_FORMAT_QUAD8 },
+ { "AL_FORMAT_QUAD16", AL_FORMAT_QUAD16 },
+ { "AL_FORMAT_QUAD32", AL_FORMAT_QUAD32 },
+ { "AL_FORMAT_51CHN8", AL_FORMAT_51CHN8 },
+ { "AL_FORMAT_51CHN16", AL_FORMAT_51CHN16 },
+ { "AL_FORMAT_51CHN32", AL_FORMAT_51CHN32 },
+ { "AL_FORMAT_61CHN8", AL_FORMAT_61CHN8 },
+ { "AL_FORMAT_61CHN16", AL_FORMAT_61CHN16 },
+ { "AL_FORMAT_61CHN32", AL_FORMAT_61CHN32 },
+ { "AL_FORMAT_71CHN8", AL_FORMAT_71CHN8 },
+ { "AL_FORMAT_71CHN16", AL_FORMAT_71CHN16 },
+ { "AL_FORMAT_71CHN32", AL_FORMAT_71CHN32 },
+ { "AL_FORMAT_REAR8", AL_FORMAT_REAR8 },
+ { "AL_FORMAT_REAR16", AL_FORMAT_REAR16 },
+ { "AL_FORMAT_REAR32", AL_FORMAT_REAR32 },
+ { "AL_FORMAT_MONO_MULAW", AL_FORMAT_MONO_MULAW },
+ { "AL_FORMAT_MONO_MULAW_EXT", AL_FORMAT_MONO_MULAW },
+ { "AL_FORMAT_STEREO_MULAW", AL_FORMAT_STEREO_MULAW },
+ { "AL_FORMAT_STEREO_MULAW_EXT", AL_FORMAT_STEREO_MULAW },
+ { "AL_FORMAT_QUAD_MULAW", AL_FORMAT_QUAD_MULAW },
+ { "AL_FORMAT_51CHN_MULAW", AL_FORMAT_51CHN_MULAW },
+ { "AL_FORMAT_61CHN_MULAW", AL_FORMAT_61CHN_MULAW },
+ { "AL_FORMAT_71CHN_MULAW", AL_FORMAT_71CHN_MULAW },
+ { "AL_FORMAT_REAR_MULAW", AL_FORMAT_REAR_MULAW },
// Buffer attributes
- { (ALchar *)"AL_FREQUENCY", AL_FREQUENCY },
- { (ALchar *)"AL_BITS", AL_BITS },
- { (ALchar *)"AL_CHANNELS", AL_CHANNELS },
- { (ALchar *)"AL_SIZE", AL_SIZE },
+ { "AL_FREQUENCY", AL_FREQUENCY },
+ { "AL_BITS", AL_BITS },
+ { "AL_CHANNELS", AL_CHANNELS },
+ { "AL_SIZE", AL_SIZE },
// Buffer States (not supported yet)
- { (ALchar *)"AL_UNUSED", AL_UNUSED },
- { (ALchar *)"AL_PENDING", AL_PENDING },
- { (ALchar *)"AL_PROCESSED", AL_PROCESSED },
+ { "AL_UNUSED", AL_UNUSED },
+ { "AL_PENDING", AL_PENDING },
+ { "AL_PROCESSED", AL_PROCESSED },
// AL Error Messages
- { (ALchar *)"AL_NO_ERROR", AL_NO_ERROR },
- { (ALchar *)"AL_INVALID_NAME", AL_INVALID_NAME },
- { (ALchar *)"AL_INVALID_ENUM", AL_INVALID_ENUM },
- { (ALchar *)"AL_INVALID_VALUE", AL_INVALID_VALUE },
- { (ALchar *)"AL_INVALID_OPERATION", AL_INVALID_OPERATION },
- { (ALchar *)"AL_OUT_OF_MEMORY", AL_OUT_OF_MEMORY },
+ { "AL_NO_ERROR", AL_NO_ERROR },
+ { "AL_INVALID_NAME", AL_INVALID_NAME },
+ { "AL_INVALID_ENUM", AL_INVALID_ENUM },
+ { "AL_INVALID_VALUE", AL_INVALID_VALUE },
+ { "AL_INVALID_OPERATION", AL_INVALID_OPERATION },
+ { "AL_OUT_OF_MEMORY", AL_OUT_OF_MEMORY },
// Context strings
- { (ALchar *)"AL_VENDOR", AL_VENDOR },
- { (ALchar *)"AL_VERSION", AL_VERSION },
- { (ALchar *)"AL_RENDERER", AL_RENDERER },
- { (ALchar *)"AL_EXTENSIONS", AL_EXTENSIONS },
+ { "AL_VENDOR", AL_VENDOR },
+ { "AL_VERSION", AL_VERSION },
+ { "AL_RENDERER", AL_RENDERER },
+ { "AL_EXTENSIONS", AL_EXTENSIONS },
// Global states
- { (ALchar *)"AL_DOPPLER_FACTOR", AL_DOPPLER_FACTOR },
- { (ALchar *)"AL_DOPPLER_VELOCITY", AL_DOPPLER_VELOCITY },
- { (ALchar *)"AL_DISTANCE_MODEL", AL_DISTANCE_MODEL },
- { (ALchar *)"AL_SPEED_OF_SOUND", AL_SPEED_OF_SOUND },
+ { "AL_DOPPLER_FACTOR", AL_DOPPLER_FACTOR },
+ { "AL_DOPPLER_VELOCITY", AL_DOPPLER_VELOCITY },
+ { "AL_DISTANCE_MODEL", AL_DISTANCE_MODEL },
+ { "AL_SPEED_OF_SOUND", AL_SPEED_OF_SOUND },
// Distance Models
- { (ALchar *)"AL_INVERSE_DISTANCE", AL_INVERSE_DISTANCE },
- { (ALchar *)"AL_INVERSE_DISTANCE_CLAMPED", AL_INVERSE_DISTANCE_CLAMPED },
- { (ALchar *)"AL_LINEAR_DISTANCE", AL_LINEAR_DISTANCE },
- { (ALchar *)"AL_LINEAR_DISTANCE_CLAMPED", AL_LINEAR_DISTANCE_CLAMPED },
- { (ALchar *)"AL_EXPONENT_DISTANCE", AL_EXPONENT_DISTANCE },
- { (ALchar *)"AL_EXPONENT_DISTANCE_CLAMPED", AL_EXPONENT_DISTANCE_CLAMPED },
+ { "AL_INVERSE_DISTANCE", AL_INVERSE_DISTANCE },
+ { "AL_INVERSE_DISTANCE_CLAMPED", AL_INVERSE_DISTANCE_CLAMPED },
+ { "AL_LINEAR_DISTANCE", AL_LINEAR_DISTANCE },
+ { "AL_LINEAR_DISTANCE_CLAMPED", AL_LINEAR_DISTANCE_CLAMPED },
+ { "AL_EXPONENT_DISTANCE", AL_EXPONENT_DISTANCE },
+ { "AL_EXPONENT_DISTANCE_CLAMPED", AL_EXPONENT_DISTANCE_CLAMPED },
// Filter types
- { (ALchar *)"AL_FILTER_TYPE", AL_FILTER_TYPE },
- { (ALchar *)"AL_FILTER_NULL", AL_FILTER_NULL },
- { (ALchar *)"AL_FILTER_LOWPASS", AL_FILTER_LOWPASS },
+ { "AL_FILTER_TYPE", AL_FILTER_TYPE },
+ { "AL_FILTER_NULL", AL_FILTER_NULL },
+ { "AL_FILTER_LOWPASS", AL_FILTER_LOWPASS },
#if 0
- { (ALchar *)"AL_FILTER_HIGHPASS", AL_FILTER_HIGHPASS },
- { (ALchar *)"AL_FILTER_BANDPASS", AL_FILTER_BANDPASS },
+ { "AL_FILTER_HIGHPASS", AL_FILTER_HIGHPASS },
+ { "AL_FILTER_BANDPASS", AL_FILTER_BANDPASS },
#endif
// Filter params
- { (ALchar *)"AL_LOWPASS_GAIN", AL_LOWPASS_GAIN },
- { (ALchar *)"AL_LOWPASS_GAINHF", AL_LOWPASS_GAINHF },
+ { "AL_LOWPASS_GAIN", AL_LOWPASS_GAIN },
+ { "AL_LOWPASS_GAINHF", AL_LOWPASS_GAINHF },
// Effect types
- { (ALchar *)"AL_EFFECT_TYPE", AL_EFFECT_TYPE },
- { (ALchar *)"AL_EFFECT_NULL", AL_EFFECT_NULL },
- { (ALchar *)"AL_EFFECT_REVERB", AL_EFFECT_REVERB },
- { (ALchar *)"AL_EFFECT_EAXREVERB", AL_EFFECT_EAXREVERB },
+ { "AL_EFFECT_TYPE", AL_EFFECT_TYPE },
+ { "AL_EFFECT_NULL", AL_EFFECT_NULL },
+ { "AL_EFFECT_REVERB", AL_EFFECT_REVERB },
+ { "AL_EFFECT_EAXREVERB", AL_EFFECT_EAXREVERB },
#if 0
- { (ALchar *)"AL_EFFECT_CHORUS", AL_EFFECT_CHORUS },
- { (ALchar *)"AL_EFFECT_DISTORTION", AL_EFFECT_DISTORTION },
+ { "AL_EFFECT_CHORUS", AL_EFFECT_CHORUS },
+ { "AL_EFFECT_DISTORTION", AL_EFFECT_DISTORTION },
#endif
- { (ALchar *)"AL_EFFECT_ECHO", AL_EFFECT_ECHO },
+ { "AL_EFFECT_ECHO", AL_EFFECT_ECHO },
#if 0
- { (ALchar *)"AL_EFFECT_FLANGER", AL_EFFECT_FLANGER },
- { (ALchar *)"AL_EFFECT_FREQUENCY_SHIFTER", AL_EFFECT_FREQUENCY_SHIFTER },
- { (ALchar *)"AL_EFFECT_VOCAL_MORPHER", AL_EFFECT_VOCAL_MORPHER },
- { (ALchar *)"AL_EFFECT_PITCH_SHIFTER", AL_EFFECT_PITCH_SHIFTER },
- { (ALchar *)"AL_EFFECT_RING_MODULATOR", AL_EFFECT_RING_MODULATOR },
- { (ALchar *)"AL_EFFECT_AUTOWAH", AL_EFFECT_AUTOWAH },
- { (ALchar *)"AL_EFFECT_COMPRESSOR", AL_EFFECT_COMPRESSOR },
- { (ALchar *)"AL_EFFECT_EQUALIZER", AL_EFFECT_EQUALIZER },
+ { "AL_EFFECT_FLANGER", AL_EFFECT_FLANGER },
+ { "AL_EFFECT_FREQUENCY_SHIFTER", AL_EFFECT_FREQUENCY_SHIFTER },
+ { "AL_EFFECT_VOCAL_MORPHER", AL_EFFECT_VOCAL_MORPHER },
+ { "AL_EFFECT_PITCH_SHIFTER", AL_EFFECT_PITCH_SHIFTER },
+ { "AL_EFFECT_RING_MODULATOR", AL_EFFECT_RING_MODULATOR },
+ { "AL_EFFECT_AUTOWAH", AL_EFFECT_AUTOWAH },
+ { "AL_EFFECT_COMPRESSOR", AL_EFFECT_COMPRESSOR },
+ { "AL_EFFECT_EQUALIZER", AL_EFFECT_EQUALIZER },
#endif
// Reverb params
- { (ALchar *)"AL_REVERB_DENSITY", AL_REVERB_DENSITY },
- { (ALchar *)"AL_REVERB_DIFFUSION", AL_REVERB_DIFFUSION },
- { (ALchar *)"AL_REVERB_GAIN", AL_REVERB_GAIN },
- { (ALchar *)"AL_REVERB_GAINHF", AL_REVERB_GAINHF },
- { (ALchar *)"AL_REVERB_DECAY_TIME", AL_REVERB_DECAY_TIME },
- { (ALchar *)"AL_REVERB_DECAY_HFRATIO", AL_REVERB_DECAY_HFRATIO },
- { (ALchar *)"AL_REVERB_REFLECTIONS_GAIN", AL_REVERB_REFLECTIONS_GAIN },
- { (ALchar *)"AL_REVERB_REFLECTIONS_DELAY", AL_REVERB_REFLECTIONS_DELAY },
- { (ALchar *)"AL_REVERB_LATE_REVERB_GAIN", AL_REVERB_LATE_REVERB_GAIN },
- { (ALchar *)"AL_REVERB_LATE_REVERB_DELAY", AL_REVERB_LATE_REVERB_DELAY },
- { (ALchar *)"AL_REVERB_AIR_ABSORPTION_GAINHF", AL_REVERB_AIR_ABSORPTION_GAINHF },
- { (ALchar *)"AL_REVERB_ROOM_ROLLOFF_FACTOR", AL_REVERB_ROOM_ROLLOFF_FACTOR },
- { (ALchar *)"AL_REVERB_DECAY_HFLIMIT", AL_REVERB_DECAY_HFLIMIT },
+ { "AL_REVERB_DENSITY", AL_REVERB_DENSITY },
+ { "AL_REVERB_DIFFUSION", AL_REVERB_DIFFUSION },
+ { "AL_REVERB_GAIN", AL_REVERB_GAIN },
+ { "AL_REVERB_GAINHF", AL_REVERB_GAINHF },
+ { "AL_REVERB_DECAY_TIME", AL_REVERB_DECAY_TIME },
+ { "AL_REVERB_DECAY_HFRATIO", AL_REVERB_DECAY_HFRATIO },
+ { "AL_REVERB_REFLECTIONS_GAIN", AL_REVERB_REFLECTIONS_GAIN },
+ { "AL_REVERB_REFLECTIONS_DELAY", AL_REVERB_REFLECTIONS_DELAY },
+ { "AL_REVERB_LATE_REVERB_GAIN", AL_REVERB_LATE_REVERB_GAIN },
+ { "AL_REVERB_LATE_REVERB_DELAY", AL_REVERB_LATE_REVERB_DELAY },
+ { "AL_REVERB_AIR_ABSORPTION_GAINHF", AL_REVERB_AIR_ABSORPTION_GAINHF },
+ { "AL_REVERB_ROOM_ROLLOFF_FACTOR", AL_REVERB_ROOM_ROLLOFF_FACTOR },
+ { "AL_REVERB_DECAY_HFLIMIT", AL_REVERB_DECAY_HFLIMIT },
// EAX Reverb params
- { (ALchar *)"AL_EAXREVERB_DENSITY", AL_EAXREVERB_DENSITY },
- { (ALchar *)"AL_EAXREVERB_DIFFUSION", AL_EAXREVERB_DIFFUSION },
- { (ALchar *)"AL_EAXREVERB_GAIN", AL_EAXREVERB_GAIN },
- { (ALchar *)"AL_EAXREVERB_GAINHF", AL_EAXREVERB_GAINHF },
- { (ALchar *)"AL_EAXREVERB_GAINLF", AL_EAXREVERB_GAINLF },
- { (ALchar *)"AL_EAXREVERB_DECAY_TIME", AL_EAXREVERB_DECAY_TIME },
- { (ALchar *)"AL_EAXREVERB_DECAY_HFRATIO", AL_EAXREVERB_DECAY_HFRATIO },
- { (ALchar *)"AL_EAXREVERB_DECAY_LFRATIO", AL_EAXREVERB_DECAY_LFRATIO },
- { (ALchar *)"AL_EAXREVERB_REFLECTIONS_GAIN", AL_EAXREVERB_REFLECTIONS_GAIN },
- { (ALchar *)"AL_EAXREVERB_REFLECTIONS_DELAY", AL_EAXREVERB_REFLECTIONS_DELAY },
- { (ALchar *)"AL_EAXREVERB_REFLECTIONS_PAN", AL_EAXREVERB_REFLECTIONS_PAN },
- { (ALchar *)"AL_EAXREVERB_LATE_REVERB_GAIN", AL_EAXREVERB_LATE_REVERB_GAIN },
- { (ALchar *)"AL_EAXREVERB_LATE_REVERB_DELAY", AL_EAXREVERB_LATE_REVERB_DELAY },
- { (ALchar *)"AL_EAXREVERB_LATE_REVERB_PAN", AL_EAXREVERB_LATE_REVERB_PAN },
- { (ALchar *)"AL_EAXREVERB_ECHO_TIME", AL_EAXREVERB_ECHO_TIME },
- { (ALchar *)"AL_EAXREVERB_ECHO_DEPTH", AL_EAXREVERB_ECHO_DEPTH },
- { (ALchar *)"AL_EAXREVERB_MODULATION_TIME", AL_EAXREVERB_MODULATION_TIME },
- { (ALchar *)"AL_EAXREVERB_MODULATION_DEPTH", AL_EAXREVERB_MODULATION_DEPTH },
- { (ALchar *)"AL_EAXREVERB_AIR_ABSORPTION_GAINHF", AL_EAXREVERB_AIR_ABSORPTION_GAINHF },
- { (ALchar *)"AL_EAXREVERB_HFREFERENCE", AL_EAXREVERB_HFREFERENCE },
- { (ALchar *)"AL_EAXREVERB_LFREFERENCE", AL_EAXREVERB_LFREFERENCE },
- { (ALchar *)"AL_EAXREVERB_ROOM_ROLLOFF_FACTOR", AL_EAXREVERB_ROOM_ROLLOFF_FACTOR },
- { (ALchar *)"AL_EAXREVERB_DECAY_HFLIMIT", AL_EAXREVERB_DECAY_HFLIMIT },
+ { "AL_EAXREVERB_DENSITY", AL_EAXREVERB_DENSITY },
+ { "AL_EAXREVERB_DIFFUSION", AL_EAXREVERB_DIFFUSION },
+ { "AL_EAXREVERB_GAIN", AL_EAXREVERB_GAIN },
+ { "AL_EAXREVERB_GAINHF", AL_EAXREVERB_GAINHF },
+ { "AL_EAXREVERB_GAINLF", AL_EAXREVERB_GAINLF },
+ { "AL_EAXREVERB_DECAY_TIME", AL_EAXREVERB_DECAY_TIME },
+ { "AL_EAXREVERB_DECAY_HFRATIO", AL_EAXREVERB_DECAY_HFRATIO },
+ { "AL_EAXREVERB_DECAY_LFRATIO", AL_EAXREVERB_DECAY_LFRATIO },
+ { "AL_EAXREVERB_REFLECTIONS_GAIN", AL_EAXREVERB_REFLECTIONS_GAIN },
+ { "AL_EAXREVERB_REFLECTIONS_DELAY", AL_EAXREVERB_REFLECTIONS_DELAY },
+ { "AL_EAXREVERB_REFLECTIONS_PAN", AL_EAXREVERB_REFLECTIONS_PAN },
+ { "AL_EAXREVERB_LATE_REVERB_GAIN", AL_EAXREVERB_LATE_REVERB_GAIN },
+ { "AL_EAXREVERB_LATE_REVERB_DELAY", AL_EAXREVERB_LATE_REVERB_DELAY },
+ { "AL_EAXREVERB_LATE_REVERB_PAN", AL_EAXREVERB_LATE_REVERB_PAN },
+ { "AL_EAXREVERB_ECHO_TIME", AL_EAXREVERB_ECHO_TIME },
+ { "AL_EAXREVERB_ECHO_DEPTH", AL_EAXREVERB_ECHO_DEPTH },
+ { "AL_EAXREVERB_MODULATION_TIME", AL_EAXREVERB_MODULATION_TIME },
+ { "AL_EAXREVERB_MODULATION_DEPTH", AL_EAXREVERB_MODULATION_DEPTH },
+ { "AL_EAXREVERB_AIR_ABSORPTION_GAINHF", AL_EAXREVERB_AIR_ABSORPTION_GAINHF },
+ { "AL_EAXREVERB_HFREFERENCE", AL_EAXREVERB_HFREFERENCE },
+ { "AL_EAXREVERB_LFREFERENCE", AL_EAXREVERB_LFREFERENCE },
+ { "AL_EAXREVERB_ROOM_ROLLOFF_FACTOR", AL_EAXREVERB_ROOM_ROLLOFF_FACTOR },
+ { "AL_EAXREVERB_DECAY_HFLIMIT", AL_EAXREVERB_DECAY_HFLIMIT },
// Echo params
- { (ALchar *)"AL_ECHO_DELAY", AL_ECHO_DELAY },
- { (ALchar *)"AL_ECHO_LRDELAY", AL_ECHO_LRDELAY },
- { (ALchar *)"AL_ECHO_DAMPING", AL_ECHO_DAMPING },
- { (ALchar *)"AL_ECHO_FEEDBACK", AL_ECHO_FEEDBACK },
- { (ALchar *)"AL_ECHO_SPREAD", AL_ECHO_SPREAD },
+ { "AL_ECHO_DELAY", AL_ECHO_DELAY },
+ { "AL_ECHO_LRDELAY", AL_ECHO_LRDELAY },
+ { "AL_ECHO_DAMPING", AL_ECHO_DAMPING },
+ { "AL_ECHO_FEEDBACK", AL_ECHO_FEEDBACK },
+ { "AL_ECHO_SPREAD", AL_ECHO_SPREAD },
// Default
- { (ALchar *)NULL, (ALenum)0 }
+ { NULL, (ALenum)0 }
};