aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 9b267d15..071ef3d2 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -40,6 +40,14 @@ struct ALvoice;
struct ALeffectslot;
+enum Resampler {
+ PointResampler,
+ LinearResampler,
+ FIR4Resampler,
+ BSincResampler,
+};
+extern enum Resampler ResamplerDefault;
+
/* The number of distinct scale and phase intervals within the filter table. */
#define BSINC_SCALE_BITS 4
#define BSINC_SCALE_COUNT (1<<BSINC_SCALE_BITS)
@@ -66,6 +74,11 @@ typedef union InterpState {
BsincState bsinc;
} InterpState;
+typedef const ALfloat* (*ResamplerFunc)(const InterpState *state,
+ const ALfloat *restrict src, ALsizei frac, ALint increment,
+ ALfloat *restrict dst, ALsizei dstlen
+);
+
typedef union aluVector {
alignas(16) ALfloat v[4];
@@ -172,6 +185,7 @@ struct ALvoiceProps {
ALfloat Orientation[2][3];
ALboolean HeadRelative;
enum DistanceModel DistanceModel;
+ enum Resampler Resampler;
ALboolean DirectChannels;
ALboolean DryGainHFAuto;
@@ -245,6 +259,8 @@ typedef struct ALvoice {
/** Current target parameters used for mixing. */
ALint Step;
+ ResamplerFunc Resampler;
+
ALuint Flags;
ALuint Offset; /* Number of output samples mixed since starting. */
@@ -272,11 +288,6 @@ typedef struct ALvoice {
void DeinitVoice(ALvoice *voice);
-typedef const ALfloat* (*ResamplerFunc)(const InterpState *state,
- const ALfloat *restrict src, ALsizei frac, ALint increment,
- ALfloat *restrict dst, ALsizei dstlen
-);
-
typedef void (*MixerFunc)(const ALfloat *data, ALsizei OutChans,
ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALfloat *CurrentGains,
const ALfloat *TargetGains, ALsizei Counter, ALsizei OutPos,
@@ -364,21 +375,12 @@ inline ALfloat resample_fir4(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat v
}
-enum Resampler {
- PointResampler,
- LinearResampler,
- FIR4Resampler,
- BSincResampler,
-};
-extern enum Resampler ResamplerDefault;
-
enum HrtfRequestMode {
Hrtf_Default = 0,
Hrtf_Enable = 1,
Hrtf_Disable = 2,
};
-
void aluInitMixer(void);
MixerFunc SelectMixer(void);