aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-02 02:25:34 -0700
committerChris Robinson <[email protected]>2011-07-02 02:25:34 -0700
commit931d422443758062b9622b84782c8b2194ba6b51 (patch)
treeb409b4afb2e3bec16e6c57292c8cd3ecc3579321
parent895150eebee7f9f172204c98a195073b55114bcb (diff)
Use separate ALC enums for loopback device formats
-rw-r--r--Alc/ALc.c17
-rw-r--r--OpenAL32/Include/alMain.h50
2 files changed, 51 insertions, 16 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 068540cd..c700eef0 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -313,6 +313,23 @@ static const ALCenums enumeration[] = {
{ "ALC_FORMAT_CHANNELS_SOFT", ALC_FORMAT_CHANNELS_SOFT },
{ "ALC_FORMAT_TYPE_SOFT", ALC_FORMAT_TYPE_SOFT },
+ // Buffer Channel Configurations
+ { "ALC_MONO", ALC_MONO },
+ { "ALC_STEREO", ALC_STEREO },
+ { "ALC_QUAD", ALC_QUAD },
+ { "ALC_5POINT1", ALC_5POINT1 },
+ { "ALC_6POINT1", ALC_6POINT1 },
+ { "ALC_7POINT1", ALC_7POINT1 },
+
+ // Buffer Sample Types
+ { "ALC_BYTE", ALC_BYTE },
+ { "ALC_UNSIGNED_BYTE", ALC_UNSIGNED_BYTE },
+ { "ALC_SHORT", ALC_SHORT },
+ { "ALC_UNSIGNED_SHORT", ALC_UNSIGNED_SHORT },
+ { "ALC_INT", ALC_INT },
+ { "ALC_UNSIGNED_INT", ALC_UNSIGNED_INT },
+ { "ALC_FLOAT", ALC_FLOAT },
+
// ALC Error Message
{ "ALC_NO_ERROR", ALC_NO_ERROR },
{ "ALC_INVALID_DEVICE", ALC_INVALID_DEVICE },
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 7ed9c636..c6de6f0f 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -13,6 +13,40 @@
#include "AL/alc.h"
#include "AL/alext.h"
+#ifndef ALC_SOFT_device_loopback
+#define ALC_SOFT_device_loopback 1
+#define ALC_FORMAT_CHANNELS_SOFT 0x1990
+#define ALC_FORMAT_TYPE_SOFT 0x1991
+
+/* Sample types */
+#define ALC_BYTE 0x1400
+#define ALC_UNSIGNED_BYTE 0x1401
+#define ALC_SHORT 0x1402
+#define ALC_UNSIGNED_SHORT 0x1403
+#define ALC_INT 0x1404
+#define ALC_UNSIGNED_INT 0x1405
+#define ALC_FLOAT 0x1406
+
+/* Channel configurations */
+#define ALC_MONO 0x1500
+#define ALC_STEREO 0x1501
+#define ALC_QUAD 0x1503
+#define ALC_5POINT1 0x1504 /* (WFX order) */
+#define ALC_6POINT1 0x1505 /* (WFX order) */
+#define ALC_7POINT1 0x1506 /* (WFX order) */
+
+typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(void);
+typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice *device, ALCsizei freq, ALenum channels, ALenum type);
+typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
+#ifdef AL_ALEXT_PROTOTYPES
+ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(void);
+ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALenum channels, ALenum type);
+ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
+#endif
+#endif
+
+#ifndef AL_SOFT_buffer_samples
+#define AL_SOFT_buffer_samples 1
/* Sample types */
#define AL_BYTE 0x1400
#define AL_UNSIGNED_BYTE 0x1401
@@ -59,22 +93,6 @@
#define AL_7POINT1_16 0x1211
#define AL_7POINT1_32F 0x1212
-#ifndef ALC_SOFT_device_loopback
-#define ALC_SOFT_device_loopback 1
-#define ALC_FORMAT_CHANNELS_SOFT 0x1990
-#define ALC_FORMAT_TYPE_SOFT 0x1991
-typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(void);
-typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice *device, ALCsizei freq, ALenum channels, ALenum type);
-typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
-#ifdef AL_ALEXT_PROTOTYPES
-ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(void);
-ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALenum channels, ALenum type);
-ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
-#endif
-#endif
-
-#ifndef AL_SOFT_buffer_samples
-#define AL_SOFT_buffer_samples 1
typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);