aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer/hrtfbase.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-02 17:07:23 -0700
committerChris Robinson <[email protected]>2019-10-02 17:07:23 -0700
commit50198ee30c86f566f538e2ffd763caaaba1c45d4 (patch)
treed5738736e4e40278eb2e065301c603979d002939 /alc/mixer/hrtfbase.h
parent64e2c377d865d67efdac675c355e7b1a6b4166e6 (diff)
Clean up some ALfloat -> float
Diffstat (limited to 'alc/mixer/hrtfbase.h')
-rw-r--r--alc/mixer/hrtfbase.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/alc/mixer/hrtfbase.h b/alc/mixer/hrtfbase.h
index af45a128..58d168ed 100644
--- a/alc/mixer/hrtfbase.h
+++ b/alc/mixer/hrtfbase.h
@@ -10,29 +10,29 @@
using ApplyCoeffsT = void(size_t Offset, float2 *RESTRICT Values, const ALuint irSize,
- const HrirArray &Coeffs, const ALfloat left, const ALfloat right);
+ const HrirArray &Coeffs, const float left, const float right);
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
+ const float *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
const ALuint IrSize, MixHrtfFilter *hrtfparams, const size_t BufferSize)
{
ASSUME(BufferSize > 0);
const HrirArray &Coeffs = *hrtfparams->Coeffs;
- const ALfloat gainstep{hrtfparams->GainStep};
- const ALfloat gain{hrtfparams->Gain};
+ const float gainstep{hrtfparams->GainStep};
+ const float gain{hrtfparams->Gain};
ALsizei Delay[2]{
HRTF_HISTORY_LENGTH - hrtfparams->Delay[0],
HRTF_HISTORY_LENGTH - hrtfparams->Delay[1] };
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
- ALfloat stepcount{0.0f};
+ float stepcount{0.0f};
for(size_t i{0u};i < BufferSize;++i)
{
- const ALfloat g{gain + gainstep*stepcount};
- const ALfloat left{InSamples[Delay[0]++] * g};
- const ALfloat right{InSamples[Delay[1]++] * g};
+ const float g{gain + gainstep*stepcount};
+ const float left{InSamples[Delay[0]++] * g};
+ const float right{InSamples[Delay[1]++] * g};
ApplyCoeffs(i, AccumSamples+i, IrSize, Coeffs, left, right);
stepcount += 1.0f;
@@ -48,15 +48,15 @@ inline void MixHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
template<ApplyCoeffsT &ApplyCoeffs>
inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut,
- const ALfloat *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
+ const float *InSamples, float2 *RESTRICT AccumSamples, const size_t OutPos,
const ALuint IrSize, const HrtfFilter *oldparams, MixHrtfFilter *newparams,
const size_t BufferSize)
{
const auto &OldCoeffs = oldparams->Coeffs;
- const ALfloat oldGain{oldparams->Gain};
- const ALfloat oldGainStep{-oldGain / static_cast<ALfloat>(BufferSize)};
+ const float oldGain{oldparams->Gain};
+ const float oldGainStep{-oldGain / static_cast<float>(BufferSize)};
const auto &NewCoeffs = *newparams->Coeffs;
- const ALfloat newGainStep{newparams->GainStep};
+ const float newGainStep{newparams->GainStep};
ASSUME(BufferSize > 0);
@@ -64,12 +64,12 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
HRTF_HISTORY_LENGTH - oldparams->Delay[0],
HRTF_HISTORY_LENGTH - oldparams->Delay[1] };
ASSUME(Delay[0] >= 0 && Delay[1] >= 0);
- ALfloat stepcount{0.0f};
+ float stepcount{0.0f};
for(size_t i{0u};i < BufferSize;++i)
{
- const ALfloat g{oldGain + oldGainStep*stepcount};
- const ALfloat left{InSamples[Delay[0]++] * g};
- const ALfloat right{InSamples[Delay[1]++] * g};
+ const float g{oldGain + oldGainStep*stepcount};
+ const float left{InSamples[Delay[0]++] * g};
+ const float right{InSamples[Delay[1]++] * g};
ApplyCoeffs(i, AccumSamples+i, IrSize, OldCoeffs, left, right);
stepcount += 1.0f;
@@ -81,9 +81,9 @@ inline void MixHrtfBlendBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOut
stepcount = 0.0f;
for(size_t i{0u};i < BufferSize;++i)
{
- const ALfloat g{newGainStep*stepcount};
- const ALfloat left{InSamples[Delay[0]++] * g};
- const ALfloat right{InSamples[Delay[1]++] * g};
+ const float g{newGainStep*stepcount};
+ const float left{InSamples[Delay[0]++] * g};
+ const float right{InSamples[Delay[1]++] * g};
ApplyCoeffs(i, AccumSamples+i, IrSize, NewCoeffs, left, right);
stepcount += 1.0f;
@@ -115,7 +115,7 @@ inline void MixDirectHrtfBase(FloatBufferLine &LeftOut, FloatBufferLine &RightOu
const auto &Coeffs = *(coeff_iter++);
for(size_t i{0u};i < BufferSize;++i)
{
- const ALfloat insample{input[i]};
+ const float insample{input[i]};
ApplyCoeffs(i, AccumSamples+i, IrSize, Coeffs, insample, insample);
}
}