diff options
author | Chris Robinson <[email protected]> | 2015-09-30 17:25:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-30 17:25:28 -0700 |
commit | 904cdfda32d11f5c3376a20363051b98bc1d3033 (patch) | |
tree | b9e8fad9fd46d56af2336ce43ad4539d3185bf41 /Alc/mixer_c.c | |
parent | b68fbe3628cc1d27507a20e118e52fdd67b8fac4 (diff) |
Avoid double-checks for the stepping mixer loops
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r-- | Alc/mixer_c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index 59ee5ebf..0d3e99a6 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -122,7 +122,8 @@ void Mix_C(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[B step = Gains[c].Step; if(step != 0.0f && Counter > 0) { - for(;pos < BufferSize && pos < Counter;pos++) + ALuint minsize = minu(BufferSize, Counter); + for(;pos < minsize;pos++) { OutBuffer[c][OutPos+pos] += data[pos]*gain; gain += step; |