Fix for a stupid typo in yesterdays sound fill tweak.

This fixes bug 1743016. Thanks to erictorbjorn and md5 for pointing me at it.

svn-id: r27718
This commit is contained in:
Robin Watts 2007-06-25 21:09:08 +00:00
parent 2c3cbf444a
commit b53cebe62d

View file

@ -158,7 +158,7 @@ template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
int LinearMemoryStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, const int numSamples) { int LinearMemoryStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, const int numSamples) {
int samples = numSamples; int samples = numSamples;
while (samples > 0 && _ptr < _end) { while (samples > 0 && _ptr < _end) {
int len = MIN(numSamples, (int)(_end - _ptr) / (is16Bit ? 2 : 1)); int len = MIN(samples, (int)(_end - _ptr) / (is16Bit ? 2 : 1));
samples -= len; samples -= len;
do { do {
*buffer++ = READ_ENDIAN_SAMPLE(is16Bit, isUnsigned, _ptr, isLE); *buffer++ = READ_ENDIAN_SAMPLE(is16Bit, isUnsigned, _ptr, isLE);