aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_sse41.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/mixer_sse41.c')
-rw-r--r--Alc/mixer_sse41.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Alc/mixer_sse41.c b/Alc/mixer_sse41.c
index 4b347d32..59b99b2b 100644
--- a/Alc/mixer_sse41.c
+++ b/Alc/mixer_sse41.c
@@ -67,7 +67,10 @@ const ALfloat *Resample_lerp32_SSE41(const ALfloat *src, ALuint frac, ALuint inc
pos_.i[3] = _mm_extract_epi32(pos4, 3);
}
- pos = pos_.i[3];
+ /* NOTE: These four elements represent the position *after* the last four
+ * samples, so the lowest element is the next position to resample.
+ */
+ pos = pos_.i[0];
frac = _mm_cvtsi128_si32(frac4);
for(;i < numsamples;i++)
@@ -134,8 +137,8 @@ const ALfloat *Resample_fir4_32_SSE41(const ALfloat *src, ALuint frac, ALuint in
frac_.i[3] = _mm_extract_epi32(frac4, 3);
}
- pos = pos_.i[3];
- frac = frac_.i[3];
+ pos = pos_.i[0];
+ frac = frac_.i[0];
for(;i < numsamples;i++)
{
@@ -205,8 +208,8 @@ const ALfloat *Resample_fir8_32_SSE41(const ALfloat *src, ALuint frac, ALuint in
frac_.i[3] = _mm_extract_epi32(frac4, 3);
}
- pos = pos_.i[3];
- frac = frac_.i[3];
+ pos = pos_.i[0];
+ frac = frac_.i[0];
for(;i < numsamples;i++)
{