aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-02-14 01:22:01 -0800
committerChris Robinson <[email protected]>2016-02-14 01:22:01 -0800
commit25732d0895cc4d320472fc50cd74302d91b24a0c (patch)
treef2a6d757dceaef243881c1e942208db1bebb7d4e /OpenAL32/Include/alu.h
parenta9135ec39d8722502e92fc5141661c3479d877d9 (diff)
Calculate channel gain stepping just before mixing
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index eb2ea534..50ef1f5e 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -143,13 +143,10 @@ typedef struct DirectParams {
ALfloat (*OutBuffer)[BUFFERSIZE];
ALuint OutChannels;
- /* If not 'moving', gain/coefficients are set directly without fading. */
- ALboolean Moving;
- /* Stepping counter for gain/coefficient fading. */
- ALuint Counter;
/* Last direction (relative to listener) and gain of a moving source. */
aluVector LastDir;
ALfloat LastGain;
+ ALuint HrtfCounter;
struct {
enum ActiveFilters ActiveType;
@@ -161,22 +158,27 @@ typedef struct DirectParams {
HrtfParams Params;
HrtfState State;
} Hrtf[MAX_INPUT_CHANNELS];
- MixGains Gains[MAX_INPUT_CHANNELS][MAX_OUTPUT_CHANNELS];
+
+ struct {
+ ALfloat Current[MAX_OUTPUT_CHANNELS];
+ ALfloat Target[MAX_OUTPUT_CHANNELS];
+ } Gains[MAX_INPUT_CHANNELS];
} DirectParams;
typedef struct SendParams {
ALfloat (*OutBuffer)[BUFFERSIZE];
ALuint OutChannels;
- ALboolean Moving;
- ALuint Counter;
-
struct {
enum ActiveFilters ActiveType;
ALfilterState LowPass;
ALfilterState HighPass;
} Filters[MAX_INPUT_CHANNELS];
- MixGains Gains[MAX_INPUT_CHANNELS][MAX_EFFECT_CHANNELS];
+
+ struct {
+ ALfloat Current[MAX_OUTPUT_CHANNELS];
+ ALfloat Target[MAX_OUTPUT_CHANNELS];
+ } Gains[MAX_INPUT_CHANNELS];
} SendParams;