aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixer/mixer_sse.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-31 15:49:34 -0700
committerChris Robinson <[email protected]>2019-08-31 15:49:34 -0700
commit3973334a64f0aa428c9cbd06c89cfb60951810c8 (patch)
tree654595d4e772011a218e3405c81a8fe15d070f1b /alc/mixer/mixer_sse.cpp
parenta546343148ad87786b1a199e9ca91ffc50da4e81 (diff)
Store the voice fraction offset as unsigned
Diffstat (limited to 'alc/mixer/mixer_sse.cpp')
-rw-r--r--alc/mixer/mixer_sse.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/alc/mixer/mixer_sse.cpp b/alc/mixer/mixer_sse.cpp
index 8d2abc88..05ebe26f 100644
--- a/alc/mixer/mixer_sse.cpp
+++ b/alc/mixer/mixer_sse.cpp
@@ -15,22 +15,21 @@
template<>
const ALfloat *Resample_<BSincTag,SSETag>(const InterpState *state, const ALfloat *RESTRICT src,
- ALsizei frac, ALint increment, const al::span<float> dst)
+ ALuint frac, ALint increment, const al::span<float> dst)
{
const ALfloat *const filter{state->bsinc.filter};
const __m128 sf4{_mm_set1_ps(state->bsinc.sf)};
- const ALsizei m{state->bsinc.m};
+ const ptrdiff_t m{state->bsinc.m};
ASSUME(m > 0);
ASSUME(increment > 0);
- ASSUME(frac >= 0);
src -= state->bsinc.l;
for(float &out_sample : dst)
{
// Calculate the phase index and factor.
#define FRAC_PHASE_BITDIFF (FRACTIONBITS-BSINC_PHASE_BITS)
- const ALsizei pi{frac >> FRAC_PHASE_BITDIFF};
+ const ALuint pi{frac >> FRAC_PHASE_BITDIFF};
const ALfloat pf{(frac & ((1<<FRAC_PHASE_BITDIFF)-1)) * (1.0f/(1<<FRAC_PHASE_BITDIFF))};
#undef FRAC_PHASE_BITDIFF
@@ -42,7 +41,7 @@ const ALfloat *Resample_<BSincTag,SSETag>(const InterpState *state, const ALfloa
const float *scd{fil + m};
const float *phd{scd + m};
const float *spd{phd + m};
- ALsizei td{m >> 2};
+ ptrdiff_t td{m >> 2};
size_t j{0u};
#define MLA4(x, y, z) _mm_add_ps(x, _mm_mul_ps(y, z))