aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer/mixer_c.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_c.c
parent150586d7fef722da17b96697ca0c1f78b2d10eb4 (diff)
Add some ASSUME statements that ensure mixing at least 1 sample
Diffstat (limited to 'Alc/mixer/mixer_c.c')
-rw-r--r--Alc/mixer/mixer_c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Alc/mixer/mixer_c.c b/Alc/mixer/mixer_c.c
index ee667671..2ec108d7 100644
--- a/Alc/mixer/mixer_c.c
+++ b/Alc/mixer/mixer_c.c
@@ -123,6 +123,7 @@ void Mix_C(const ALfloat *data, ALsizei OutChans, ALfloat (*restrict OutBuffer)[
ALfloat gain, delta, step;
ALsizei c;
+ ASSUME(BufferSize > 0);
delta = (Counter > 0) ? 1.0f/(ALfloat)Counter : 0.0f;
for(c = 0;c < OutChans;c++)
@@ -160,6 +161,8 @@ void MixRow_C(ALfloat *OutBuffer, const ALfloat *Gains, const ALfloat (*restrict
{
ALsizei c, i;
+ ASSUME(BufferSize > 0);
+
for(c = 0;c < InChans;c++)
{
ALfloat gain = Gains[c];