diff options
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; |