aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-11 07:42:23 -0700
committerChris Robinson <[email protected]>2011-09-11 07:42:23 -0700
commitd51b93f8697ef562f09c843df31aaeb773d3caff (patch)
tree5b0faf40d137dad571eb3016289a71e46e2e9cea /Alc
parentab2b62c98030aa545ee0043feeae05916329a521 (diff)
Remove the union from the effect parameter types
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c6
-rw-r--r--Alc/alcDedicated.c2
-rw-r--r--Alc/alcEcho.c10
-rw-r--r--Alc/alcModulator.c10
-rw-r--r--Alc/alcReverb.c48
5 files changed, 38 insertions, 38 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 3c80b7bc..0446525c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -424,10 +424,10 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
RoomRolloff[i] = RoomRolloffBase;
if(IsReverbEffect(Slot->effect.type))
{
- RoomRolloff[i] += Slot->effect.Params.Reverb.RoomRolloffFactor;
- DecayDistance[i] = Slot->effect.Params.Reverb.DecayTime *
+ RoomRolloff[i] += Slot->effect.Reverb.RoomRolloffFactor;
+ DecayDistance[i] = Slot->effect.Reverb.DecayTime *
SPEEDOFSOUNDMETRESPERSEC;
- RoomAirAbsorption[i] = Slot->effect.Params.Reverb.AirAbsorptionGainHF;
+ RoomAirAbsorption[i] = Slot->effect.Reverb.AirAbsorptionGainHF;
}
else
{
diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c
index cba97eae..307d60ef 100644
--- a/Alc/alcDedicated.c
+++ b/Alc/alcDedicated.c
@@ -59,7 +59,7 @@ static ALvoid DedicatedUpdate(ALeffectState *effect, ALCcontext *Context, const
ALint pos;
ALsizei s;
- Gain = Slot->Gain * Slot->effect.Params.Dedicated.Gain;
+ Gain = Slot->Gain * Slot->effect.Dedicated.Gain;
for(s = 0;s < MAXCHANNELS;s++)
state->gains[s] = 0.0f;
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index b62c124a..f5d1174f 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -101,18 +101,18 @@ static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeff
ALfloat lrpan, cw, g, gain;
ALuint i;
- state->Tap[0].delay = (ALuint)(Slot->effect.Params.Echo.Delay * frequency) + 1;
- state->Tap[1].delay = (ALuint)(Slot->effect.Params.Echo.LRDelay * frequency);
+ state->Tap[0].delay = (ALuint)(Slot->effect.Echo.Delay * frequency) + 1;
+ state->Tap[1].delay = (ALuint)(Slot->effect.Echo.LRDelay * frequency);
state->Tap[1].delay += state->Tap[0].delay;
- lrpan = Slot->effect.Params.Echo.Spread*0.5f + 0.5f;
+ lrpan = Slot->effect.Echo.Spread*0.5f + 0.5f;
state->GainL = aluSqrt( lrpan);
state->GainR = aluSqrt(1.0f-lrpan);
- state->FeedGain = Slot->effect.Params.Echo.Feedback;
+ state->FeedGain = Slot->effect.Echo.Feedback;
cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / frequency);
- g = 1.0f - Slot->effect.Params.Echo.Damping;
+ g = 1.0f - Slot->effect.Echo.Damping;
state->iirFilter.coeff = lpCoeffCalc(g, cw);
gain = Slot->Gain;
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index c4085fa3..e0ab5a1a 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -139,19 +139,19 @@ static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const
ALfloat gain, cw, a = 0.0f;
ALuint index;
- if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID)
+ if(Slot->effect.Modulator.Waveform == AL_RING_MODULATOR_SINUSOID)
state->Waveform = SINUSOID;
- else if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH)
+ else if(Slot->effect.Modulator.Waveform == AL_RING_MODULATOR_SAWTOOTH)
state->Waveform = SAWTOOTH;
- else if(Slot->effect.Params.Modulator.Waveform == AL_RING_MODULATOR_SQUARE)
+ else if(Slot->effect.Modulator.Waveform == AL_RING_MODULATOR_SQUARE)
state->Waveform = SQUARE;
- state->step = Slot->effect.Params.Modulator.Frequency*(1<<WAVEFORM_FRACBITS) /
+ state->step = Slot->effect.Modulator.Frequency*(1<<WAVEFORM_FRACBITS) /
Device->Frequency;
if(!state->step)
state->step = 1;
- cw = cos(2.0*M_PI * Slot->effect.Params.Modulator.HighPassCutoff /
+ cw = cos(2.0*M_PI * Slot->effect.Modulator.HighPassCutoff /
Device->Frequency);
a = (2.0f-cw) - aluSqrt(aluPow(2.0f-cw, 2.0f) - 1.0f);
state->iirFilter.coeff = a;
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index 5a742593..84cda102 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -1113,61 +1113,61 @@ static ALvoid ReverbUpdate(ALeffectState *effect, ALCcontext *Context, const ALe
}
// Calculate the master low-pass filter (from the master effect HF gain).
- cw = CalcI3DL2HFreq(Slot->effect.Params.Reverb.HFReference, frequency);
+ cw = CalcI3DL2HFreq(Slot->effect.Reverb.HFReference, frequency);
// This is done with 2 chained 1-pole filters, so no need to square g.
- State->LpFilter.coeff = lpCoeffCalc(Slot->effect.Params.Reverb.GainHF, cw);
+ State->LpFilter.coeff = lpCoeffCalc(Slot->effect.Reverb.GainHF, cw);
if(isEAX)
{
// Update the modulator line.
- UpdateModulator(Slot->effect.Params.Reverb.ModulationTime,
- Slot->effect.Params.Reverb.ModulationDepth,
+ UpdateModulator(Slot->effect.Reverb.ModulationTime,
+ Slot->effect.Reverb.ModulationDepth,
frequency, State);
}
// Update the initial effect delay.
- UpdateDelayLine(Slot->effect.Params.Reverb.ReflectionsDelay,
- Slot->effect.Params.Reverb.LateReverbDelay,
+ UpdateDelayLine(Slot->effect.Reverb.ReflectionsDelay,
+ Slot->effect.Reverb.LateReverbDelay,
frequency, State);
// Update the early lines.
- UpdateEarlyLines(Slot->effect.Params.Reverb.Gain,
- Slot->effect.Params.Reverb.ReflectionsGain,
- Slot->effect.Params.Reverb.LateReverbDelay, State);
+ UpdateEarlyLines(Slot->effect.Reverb.Gain,
+ Slot->effect.Reverb.ReflectionsGain,
+ Slot->effect.Reverb.LateReverbDelay, State);
// Update the decorrelator.
- UpdateDecorrelator(Slot->effect.Params.Reverb.Density, frequency, State);
+ UpdateDecorrelator(Slot->effect.Reverb.Density, frequency, State);
// Get the mixing matrix coefficients (x and y).
- CalcMatrixCoeffs(Slot->effect.Params.Reverb.Diffusion, &x, &y);
+ CalcMatrixCoeffs(Slot->effect.Reverb.Diffusion, &x, &y);
// Then divide x into y to simplify the matrix calculation.
State->Late.MixCoeff = y / x;
// If the HF limit parameter is flagged, calculate an appropriate limit
// based on the air absorption parameter.
- hfRatio = Slot->effect.Params.Reverb.DecayHFRatio;
- if(Slot->effect.Params.Reverb.DecayHFLimit &&
- Slot->effect.Params.Reverb.AirAbsorptionGainHF < 1.0f)
+ hfRatio = Slot->effect.Reverb.DecayHFRatio;
+ if(Slot->effect.Reverb.DecayHFLimit &&
+ Slot->effect.Reverb.AirAbsorptionGainHF < 1.0f)
hfRatio = CalcLimitedHfRatio(hfRatio,
- Slot->effect.Params.Reverb.AirAbsorptionGainHF,
- Slot->effect.Params.Reverb.DecayTime);
+ Slot->effect.Reverb.AirAbsorptionGainHF,
+ Slot->effect.Reverb.DecayTime);
// Update the late lines.
- UpdateLateLines(Slot->effect.Params.Reverb.Gain, Slot->effect.Params.Reverb.LateReverbGain,
- x, Slot->effect.Params.Reverb.Density, Slot->effect.Params.Reverb.DecayTime,
- Slot->effect.Params.Reverb.Diffusion, hfRatio, cw, frequency, State);
+ UpdateLateLines(Slot->effect.Reverb.Gain, Slot->effect.Reverb.LateReverbGain,
+ x, Slot->effect.Reverb.Density, Slot->effect.Reverb.DecayTime,
+ Slot->effect.Reverb.Diffusion, hfRatio, cw, frequency, State);
if(isEAX)
{
// Update the echo line.
- UpdateEchoLine(Slot->effect.Params.Reverb.Gain, Slot->effect.Params.Reverb.LateReverbGain,
- Slot->effect.Params.Reverb.EchoTime, Slot->effect.Params.Reverb.DecayTime,
- Slot->effect.Params.Reverb.Diffusion, Slot->effect.Params.Reverb.EchoDepth,
+ UpdateEchoLine(Slot->effect.Reverb.Gain, Slot->effect.Reverb.LateReverbGain,
+ Slot->effect.Reverb.EchoTime, Slot->effect.Reverb.DecayTime,
+ Slot->effect.Reverb.Diffusion, Slot->effect.Reverb.EchoDepth,
hfRatio, cw, frequency, State);
// Update early and late 3D panning.
- Update3DPanning(Context->Device, Slot->effect.Params.Reverb.ReflectionsPan,
- Slot->effect.Params.Reverb.LateReverbPan, Slot->Gain, State);
+ Update3DPanning(Context->Device, Slot->effect.Reverb.ReflectionsPan,
+ Slot->effect.Reverb.LateReverbPan, Slot->Gain, State);
}
else
{