aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/backends/alsa.c1
-rw-r--r--Alc/backends/coreaudio.c3
-rw-r--r--Alc/backends/dsound.c3
-rw-r--r--Alc/backends/loopback.c4
-rw-r--r--Alc/backends/mmdevapi.c3
-rw-r--r--Alc/backends/null.c4
-rw-r--r--Alc/backends/opensl.c4
-rw-r--r--Alc/backends/oss.c4
-rw-r--r--Alc/backends/portaudio.c4
-rw-r--r--Alc/backends/pulseaudio.c2
-rw-r--r--Alc/backends/sndio.c4
-rw-r--r--Alc/backends/solaris.c4
-rw-r--r--Alc/backends/wave.c4
-rw-r--r--Alc/backends/winmm.c3
-rw-r--r--Alc/helpers.c6
-rw-r--r--OpenAL32/Include/alMain.h44
-rw-r--r--OpenAL32/Include/alu.h40
-rw-r--r--OpenAL32/alBuffer.c3
18 files changed, 73 insertions, 67 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index d43285ad..035d38e9 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -25,6 +25,7 @@
#include <memory.h>
#include "alMain.h"
+#include "alu.h"
#include <alsa/asoundlib.h>
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c
index a1ba325a..69a7404a 100644
--- a/Alc/backends/coreaudio.c
+++ b/Alc/backends/coreaudio.c
@@ -25,8 +25,7 @@
#include <string.h>
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <CoreServices/CoreServices.h>
#include <unistd.h>
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c
index 9bb9b2bc..ba144ae3 100644
--- a/Alc/backends/dsound.c
+++ b/Alc/backends/dsound.c
@@ -33,8 +33,7 @@
#endif
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#ifndef DSSPEAKER_5POINT1
#define DSSPEAKER_5POINT1 6
diff --git a/Alc/backends/loopback.c b/Alc/backends/loopback.c
index 4019d5d7..e1bdd3c1 100644
--- a/Alc/backends/loopback.c
+++ b/Alc/backends/loopback.c
@@ -21,9 +21,9 @@
#include "config.h"
#include <stdlib.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
static ALCenum loopback_open_playback(ALCdevice *device, const ALCchar *deviceName)
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 8c86b2ca..24314164 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -39,8 +39,7 @@
#endif
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index 6c6ce0d0..0b58310a 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -21,9 +21,9 @@
#include "config.h"
#include <stdlib.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
typedef struct {
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index 8d8ee72d..a010f9b7 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -22,9 +22,9 @@
#include "config.h"
#include <stdlib.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <SLES/OpenSLES.h>
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index ba4345f4..ba11faf0 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -30,9 +30,9 @@
#include <unistd.h>
#include <errno.h>
#include <math.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <sys/soundcard.h>
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 8d64189c..2f576639 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -23,9 +23,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <portaudio.h>
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index accfae73..beae5fac 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -22,7 +22,9 @@
#include "config.h"
#include <string.h>
+
#include "alMain.h"
+#include "alu.h"
#include <pulse/pulseaudio.h>
diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c
index 56dd9253..771a7b90 100644
--- a/Alc/backends/sndio.c
+++ b/Alc/backends/sndio.c
@@ -23,9 +23,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <sndio.h>
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c
index 18c5ec01..b84bb839 100644
--- a/Alc/backends/solaris.c
+++ b/Alc/backends/solaris.c
@@ -30,9 +30,9 @@
#include <unistd.h>
#include <errno.h>
#include <math.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include <sys/audioio.h>
diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c
index fe3817af..ecbfde66 100644
--- a/Alc/backends/wave.c
+++ b/Alc/backends/wave.c
@@ -23,9 +23,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
+
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
typedef struct {
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index c7bf4ded..4786d9b4 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -28,8 +28,7 @@
#include <mmsystem.h>
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#ifndef WAVE_FORMAT_IEEE_FLOAT
#define WAVE_FORMAT_IEEE_FLOAT 0x0003
diff --git a/Alc/helpers.c b/Alc/helpers.c
index a6ed583f..9529acec 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -30,6 +30,12 @@
#ifdef HAVE_CPUID_H
#include <cpuid.h>
#endif
+#ifdef HAVE_FLOAT_H
+#include <float.h>
+#endif
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
#if defined(HAVE_GUIDDEF_H) || defined(HAVE_INITGUID_H)
#define INITGUID
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 49241eca..a18da7e4 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -377,7 +377,6 @@ static __inline void UnlockUIntMapWrite(UIntMap *map)
{ WriteUnlock(&map->lock); }
#include "alListener.h"
-#include "alu.h"
#ifdef __cplusplus
extern "C" {
@@ -515,6 +514,20 @@ void alc_loopback_deinit(void);
void alc_loopback_probe(enum DevProbe type);
+enum Channel {
+ FrontLeft = 0,
+ FrontRight,
+ FrontCenter,
+ LFE,
+ BackLeft,
+ BackRight,
+ BackCenter,
+ SideLeft,
+ SideRight,
+
+ MaxChannels,
+};
+
/* Device formats */
enum DevFmtType {
DevFmtByte = ALC_BYTE_SOFT,
@@ -564,6 +577,22 @@ enum DeviceType {
Loopback
};
+
+/* Size for temporary storage of buffer data, in ALfloats. Larger values need
+ * more stack, while smaller values may need more iterations. The value needs
+ * to be a sensible size, however, as it constrains the max stepping value used
+ * for mixing, as well as the maximum number of samples per mixing iteration.
+ * The mixer requires being able to do two samplings per mixing loop. A 16KB
+ * buffer can hold 512 sample frames for a 7.1 float buffer. With the cubic
+ * resampler (which requires 3 padding sample frames), this limits the maximum
+ * step to about 508. This means that buffer_freq*source_pitch cannot exceed
+ * device_freq*508 for an 8-channel 32-bit buffer.
+ */
+#ifndef BUFFERSIZE
+#define BUFFERSIZE 4096
+#endif
+
+
struct ALCdevice_struct
{
volatile RefCount ref;
@@ -671,6 +700,19 @@ struct ALCdevice_struct
#define RemoveFilter(m, k) ((struct ALfilter*)RemoveUIntMapKey(&(m)->FilterMap, (k)))
+enum DistanceModel {
+ InverseDistanceClamped = AL_INVERSE_DISTANCE_CLAMPED,
+ LinearDistanceClamped = AL_LINEAR_DISTANCE_CLAMPED,
+ ExponentDistanceClamped = AL_EXPONENT_DISTANCE_CLAMPED,
+ InverseDistance = AL_INVERSE_DISTANCE,
+ LinearDistance = AL_LINEAR_DISTANCE,
+ ExponentDistance = AL_EXPONENT_DISTANCE,
+ DisableDistance = AL_NONE,
+
+ DefaultDistanceModel = InverseDistanceClamped
+};
+
+
struct ALCcontext_struct
{
volatile RefCount ref;
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index ece99b21..6e29e7bf 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -100,46 +100,6 @@ enum Resampler {
ResamplerMax,
};
-enum Channel {
- FrontLeft = 0,
- FrontRight,
- FrontCenter,
- LFE,
- BackLeft,
- BackRight,
- BackCenter,
- SideLeft,
- SideRight,
-
- MaxChannels,
-};
-
-enum DistanceModel {
- InverseDistanceClamped = AL_INVERSE_DISTANCE_CLAMPED,
- LinearDistanceClamped = AL_LINEAR_DISTANCE_CLAMPED,
- ExponentDistanceClamped = AL_EXPONENT_DISTANCE_CLAMPED,
- InverseDistance = AL_INVERSE_DISTANCE,
- LinearDistance = AL_LINEAR_DISTANCE,
- ExponentDistance = AL_EXPONENT_DISTANCE,
- DisableDistance = AL_NONE,
-
- DefaultDistanceModel = InverseDistanceClamped
-};
-
-
-/* Size for temporary storage of buffer data, in ALfloats. Larger values need
- * more stack, while smaller values may need more iterations. The value needs
- * to be a sensible size, however, as it constrains the max stepping value used
- * for mixing, as well as the maximum number of samples per mixing iteration.
- * The mixer requires being able to do two samplings per mixing loop. A 16KB
- * buffer can hold 512 sample frames for a 7.1 float buffer. With the cubic
- * resampler (which requires 3 padding sample frames), this limits the maximum
- * step to about 508. This means that buffer_freq*source_pitch cannot exceed
- * device_freq*508 for an 8-channel 32-bit buffer.
- */
-#ifndef BUFFERSIZE
-#define BUFFERSIZE 4096
-#endif
#define FRACTIONBITS (14)
#define FRACTIONONE (1<<FRACTIONBITS)
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 46b16bbb..d6d62153 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -26,8 +26,7 @@
#include <limits.h>
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alu.h"
#include "alError.h"
#include "alBuffer.h"
#include "alThunk.h"