From 61be01efc197fd2719ad2b3df0cb408d50c7b1ef Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 10 Feb 2012 00:29:47 -0800 Subject: [PATCH] Rename SpeakerGain to ChannelGain --- Alc/ALu.c | 16 ++++++++-------- Alc/alcDedicated.c | 6 +++--- Alc/alcEcho.c | 10 +++++----- Alc/alcReverb.c | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 195c6b71..ba43cb36 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -116,7 +116,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALfloat WetGain[MAX_SENDS]; ALfloat WetGainHF[MAX_SENDS]; ALint NumSends, Frequency; - const ALfloat *SpeakerGain; + const ALfloat *ChannelGain; const struct ChanMap *chans = NULL; enum Resampler Resampler; ALint num_channels = 0; @@ -209,13 +209,13 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) { pos = aluCart2LUTpos(aluCos(RearMap[c].angle), aluSin(RearMap[c].angle)); - SpeakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; for(i = 0;i < (ALint)Device->NumChan;i++) { enum Channel chan = Device->Speaker2Chan[i]; SrcMatrix[c][chan] += DryGain * ListenerGain * - SpeakerGain[chan]; + ChannelGain[chan]; } } } @@ -292,13 +292,13 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) continue; } pos = aluCart2LUTpos(aluCos(chans[c].angle), aluSin(chans[c].angle)); - SpeakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; for(i = 0;i < (ALint)Device->NumChan;i++) { enum Channel chan = Device->Speaker2Chan[i]; SrcMatrix[c][chan] += DryGain * ListenerGain * - SpeakerGain[chan]; + ChannelGain[chan]; } } } @@ -740,7 +740,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) { // Use energy-preserving panning algorithm for multi-speaker playback ALfloat DirGain, AmbientGain; - const ALfloat *SpeakerGain; + const ALfloat *ChannelGain; ALfloat length; ALint pos; @@ -754,7 +754,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } pos = aluCart2LUTpos(-Position[2]*ZScale, Position[0]); - SpeakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; DirGain = aluSqrt(Position[0]*Position[0] + Position[2]*Position[2]); // elevation adjustment for directional gain. this sucks, but @@ -769,7 +769,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) for(i = 0;i < (ALint)Device->NumChan;i++) { enum Channel chan = Device->Speaker2Chan[i]; - ALfloat gain = lerp(AmbientGain, SpeakerGain[chan], DirGain); + ALfloat gain = lerp(AmbientGain, ChannelGain[chan], DirGain); ALSource->Params.DryGains[0][chan] = DryGain * gain; } } diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c index a371bb20..2f9e3dcc 100644 --- a/Alc/alcDedicated.c +++ b/Alc/alcDedicated.c @@ -54,7 +54,7 @@ static ALvoid DedicatedUpdate(ALeffectState *effect, ALCcontext *Context, const { ALdedicatedState *state = (ALdedicatedState*)effect; ALCdevice *device = Context->Device; - const ALfloat *SpeakerGain; + const ALfloat *ChannelGain; ALfloat Gain; ALint pos; ALsizei s; @@ -66,10 +66,10 @@ static ALvoid DedicatedUpdate(ALeffectState *effect, ALCcontext *Context, const if(Slot->effect.type == AL_EFFECT_DEDICATED_DIALOGUE) { pos = aluCart2LUTpos(1.0f, 0.0f); - SpeakerGain = device->PanningLUT[pos]; + ChannelGain = device->PanningLUT[pos]; for(s = 0;s < MAXCHANNELS;s++) - state->gains[s] = SpeakerGain[s] * Gain; + state->gains[s] = ChannelGain[s] * Gain; } else if(Slot->effect.type == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT) state->gains[LFE] = Gain; diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c index 17cc492e..0a8980a0 100644 --- a/Alc/alcEcho.c +++ b/Alc/alcEcho.c @@ -96,7 +96,7 @@ static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeff ALCdevice *Device = Context->Device; ALuint frequency = Device->Frequency; ALfloat dirGain, ambientGain; - const ALfloat *speakerGain; + const ALfloat *ChannelGain; ALfloat lrpan, cw, g, gain; ALuint i, pos; @@ -124,22 +124,22 @@ static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeff /* First tap panning */ pos = aluCart2LUTpos(0.0f, ((lrpan>0.0f)?-1.0f:1.0f)); - speakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; for(i = 0;i < Device->NumChan;i++) { enum Channel chan = Device->Speaker2Chan[i]; - state->Gain[0][chan] = lerp(ambientGain, speakerGain[chan], dirGain) * gain; + state->Gain[0][chan] = lerp(ambientGain, ChannelGain[chan], dirGain) * gain; } /* Second tap panning */ pos = aluCart2LUTpos(0.0f, ((lrpan>0.0f)?1.0f:-1.0f)); - speakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; for(i = 0;i < Device->NumChan;i++) { enum Channel chan = Device->Speaker2Chan[i]; - state->Gain[1][chan] = lerp(ambientGain, speakerGain[chan], dirGain) * gain; + state->Gain[1][chan] = lerp(ambientGain, ChannelGain[chan], dirGain) * gain; } } diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index caeec18b..f21819ef 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -1016,7 +1016,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection ReflectionsPan[2] }; ALfloat latePan[3] = { LateReverbPan[0], LateReverbPan[1], LateReverbPan[2] }; - const ALfloat *speakerGain; + const ALfloat *ChannelGain; ALfloat ambientGain; ALfloat dirGain; ALfloat length; @@ -1054,7 +1054,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection * panning direction. */ pos = aluCart2LUTpos(earlyPan[2], earlyPan[0]); - speakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; dirGain = aluSqrt((earlyPan[0] * earlyPan[0]) + (earlyPan[2] * earlyPan[2])); for(index = 0;index < MAXCHANNELS;index++) @@ -1062,12 +1062,12 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection for(index = 0;index < Device->NumChan;index++) { enum Channel chan = Device->Speaker2Chan[index]; - State->Early.PanGain[chan] = lerp(ambientGain, speakerGain[chan], dirGain) * Gain; + State->Early.PanGain[chan] = lerp(ambientGain, ChannelGain[chan], dirGain) * Gain; } pos = aluCart2LUTpos(latePan[2], latePan[0]); - speakerGain = Device->PanningLUT[pos]; + ChannelGain = Device->PanningLUT[pos]; dirGain = aluSqrt((latePan[0] * latePan[0]) + (latePan[2] * latePan[2])); for(index = 0;index < MAXCHANNELS;index++) @@ -1075,7 +1075,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection for(index = 0;index < Device->NumChan;index++) { enum Channel chan = Device->Speaker2Chan[index]; - State->Late.PanGain[chan] = lerp(ambientGain, speakerGain[chan], dirGain) * Gain; + State->Late.PanGain[chan] = lerp(ambientGain, ChannelGain[chan], dirGain) * Gain; } } -- 2.11.4.GIT