diff options
Diffstat (limited to 'sound/vorbis.cpp')
-rw-r--r-- | sound/vorbis.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index 971207b0be..8c12acc6e9 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -92,6 +92,7 @@ protected: bool _isStereo; int _rate; uint _numLoops; + const uint _totalNumLoops; #ifdef USE_TREMOR ogg_int64_t _startTime; @@ -120,9 +121,9 @@ public: int32 getTotalPlayTime() const { #ifdef USE_TREMOR - return _endTime - _startTime; + return (_endTime - _startTime) * _totalNumLoops; #else - return (int32)((_endTime - _startTime) * 1000.0); + return (int32)((_endTime - _startTime) * 1000.0) * _totalNumLoops; #endif } @@ -134,6 +135,7 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool _inStream(inStream), _disposeAfterUse(dispose), _numLoops(numLoops), + _totalNumLoops(numLoops), _bufferEnd(_buffer + ARRAYSIZE(_buffer)) { bool err = (ov_open_callbacks(inStream, &_ovFile, NULL, 0, g_stream_wrap) < 0); |