diff options
author | Chris Robinson <[email protected]> | 2019-09-14 16:55:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-14 18:35:23 -0700 |
commit | 2c348cecb68bd3a71d388547d6b3330f9cebbfad (patch) | |
tree | 445e6387a7356da79c93db166ca8da057a0a0cfc /alc/mixer/mixer_sse.cpp | |
parent | 1c45b1791b784fb9b70e8c6ce8a1ea158e9004ff (diff) |
Fix some more implicit conversions noted by GCC
Diffstat (limited to 'alc/mixer/mixer_sse.cpp')
-rw-r--r-- | alc/mixer/mixer_sse.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp index 368b8dfe..65eb0dee 100644 --- a/alc/mixer/mixer_sse.cpp +++ b/alc/mixer/mixer_sse.cpp @@ -29,7 +29,8 @@ const ALfloat *Resample_<BSincTag,SSETag>(const InterpState *state, const ALfloa // Calculate the phase index and factor. #define FRAC_PHASE_BITDIFF (FRACTIONBITS-BSINC_PHASE_BITS) const ALuint pi{frac >> FRAC_PHASE_BITDIFF}; - const ALfloat pf{(frac & ((1<<FRAC_PHASE_BITDIFF)-1)) * (1.0f/(1<<FRAC_PHASE_BITDIFF))}; + const ALfloat pf{static_cast<float>(frac & ((1<<FRAC_PHASE_BITDIFF)-1)) * + (1.0f/(1<<FRAC_PHASE_BITDIFF))}; #undef FRAC_PHASE_BITDIFF // Apply the scale and phase interpolated filter. @@ -145,8 +146,8 @@ void Mix_<SSETag>(const al::span<const float> InSamples, const al::span<FloatBuf const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(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(InSamples.size(), (min_end-InSamples.begin()+3) & ~3u) + - InSamples.begin(); + 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)}; |