diff options
author | Chris Robinson <[email protected]> | 2018-04-18 20:39:52 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-04-18 20:39:52 -0700 |
commit | f96a8fe369e317a6203bec5e814761fe8a12531e (patch) | |
tree | 240fae4a5a1072e3721e6976058bc50d1a766c9f /Alc/mixer/mixer_sse.c | |
parent | 150586d7fef722da17b96697ca0c1f78b2d10eb4 (diff) |
Add some ASSUME statements that ensure mixing at least 1 sample
Diffstat (limited to 'Alc/mixer/mixer_sse.c')
-rw-r--r-- | Alc/mixer/mixer_sse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/mixer/mixer_sse.c b/Alc/mixer/mixer_sse.c index 5c181c75..c4852ca5 100644 --- a/Alc/mixer/mixer_sse.c +++ b/Alc/mixer/mixer_sse.c @@ -25,6 +25,7 @@ const ALfloat *Resample_bsinc_SSE(const InterpState *state, const ALfloat *restr __m128 r4; ASSUME(m > 0); + ASSUME(dstlen > 0); src += state->bsinc.l; for(i = 0;i < dstlen;i++) @@ -139,6 +140,7 @@ void Mix_SSE(const ALfloat *data, ALsizei OutChans, ALfloat (*restrict OutBuffer __m128 gain4; ALsizei c; + ASSUME(BufferSize > 0); delta = (Counter > 0) ? 1.0f/(ALfloat)Counter : 0.0f; for(c = 0;c < OutChans;c++) @@ -210,6 +212,8 @@ void MixRow_SSE(ALfloat *OutBuffer, const ALfloat *Gains, const ALfloat (*restri __m128 gain4; ALsizei c; + ASSUME(BufferSize > 0); + for(c = 0;c < InChans;c++) { ALsizei pos = 0; |