diff options
author | Chris Robinson <[email protected]> | 2011-08-16 18:40:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-16 18:40:21 -0700 |
commit | 9f5bf5f9307e86c28ff19a61d422c7b2fe389fdc (patch) | |
tree | af769fafe6bdb9a8f470862a1b8b4ab01cbbf4ea /Alc | |
parent | 04dad28228a694e681d722826615245466a3aa16 (diff) |
Rename minF/maxF/clampF to minf/maxf/clampf for consistency
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 20 | ||||
-rw-r--r-- | Alc/alcReverb.c | 4 | ||||
-rw-r--r-- | Alc/hrtf.c | 8 |
3 files changed, 16 insertions, 16 deletions
@@ -180,7 +180,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } /* Calculate gains */ - DryGain = clampF(SourceVolume, MinVolume, MaxVolume); + DryGain = clampf(SourceVolume, MinVolume, MaxVolume); DryGainHF = 1.0f; switch(ALSource->DirectFilter.type) { @@ -191,7 +191,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } for(i = 0;i < NumSends;i++) { - WetGain[i] = clampF(SourceVolume, MinVolume, MaxVolume); + WetGain[i] = clampf(SourceVolume, MinVolume, MaxVolume); WetGainHF[i] = 1.0f; switch(ALSource->Send[i].WetFilter.type) { @@ -497,7 +497,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALContext->DistanceModel) { case InverseDistanceClamped: - ClampedDist = clampF(ClampedDist, MinDist, MaxDist); + ClampedDist = clampf(ClampedDist, MinDist, MaxDist); if(MaxDist < MinDist) break; //fall-through @@ -515,7 +515,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) break; case LinearDistanceClamped: - ClampedDist = clampF(ClampedDist, MinDist, MaxDist); + ClampedDist = clampf(ClampedDist, MinDist, MaxDist); if(MaxDist < MinDist) break; //fall-through @@ -523,17 +523,17 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) if(MaxDist != MinDist) { Attenuation = 1.0f - (Rolloff*(ClampedDist-MinDist)/(MaxDist - MinDist)); - Attenuation = maxF(Attenuation, 0.0f); + Attenuation = maxf(Attenuation, 0.0f); for(i = 0;i < NumSends;i++) { RoomAttenuation[i] = 1.0f - (RoomRolloff[i]*(ClampedDist-MinDist)/(MaxDist - MinDist)); - RoomAttenuation[i] = maxF(RoomAttenuation[i], 0.0f); + RoomAttenuation[i] = maxf(RoomAttenuation[i], 0.0f); } } break; case ExponentDistanceClamped: - ClampedDist = clampF(ClampedDist, MinDist, MaxDist); + ClampedDist = clampf(ClampedDist, MinDist, MaxDist); if(MaxDist < MinDist) break; //fall-through @@ -601,9 +601,9 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } // Clamp to Min/Max Gain - DryGain = clampF(DryGain, MinVolume, MaxVolume); + DryGain = clampf(DryGain, MinVolume, MaxVolume); for(i = 0;i < NumSends;i++) - WetGain[i] = clampF(WetGain[i], MinVolume, MaxVolume); + WetGain[i] = clampf(WetGain[i], MinVolume, MaxVolume); // Apply filter gains and filters switch(ALSource->DirectFilter.type) @@ -761,7 +761,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALfloat length; ALint pos; - length = maxF(Distance, MinDist); + length = maxf(Distance, MinDist); if(length > 0.0f) { ALfloat invlen = 1.0f/length; diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index e4fb4ebf..d4e5d318 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -391,7 +391,7 @@ static ALfloat CalcLimitedHfRatio(ALfloat hfRatio, ALfloat airAbsorptionGainHF, /* Using the limit calculated above, apply the upper bound to the HF * ratio. Also need to limit the result to a minimum of 0.1, just like the * HF ratio parameter. */ - return clampF(limitRatio, 0.1f, hfRatio); + return clampf(limitRatio, 0.1f, hfRatio); } // Calculate the coefficient for a HF (and eventually LF) decay damping @@ -415,7 +415,7 @@ static __inline ALfloat CalcDampingCoeff(ALfloat hfRatio, ALfloat length, ALfloa // Very low decay times will produce minimal output, so apply an // upper bound to the coefficient. - coeff = minF(coeff, 0.98f); + coeff = minf(coeff, 0.98f); } return coeff; } @@ -89,8 +89,8 @@ ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], ALfloat gainChange, angleChange; // Calculate the normalized dB gain change. - newGain = maxF(newGain, 0.0001f); - oldGain = maxF(oldGain, 0.0001f); + newGain = maxf(newGain, 0.0001f); + oldGain = maxf(oldGain, 0.0001f); gainChange = aluFabs(log10(newGain / oldGain) / log10(0.0001f)); // Calculate the normalized listener to source angle change when there is @@ -109,7 +109,7 @@ ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], // Use the largest of the two changes for the delta factor, and apply a // significance shaping function to it. - return clampF(angleChange*2.0f, gainChange*2.0f, 1.0f); + return clampf(angleChange*2.0f, gainChange*2.0f, 1.0f); } // Calculates static HRIR coefficients and delays for the given polar @@ -223,7 +223,7 @@ ALuint GetMovingHrtfCoeffs(ALfloat elevation, ALfloat azimuth, ALfloat gain, ALf ridx[3] = evOffset[evidx[1]] + ((azCount[evidx[1]]-azidx[1]) % azCount[evidx[1]]); // Calculate the stepping parameters. - delta = maxF(floor(delta*(Hrtf.sampleRate*0.015f) + 0.5), 1.0f); + delta = maxf(floor(delta*(Hrtf.sampleRate*0.015f) + 0.5), 1.0f); step = 1.0f / delta; // Calculate the normalized and attenuated target HRIR coefficients using |