aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-05 02:42:55 +0000
committerJohannes Schickel2010-01-05 02:42:55 +0000
commit5b9f267e71e634670cfbcdc92eab164d145e68cf (patch)
tree53c5efa40587cf377720ee9989a92a70ba1c7227
parent2ef2064f44764e53b7317265dad471f5ee160300 (diff)
downloadscummvm-rg350-5b9f267e71e634670cfbcdc92eab164d145e68cf.tar.gz
scummvm-rg350-5b9f267e71e634670cfbcdc92eab164d145e68cf.tar.bz2
scummvm-rg350-5b9f267e71e634670cfbcdc92eab164d145e68cf.zip
Use the return value of RateConverter::flow to calculate the decoded samples and not the upper bound "len". (This should only be a difference when the audio stream has no more samples left)
svn-id: r47015
-rw-r--r--sound/mixer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 7abf09ad97..d012ca6f51 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -442,9 +442,7 @@ void Channel::mix(int16 *data, uint len) {
_mixerTimeStamp = g_system->getMillis();
_pauseTime = 0;
- _converter->flow(*_input, data, len, vol_l, vol_r);
-
- _samplesDecoded += len;
+ _samplesDecoded += _converter->flow(*_input, data, len, vol_l, vol_r);
}
}