From 0f3a575a09fd3fa77564fd58d526aef14e8ef22a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 14 Sep 2012 02:14:29 -0700 Subject: [PATCH] Don't include alu.h in alMain.h --- Alc/backends/alsa.c | 1 + Alc/backends/coreaudio.c | 3 +-- Alc/backends/dsound.c | 3 +-- Alc/backends/loopback.c | 4 ++-- Alc/backends/mmdevapi.c | 3 +-- Alc/backends/null.c | 4 ++-- Alc/backends/opensl.c | 4 ++-- Alc/backends/oss.c | 4 ++-- Alc/backends/portaudio.c | 4 ++-- Alc/backends/pulseaudio.c | 2 ++ Alc/backends/sndio.c | 4 ++-- Alc/backends/solaris.c | 4 ++-- Alc/backends/wave.c | 4 ++-- Alc/backends/winmm.c | 3 +-- Alc/helpers.c | 6 ++++++ OpenAL32/Include/alMain.h | 44 +++++++++++++++++++++++++++++++++++++++++++- OpenAL32/Include/alu.h | 40 ---------------------------------------- OpenAL32/alBuffer.c | 3 +-- 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 #include "alMain.h" +#include "alu.h" #include 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 #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include #include 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 + #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 + #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 + #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include 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 #include #include + #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include 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 #include #include + #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include 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 + #include "alMain.h" +#include "alu.h" #include 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 #include #include + #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include 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 #include #include + #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include 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 #include #include + #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 #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 #endif +#ifdef HAVE_FLOAT_H +#include +#endif +#ifdef HAVE_IEEEFP_H +#include +#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< #include "alMain.h" -#include "AL/al.h" -#include "AL/alc.h" +#include "alu.h" #include "alError.h" #include "alBuffer.h" #include "alThunk.h" -- 2.11.4.GIT