diff options
Diffstat (limited to 'alc/mixer/mixer_neon.cpp')
-rw-r--r-- | alc/mixer/mixer_neon.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp index e44a3dbe..055715f3 100644 --- a/alc/mixer/mixer_neon.cpp +++ b/alc/mixer/mixer_neon.cpp @@ -45,8 +45,8 @@ inline void ApplyCoeffs(float2 *RESTRICT Values, const ALuint IrSize, const Hrir } // namespace template<> -const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState*, const ALfloat *RESTRICT src, - ALuint frac, ALuint increment, const al::span<float> dst) +const float *Resample_<LerpTag,NEONTag>(const InterpState*, const float *RESTRICT src, ALuint frac, + ALuint increment, const al::span<float> dst) { const int32x4_t increment4 = vdupq_n_s32(static_cast<int>(increment*4)); const float32x4_t fracOne4 = vdupq_n_f32(1.0f/FRACTIONONE); @@ -95,11 +95,11 @@ const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState*, const ALfloat *RES frac &= FRACTIONMASK; } while(dst_iter != dst.end()); } - return dst.begin(); + return dst.data(); } template<> -const ALfloat *Resample_<BSincTag,NEONTag>(const InterpState *state, const ALfloat *RESTRICT src, +const float *Resample_<BSincTag,NEONTag>(const InterpState *state, const float *RESTRICT src, ALuint frac, ALuint increment, const al::span<float> dst) { const float *const filter{state->bsinc.filter}; @@ -142,12 +142,12 @@ const ALfloat *Resample_<BSincTag,NEONTag>(const InterpState *state, const ALflo src += frac>>FRACTIONBITS; frac &= FRACTIONMASK; } - return dst.begin(); + return dst.data(); } template<> -const ALfloat *Resample_<FastBSincTag,NEONTag>(const InterpState *state, - const ALfloat *RESTRICT src, ALuint frac, ALuint increment, const al::span<float> dst) +const float *Resample_<FastBSincTag,NEONTag>(const InterpState *state, + const float *RESTRICT src, ALuint frac, ALuint increment, const al::span<float> dst) { const float *const filter{state->bsinc.filter}; const size_t m{state->bsinc.m}; @@ -184,7 +184,7 @@ const ALfloat *Resample_<FastBSincTag,NEONTag>(const InterpState *state, src += frac>>FRACTIONBITS; frac &= FRACTIONMASK; } - return dst.begin(); + return dst.data(); } @@ -212,24 +212,24 @@ template<> void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBufferLine> OutBuffer, float *CurrentGains, const float *TargetGains, const size_t Counter, const size_t OutPos) { - const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f}; + const float delta{(Counter > 0) ? 1.0f / static_cast<float>(Counter) : 0.0f}; const bool reached_target{InSamples.size() >= Counter}; const auto min_end = reached_target ? InSamples.begin() + Counter : InSamples.end(); const auto aligned_end = minz(static_cast<uintptr_t>(min_end-InSamples.begin()+3) & ~3u, InSamples.size()) + InSamples.begin(); for(FloatBufferLine &output : OutBuffer) { - ALfloat *RESTRICT dst{al::assume_aligned<16>(output.data()+OutPos)}; - ALfloat gain{*CurrentGains}; - const ALfloat diff{*TargetGains - gain}; + float *RESTRICT dst{al::assume_aligned<16>(output.data()+OutPos)}; + float gain{*CurrentGains}; + const float diff{*TargetGains - gain}; auto in_iter = InSamples.begin(); if(!(std::fabs(diff) > std::numeric_limits<float>::epsilon())) gain = *TargetGains; else { - const ALfloat step{diff * delta}; - ALfloat step_count{0.0f}; + const float step{diff * delta}; + float step_count{0.0f}; /* Mix with applying gain steps in aligned multiples of 4. */ if(ptrdiff_t todo{(min_end-in_iter) >> 2}) { @@ -296,9 +296,9 @@ template<> void MixRow_<NEONTag>(const al::span<float> OutBuffer, const al::span<const float> Gains, const float *InSamples, const size_t InStride) { - for(const ALfloat gain : Gains) + for(const float gain : Gains) { - const ALfloat *RESTRICT input{InSamples}; + const float *RESTRICT input{InSamples}; InSamples += InStride; if(!(std::fabs(gain) > GAIN_SILENCE_THRESHOLD)) |