diff options
author | Chris Robinson <[email protected]> | 2014-11-22 12:58:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-22 12:58:54 -0800 |
commit | fb511351dfe1db70af47b27dfded83d588f61faf (patch) | |
tree | e38d317421f7d5d18c7e3018ee02c327c1d01192 | |
parent | e41cfeca840f36f4d360fd86b86ee2087940c1e1 (diff) |
Remove an unnecessary union container
-rw-r--r-- | Alc/ALu.c | 12 | ||||
-rw-r--r-- | Alc/mixer.c | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 4 |
3 files changed, 8 insertions, 10 deletions
@@ -145,7 +145,7 @@ static void UpdateDryStepping(DirectParams *params, ALuint num_chans) { for(i = 0;i < num_chans;i++) { - MixGains *gains = params->Mix.Gains[i]; + MixGains *gains = params->Gains[i]; for(j = 0;j < MAX_OUTPUT_CHANNELS;j++) { gains[j].Current = gains[j].Target; @@ -159,7 +159,7 @@ static void UpdateDryStepping(DirectParams *params, ALuint num_chans) for(i = 0;i < num_chans;i++) { - MixGains *gains = params->Mix.Gains[i]; + MixGains *gains = params->Gains[i]; for(j = 0;j < MAX_OUTPUT_CHANNELS;j++) { ALfloat cur = maxf(gains[j].Current, FLT_EPSILON); @@ -477,7 +477,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A for(c = 0;c < num_channels;c++) { - MixGains *gains = voice->Direct.Mix.Gains[c]; + MixGains *gains = voice->Direct.Gains[c]; ALfloat Target[MAX_OUTPUT_CHANNELS]; ComputeBFormatGains(Device, matrix[c], DryGain, Target); @@ -497,7 +497,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A { for(c = 0;c < num_channels;c++) { - MixGains *gains = voice->Direct.Mix.Gains[c]; + MixGains *gains = voice->Direct.Gains[c]; int idx; for(j = 0;j < MAX_OUTPUT_CHANNELS;j++) @@ -513,7 +513,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A { for(c = 0;c < num_channels;c++) { - MixGains *gains = voice->Direct.Mix.Gains[c]; + MixGains *gains = voice->Direct.Gains[c]; ALfloat Target[MAX_OUTPUT_CHANNELS]; /* Special-case LFE */ @@ -916,7 +916,7 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte } { - MixGains *gains = voice->Direct.Mix.Gains[0]; + MixGains *gains = voice->Direct.Gains[0]; ALfloat radius = ALSource->Radius; ALfloat Target[MAX_OUTPUT_CHANNELS]; diff --git a/Alc/mixer.c b/Alc/mixer.c index 7a4d455d..b9bd4463 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -415,7 +415,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam Device->FilteredData, ResampledData, DstBufferSize, parms->Filters[chan].ActiveType ); - Mix(samples, Device->NumChannels, parms->OutBuffer, parms->Mix.Gains[chan], + Mix(samples, Device->NumChannels, parms->OutBuffer, parms->Gains[chan], parms->Counter, OutPos, DstBufferSize); } diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 69452e72..0ff8ddbc 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -70,9 +70,7 @@ typedef struct DirectParams { ALfilterState HighPass; } Filters[MAX_INPUT_CHANNELS]; - union { - MixGains Gains[MAX_INPUT_CHANNELS][MAX_OUTPUT_CHANNELS]; - } Mix; + MixGains Gains[MAX_INPUT_CHANNELS][MAX_OUTPUT_CHANNELS]; } DirectParams; typedef struct SendParams { |