diff options
Diffstat (limited to 'alc/mixer/mixer_neon.cpp')
-rw-r--r-- | alc/mixer/mixer_neon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alc/mixer/mixer_neon.cpp b/alc/mixer/mixer_neon.cpp index 092958b0..9048e30b 100644 --- a/alc/mixer/mixer_neon.cpp +++ b/alc/mixer/mixer_neon.cpp @@ -224,7 +224,9 @@ void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBu const ALfloat diff{*TargetGains - gain}; auto in_iter = InSamples.begin(); - if(std::fabs(diff) > std::numeric_limits<float>::epsilon()) + if(!(std::fabs(diff) > std::numeric_limits<float>::epsilon())) + gain = *TargetGains; + else { const ALfloat step{diff * delta}; ALfloat step_count{0.0f}; @@ -264,12 +266,12 @@ void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBu gain = *TargetGains; else gain += step*step_count; - *CurrentGains = gain; /* Mix until pos is aligned with 4 or the mix is done. */ while(in_iter != aligned_end) *(dst++) += *(in_iter++) * gain; } + *CurrentGains = gain; ++CurrentGains; ++TargetGains; |