diff options
author | Chris Robinson <[email protected]> | 2012-01-26 22:33:36 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-01-26 22:33:36 -0800 |
commit | dd3abd0f164dd3d27d3eb641370fae27f52960b7 (patch) | |
tree | 7807e35be934e037c0ec84a161867e8a9059af85 | |
parent | 3fda804217aff2ed3a4437013425f3fab7628e6a (diff) |
Use sizeof(ALfloat) when finding the max stepping value
The mixer always reads from floats, so the size of the storage type is
unimportant.
-rw-r--r-- | Alc/ALu.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -138,8 +138,8 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - ALint maxstep = STACK_DATA_SIZE / ALSource->NumChannels / - ALSource->SampleSize; + ALsizei maxstep = STACK_DATA_SIZE/sizeof(ALfloat) / + ALSource->NumChannels; maxstep -= ResamplerPadding[Resampler] + ResamplerPrePadding[Resampler] + 1; maxstep = mini(maxstep, INT_MAX>>FRACTIONBITS); @@ -643,8 +643,8 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - ALint maxstep = STACK_DATA_SIZE / ALSource->NumChannels / - ALSource->SampleSize; + ALsizei maxstep = STACK_DATA_SIZE/sizeof(ALfloat) / + ALSource->NumChannels; maxstep -= ResamplerPadding[Resampler] + ResamplerPrePadding[Resampler] + 1; maxstep = mini(maxstep, INT_MAX>>FRACTIONBITS); |