diff options
author | Johannes Schickel | 2008-05-24 23:58:22 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-24 23:58:22 +0000 |
commit | ff573ec1e214c233a530a96798c0b33738bd8467 (patch) | |
tree | c7aeaa7c88e5933af7e8c516c2a9256621c99ca1 /sound | |
parent | cff8ccccc92e28e6ffe861dafd55b007cc164be8 (diff) | |
download | scummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.tar.gz scummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.tar.bz2 scummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.zip |
Instead of simply returning 0 for "infinite" looping in FLAC and OGG/Vorbis streams in getTotalPlayTime return kUnknownPlayTime.
svn-id: r32265
Diffstat (limited to 'sound')
-rw-r--r-- | sound/flac.cpp | 3 | ||||
-rw-r--r-- | sound/vorbis.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sound/flac.cpp b/sound/flac.cpp index 7b424c1d76..acd0a9fef7 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -143,6 +143,9 @@ public: } int32 getTotalPlayTime() const { + if (!_totalNumLoops) + return AudioStream::kUnknownPlayTime; + int32 samples = 0; if (!_lastSample) { diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index 8c12acc6e9..64f67d2a13 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -120,6 +120,9 @@ public: int getRate() const { return _rate; } int32 getTotalPlayTime() const { + if (!_totalNumLoops) + return AudioStream::kUnknownPlayTime; + #ifdef USE_TREMOR return (_endTime - _startTime) * _totalNumLoops; #else |