aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_sse3.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-10-25 14:07:58 -0700
committerChris Robinson <[email protected]>2015-10-25 14:07:58 -0700
commit90349b384fe538b0d160b5ff0485d6235b1c6f9d (patch)
tree1acef7723db132f28b3f3c4b36f5616e35ff0485 /Alc/mixer_sse3.c
parentfc03a955e9dd58e11cb3f165423e1629d5f07935 (diff)
Use the correct position in the SSE resamplers for left-over processing
Diffstat (limited to 'Alc/mixer_sse3.c')
-rw-r--r--Alc/mixer_sse3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Alc/mixer_sse3.c b/Alc/mixer_sse3.c
index acb0338a..b673315b 100644
--- a/Alc/mixer_sse3.c
+++ b/Alc/mixer_sse3.c
@@ -78,8 +78,11 @@ const ALfloat *Resample_fir4_32_SSE3(const ALfloat *src, ALuint frac, ALuint inc
_mm_store_ps(frac_.f, _mm_castsi128_ps(frac4));
}
- pos = pos_.i[3];
- frac = frac_.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 = frac_.i[0];
for(;i < numsamples;i++)
{
@@ -143,8 +146,8 @@ const ALfloat *Resample_fir8_32_SSE3(const ALfloat *src, ALuint frac, ALuint inc
_mm_store_ps(frac_.f, _mm_castsi128_ps(frac4));
}
- pos = pos_.i[3];
- frac = frac_.i[3];
+ pos = pos_.i[0];
+ frac = frac_.i[0];
for(;i < numsamples;i++)
{