diff options
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 |