aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-25 00:08:05 -0700
committerChris Robinson <[email protected]>2011-06-25 00:13:56 -0700
commit1fc44d57889ecde9bd3693dbaaceb0e9039bdfb0 (patch)
tree66f17970bcdb3675404df09fa9f49c4c41f94e7d /OpenAL32/Include/alu.h
parent913c70557d562695cd7cd96fce49ab7a2818713a (diff)
Select the mixer during a source update
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 41ad5f6b..4e794f26 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -61,6 +61,25 @@
extern "C" {
#endif
+struct ALsource;
+struct ALbuffer;
+
+typedef ALvoid (*MixerFunc)(struct ALsource *self, ALCdevice *Device,
+ const ALvoid *RESTRICT data,
+ ALuint *DataPosInt, ALuint *DataPosFrac,
+ ALuint OutPos, ALuint SamplesToDo,
+ ALuint BufferSize);
+
+typedef enum {
+ POINT_RESAMPLER = 0,
+ LINEAR_RESAMPLER,
+ CUBIC_RESAMPLER,
+
+ RESAMPLER_MAX,
+ RESAMPLER_MIN = -1,
+ RESAMPLER_DEFAULT = LINEAR_RESAMPLER
+} resampler_t;
+
typedef enum {
FRONT_LEFT = 0,
FRONT_RIGHT,
@@ -110,16 +129,15 @@ static __inline ALdouble cubic(ALdouble val0, ALdouble val1, ALdouble val2, ALdo
return a0*mu*mu2 + a1*mu2 + a2*mu + a3;
}
-struct ALsource;
-struct ALbuffer;
-
ALvoid aluInitPanning(ALCdevice *Device);
ALint aluCart2LUTpos(ALfloat re, ALfloat im);
ALvoid CalcSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
ALvoid CalcNonAttnSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
-ALvoid SelectMixer(struct ALsource *Source, struct ALbuffer *Buffer);
+MixerFunc SelectMixer(struct ALbuffer *Buffer, resampler_t Resampler);
+MixerFunc SelectHrtfMixer(struct ALbuffer *Buffer, resampler_t Resampler);
+
ALvoid MixSource(struct ALsource *Source, ALCdevice *Device, ALuint SamplesToDo);
ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size);