Patch #878883: Fix for Ogg Vorbis playback

svn-id: r12503
This commit is contained in:
Max Horn 2004-01-18 20:57:45 +00:00
parent c5f9a566da
commit aa0ad9b491

View File

@ -229,7 +229,7 @@ inline bool VorbisInputStream::eosIntern() const {
int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
int samples = 0;
while (samples < numSamples && !eosIntern()) {
const int len = MIN(numSamples, samples + (int)(_bufferEnd - _pos));
const int len = MIN(numSamples - samples, (int)(_bufferEnd - _pos));
memcpy(buffer, _pos, len * 2);
buffer += len;
_pos += len;