From 86653687d7369a46ac25ef4a3cd513b401807c67 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 22 Mar 2010 15:54:56 +0000 Subject: Fix for bug #2969211 "NIPPON: Crash in Intro". It is not a good idea to supply an SubLoopingAudioStream with the start and end time to be exactly the same time. Clarify that in the SubLoopingAudioStream documentation, add an assert in the SubLoopingAudioStream constructor for that case and also prevent make8SVXStream from doing so. svn-id: r48356 --- sound/audiostream.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/audiostream.cpp') diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 1d81eba608..ce2c521e5e 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -169,6 +169,8 @@ SubLoopingAudioStream::SubLoopingAudioStream(SeekableAudioStream *stream, _loopStart(convertTimeToStreamPos(loopStart, getRate(), isStereo())), _loopEnd(convertTimeToStreamPos(loopEnd, getRate(), isStereo())), _done(false) { + assert(loopStart < loopEnd); + if (!_parent->rewind()) _done = true; } -- cgit v1.2.3