summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-31 19:34:52 -0800
committerChris Robinson <[email protected]>2007-12-31 19:34:52 -0800
commit3d78d93b4033ea94d38981e75f10c6dee5264860 (patch)
treeeff0ee8b22ea032075fd16046d6cb24fa52a8243 /OpenAL32/Include
parent5a2f509104b196bbef336b6c772cd621473f2e55 (diff)
parent9382956b0ec459a696805a23656a9e94b6ed94d9 (diff)
Merge branch 'master' into efx-experiment
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h37
-rw-r--r--OpenAL32/Include/alSource.h4
-rw-r--r--OpenAL32/Include/alu.h6
3 files changed, 24 insertions, 23 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 168991b7..a5e5184a 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -1,9 +1,6 @@
#ifndef AL_MAIN_H
#define AL_MAIN_H
-#define AL_MAX_CHANNELS 4
-#define AL_MAX_SOURCES 32
-
#include <string.h>
#include "alu.h"
@@ -59,13 +56,7 @@ static inline void DeleteCriticalSection(CRITICAL_SECTION *cs)
#define max(x,y) (((x)>(y))?(x):(y))
#endif
-#include "alBuffer.h"
-#include "alError.h"
-#include "alExtension.h"
#include "alListener.h"
-#include "alSource.h"
-#include "alState.h"
-#include "alThunk.h"
#ifdef __cplusplus
extern "C"
@@ -82,20 +73,36 @@ extern char _alDebug[256];
if(!_al_print_fn) _al_print_fn = __FILE__; \
else _al_print_fn += 1; \
_al_print_i = snprintf(_alDebug, sizeof(_alDebug), "AL lib: %s:%d: ", _al_print_fn, __LINE__); \
- snprintf(_alDebug+_al_print_i, sizeof(_alDebug)-_al_print_i, __VA_ARGS__); \
+ if(_al_print_i < (int)sizeof(_alDebug) && _al_print_i > 0) \
+ snprintf(_alDebug+_al_print_i, sizeof(_alDebug)-_al_print_i, __VA_ARGS__); \
+ _alDebug[sizeof(_alDebug)-1] = 0; \
fprintf(stderr, "%s", _alDebug); \
} while(0)
+#define AL_FORMAT_MONO_FLOAT32 0x10010
+#define AL_FORMAT_STEREO_FLOAT32 0x10011
+
#define AL_FORMAT_MONO_IMA4 0x1300
#define AL_FORMAT_STEREO_IMA4 0x1301
-// These are from AL_EXT_MCFORMATS, which we don't support yet but the mixer
-// can use 4-channel formats
+
+#define AL_FORMAT_51CHN8 0x120A
+#define AL_FORMAT_51CHN16 0x120B
+#define AL_FORMAT_51CHN32 0x120C
+#define AL_FORMAT_61CHN8 0x120D
+#define AL_FORMAT_61CHN16 0x120E
+#define AL_FORMAT_61CHN32 0x120F
+#define AL_FORMAT_71CHN8 0x1210
+#define AL_FORMAT_71CHN16 0x1211
+#define AL_FORMAT_71CHN32 0x1212
#define AL_FORMAT_QUAD8 0x1204
#define AL_FORMAT_QUAD16 0x1205
+#define AL_FORMAT_QUAD32 0x1206
+#define AL_FORMAT_REAR8 0x1207
+#define AL_FORMAT_REAR16 0x1208
+#define AL_FORMAT_REAR32 0x1209
#define SWMIXER_OUTPUT_RATE 44100
-//#define OUTPUT_BUFFER_SIZE (32768*SWMIXER_OUTPUT_RATE/22050)
#define SPEEDOFSOUNDMETRESPERSEC (343.3f)
#define AIRABSORBGAINHF (0.994f)
@@ -154,8 +161,8 @@ struct ALCcontext_struct
{
ALlistener Listener;
- ALsource *Source;
- ALuint SourceCount;
+ struct ALsource *Source;
+ ALuint SourceCount;
ALenum LastError;
ALboolean InUse;
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index f54d4721..09651fa5 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -31,7 +31,7 @@ typedef struct ALbufferlistitem
struct ALbufferlistitem *next;
} ALbufferlistitem;
-typedef struct ALsource_struct
+typedef struct ALsource
{
ALfloat flPitch;
ALfloat flGain;
@@ -94,7 +94,7 @@ typedef struct ALsource_struct
// Source Type (Static, Streaming, or Undetermined)
ALint lSourceType;
- struct ALsource_struct *next;
+ struct ALsource *next;
} ALsource;
#ifdef __cplusplus
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index e4fe0dc3..d43e0127 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -1,12 +1,6 @@
#ifndef _ALU_H_
#define _ALU_H_
-#define BUFFERSIZE 48000
-#define FRACTIONBITS 14
-#define FRACTIONMASK ((1L<<FRACTIONBITS)-1)
-#define MAX_PITCH 4
-#define OUTPUTCHANNELS 4
-
#include "AL/al.h"
#include "AL/alc.h"