aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-02-09 22:03:02 +0000
committerJohannes Schickel2010-02-09 22:03:02 +0000
commite7d6d44e86168f9479b358019a849074e45e3b73 (patch)
treec9f7e8d638ee43dcb0309115b60921b6823aeaad
parentb097e8635cebca42953cb7e98edf1492641bf3e6 (diff)
downloadscummvm-rg350-e7d6d44e86168f9479b358019a849074e45e3b73.tar.gz
scummvm-rg350-e7d6d44e86168f9479b358019a849074e45e3b73.tar.bz2
scummvm-rg350-e7d6d44e86168f9479b358019a849074e45e3b73.zip
Be a bit more forgiveful in case the SeekableAudioStream passed to SubLoopingAudioStream does not allow reading the requested sample count at once (i.e. do not tread that as error, unless endOfData() is set).
svn-id: r48022
-rw-r--r--sound/audiostream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index 483be27757..7501f4f671 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -187,7 +187,7 @@ int SubLoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
int framesRead = _parent->readBuffer(buffer, framesLeft);
_pos = _pos.addFrames(framesRead);
- if (framesRead < framesLeft) {
+ if (framesRead < framesLeft && _parent->endOfData()) {
// TODO: Proper error indication.
_done = true;
return framesRead;