From 5b9f267e71e634670cfbcdc92eab164d145e68cf Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 5 Jan 2010 02:42:55 +0000 Subject: 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 --- sound/mixer.cpp | 4 +--- 1 file changed, 1 insertion(+), 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); } } -- cgit v1.2.3