aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer/mixer_neon.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-04-18 20:39:52 -0700
committerChris Robinson <[email protected]>2018-04-18 20:39:52 -0700
commitf96a8fe369e317a6203bec5e814761fe8a12531e (patch)
tree240fae4a5a1072e3721e6976058bc50d1a766c9f /Alc/mixer/mixer_neon.c
parent150586d7fef722da17b96697ca0c1f78b2d10eb4 (diff)
Add some ASSUME statements that ensure mixing at least 1 sample
Diffstat (limited to 'Alc/mixer/mixer_neon.c')
-rw-r--r--Alc/mixer/mixer_neon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/mixer/mixer_neon.c b/Alc/mixer/mixer_neon.c
index e8a85f71..03468ffe 100644
--- a/Alc/mixer/mixer_neon.c
+++ b/Alc/mixer/mixer_neon.c
@@ -23,6 +23,8 @@ const ALfloat *Resample_lerp_Neon(const InterpState* UNUSED(state),
int32x4_t frac4;
ALsizei i;
+ ASSUME(numsamples > 0);
+
InitiatePositionArrays(frac, increment, frac_, pos_, 4);
frac4 = vld1q_s32(frac_);
@@ -79,6 +81,7 @@ const ALfloat *Resample_bsinc_Neon(const InterpState *state,
ALfloat pf;
ASSUME(m > 0);
+ ASSUME(dstlen > 0);
src += state->bsinc.l;
for(i = 0;i < dstlen;i++)
@@ -167,6 +170,7 @@ void Mix_Neon(const ALfloat *data, ALsizei OutChans, ALfloat (*restrict OutBuffe
float32x4_t gain4;
ALsizei c;
+ ASSUME(BufferSize > 0);
data = ASSUME_ALIGNED(data, 16);
OutBuffer = ASSUME_ALIGNED(OutBuffer, 16);
@@ -239,6 +243,7 @@ void MixRow_Neon(ALfloat *OutBuffer, const ALfloat *Gains, const ALfloat (*restr
float32x4_t gain4;
ALsizei c;
+ ASSUME(BufferSize > 0);
data = ASSUME_ALIGNED(data, 16);
OutBuffer = ASSUME_ALIGNED(OutBuffer, 16);