mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
parent
c5f9a566da
commit
aa0ad9b491
@ -229,7 +229,7 @@ inline bool VorbisInputStream::eosIntern() const {
|
|||||||
int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
|
int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
|
||||||
int samples = 0;
|
int samples = 0;
|
||||||
while (samples < numSamples && !eosIntern()) {
|
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);
|
memcpy(buffer, _pos, len * 2);
|
||||||
buffer += len;
|
buffer += len;
|
||||||
_pos += len;
|
_pos += len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user