[Scummvm-cvs-logs] scummvm master -> 87c81566b429693d96ef7da7196d5503c33cde91
lordhoto
lordhoto at gmail.com
Sun Feb 13 22:12:16 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
87c81566b4 AUDIO: Fix assertion triggered by SubSeekableAudioStream constructor.
Commit: 87c81566b429693d96ef7da7196d5503c33cde91
https://github.com/scummvm/scummvm/commit/87c81566b429693d96ef7da7196d5503c33cde91
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-02-13T13:07:34-08:00
Commit Message:
AUDIO: Fix assertion triggered by SubSeekableAudioStream constructor.
This assertion was introduced with 633b8ed27784. I change the code to first
convert all parameters to the audio stream's framerate to avoid a possible use
of operator- on two AudioTimestamps with different framerates.
Changed paths:
audio/audiostream.cpp
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 46b2846..0c41a38 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -228,8 +228,8 @@ int SubLoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
SubSeekableAudioStream::SubSeekableAudioStream(SeekableAudioStream *parent, const Timestamp start, const Timestamp end, DisposeAfterUse::Flag disposeAfterUse)
: _parent(parent), _disposeAfterUse(disposeAfterUse),
_start(convertTimeToStreamPos(start, getRate(), isStereo())),
- _pos(0, getRate() * (isStereo() ? 2 : 1)),
- _length(convertTimeToStreamPos(end - start, getRate(), isStereo())) {
+ _pos(0, getRate() * (isStereo() ? 2 : 1)),
+ _length(convertTimeToStreamPos(end, getRate(), isStereo()) - _start) {
assert(_length.totalNumberOfFrames() % (isStereo() ? 2 : 1) == 0);
_parent->seek(_start);
More information about the Scummvm-git-logs
mailing list