diff options
author | Johannes Schickel | 2010-01-17 23:10:38 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-17 23:10:38 +0000 |
commit | 9593b72483a6646fbdbac4a1df961374a922bae8 (patch) | |
tree | 645c0a5d2c184cbfd6e6f1c043a7fdd0ab36d31a /sound | |
parent | 9458b8a81ddd753e0deb79c6c6e1253d58261d3f (diff) | |
download | scummvm-rg350-9593b72483a6646fbdbac4a1df961374a922bae8.tar.gz scummvm-rg350-9593b72483a6646fbdbac4a1df961374a922bae8.tar.bz2 scummvm-rg350-9593b72483a6646fbdbac4a1df961374a922bae8.zip |
Fix SubSeekableAudioStream for stereo streams.
svn-id: r47352
Diffstat (limited to 'sound')
-rw-r--r-- | sound/audiostream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index eff5278e1c..d4e98b4885 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -222,8 +222,9 @@ SubSeekableAudioStream::SubSeekableAudioStream(SeekableAudioStream *parent, cons : _parent(parent), _disposeAfterUse(disposeAfterUse), _start(start.convertToFramerate(getRate())), _pos(0, getRate() * (isStereo() ? 2 : 1)), - _length((end - start).convertToFramerate(getRate())) { + _length((end - start).convertToFramerate(getRate() * (isStereo() ? 2 : 1))) { + assert(_length.totalNumberOfFrames() % (isStereo() ? 2 : 1) == 0); _parent->seek(_start); } |