summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-18 10:24:07 -0700
committerChris Robinson <[email protected]>2014-05-18 10:24:07 -0700
commitc9083d04fabb2cfc0622a8ec36f892355a025df5 (patch)
treebd7b17dcd9d5feb693676a56e78b976d5378c27c /OpenAL32/Include/alu.h
parent5a1abf69189463312787921f5a3cf5fd35bf65c2 (diff)
Don't pass the DirectParams to the dry-path mixer
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 7816ee94..432e9bd3 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -46,6 +46,7 @@ enum ActiveFilters {
AF_BandPass = AF_LowPass | AF_HighPass
};
+
typedef struct HrtfState {
alignas(16) ALfloat History[SRC_HISTORY_LENGTH];
alignas(16) ALfloat Values[HRIR_LENGTH][2];
@@ -58,6 +59,14 @@ typedef struct HrtfParams {
ALint DelayStep[2];
} HrtfParams;
+
+typedef struct MixGains {
+ ALfloat Current[MaxChannels];
+ ALfloat Step[MaxChannels];
+ ALfloat Target[MaxChannels];
+} MixGains;
+
+
typedef struct DirectParams {
ALfloat (*OutBuffer)[BUFFERSIZE];
@@ -81,14 +90,7 @@ typedef struct DirectParams {
ALfloat Dir[3];
} Hrtf;
- /* A mixing matrix. First subscript is the channel number of the input
- * data (regardless of channel configuration) and the second is the
- * channel target (eg. FrontLeft). Not used with HRTF. */
- struct {
- ALfloat Current[MAX_INPUT_CHANNELS][MaxChannels];
- ALfloat Step[MAX_INPUT_CHANNELS][MaxChannels];
- ALfloat Target[MAX_INPUT_CHANNELS][MaxChannels];
- } Gains;
+ MixGains Gains[MAX_INPUT_CHANNELS];
} Mix;
} DirectParams;
@@ -115,10 +117,9 @@ typedef struct SendParams {
typedef void (*ResamplerFunc)(const ALfloat *src, ALuint frac, ALuint increment,
ALfloat *restrict dst, ALuint dstlen);
-typedef ALvoid (*DryMixerFunc)(struct DirectParams *params,
- ALfloat (*restrict OutBuffer)[BUFFERSIZE],
- const ALfloat *restrict data, ALuint Counter,
- ALuint srcchan, ALuint OutPos, ALuint BufferSize);
+typedef ALvoid (*DryMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
+ MixGains *Gains, ALuint Counter, ALuint OutPos,
+ ALuint BufferSize);
typedef void (*HrtfMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
ALuint Counter, ALuint Offset, const ALuint IrSize,
const HrtfParams *hrtfparams, HrtfState *hrtfstate,