diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 44 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 40 | ||||
-rw-r--r-- | OpenAL32/alBuffer.c | 3 |
3 files changed, 44 insertions, 43 deletions
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" |