From f96a8fe369e317a6203bec5e814761fe8a12531e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 18 Apr 2018 20:39:52 -0700 Subject: Add some ASSUME statements that ensure mixing at least 1 sample --- Alc/mixer/mixer_sse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Alc/mixer/mixer_sse.c') 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; -- cgit v1.2.3