aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-16 16:00:26 -0700
committerChris Robinson <[email protected]>2020-04-16 16:00:26 -0700
commitcf4a848fd0c42e85e5ce68e33120386d932e6375 (patch)
treebcb4e7dbea7e68bec23c07e20b7ad4c17be003aa /alc
parent3cb12da7657f856ae8acb734d36521eb69777a92 (diff)
Remove an always-true return value
Diffstat (limited to 'alc')
-rw-r--r--alc/effects/reverb.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index b328a790..ac950731 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -516,7 +516,7 @@ struct ReverbState final : public EffectState {
}
}
- bool allocLines(const float frequency);
+ void allocLines(const float frequency);
void updateDelayLine(const float earlyDelay, const float lateDelay, const float density,
const float decayTime, const float frequency);
@@ -549,7 +549,7 @@ inline float CalcDelayLengthMult(float density)
* for all lines given the sample rate (frequency). If an allocation failure
* occurs, it returns AL_FALSE.
*/
-bool ReverbState::allocLines(const float frequency)
+void ReverbState::allocLines(const float frequency)
{
/* All delay line lengths are calculated to accomodate the full range of
* lengths given their respective paramters.
@@ -608,8 +608,6 @@ bool ReverbState::allocLines(const float frequency)
mEarly.Delay.realizeLineOffset(mSampleBuffer.data());
mLate.VecAp.Delay.realizeLineOffset(mSampleBuffer.data());
mLate.Delay.realizeLineOffset(mSampleBuffer.data());
-
- return true;
}
bool ReverbState::deviceUpdate(const ALCdevice *device)
@@ -617,8 +615,7 @@ bool ReverbState::deviceUpdate(const ALCdevice *device)
const auto frequency = static_cast<float>(device->Frequency);
/* Allocate the delay lines. */
- if(!allocLines(frequency))
- return false;
+ allocLines(frequency);
const float multiplier{CalcDelayLengthMult(AL_EAXREVERB_MAX_DENSITY)};
@@ -746,8 +743,8 @@ float CalcLimitedHfRatio(const float hfRatio, const float airAbsorptionGainHF,
* equation, solve for HF ratio. The delay length is cancelled out of
* the equation, so it can be calculated once for all lines.
*/
- float limitRatio{1.0f / CalcDecayLength(airAbsorptionGainHF, decayTime) /
- SPEEDOFSOUNDMETRESPERSEC};
+ float limitRatio{1.0f / SPEEDOFSOUNDMETRESPERSEC /
+ CalcDecayLength(airAbsorptionGainHF, decayTime)};
/* Using the limit calculated above, apply the upper bound to the HF ratio.
*/