aboutsummaryrefslogtreecommitdiff
path: root/sound/vorbis.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-01 16:57:23 +0000
committerJohannes Schickel2010-01-01 16:57:23 +0000
commitbba2c8ce952b5242e3ff80054f1ac9cc48bcd097 (patch)
tree3a62d52c8ea2d92d7eefb9ed7e0a3698b4685f2b /sound/vorbis.cpp
parent54d9bf4c57d265dd0d0539ed5eb0bfe324427ea7 (diff)
downloadscummvm-rg350-bba2c8ce952b5242e3ff80054f1ac9cc48bcd097.tar.gz
scummvm-rg350-bba2c8ce952b5242e3ff80054f1ac9cc48bcd097.tar.bz2
scummvm-rg350-bba2c8ce952b5242e3ff80054f1ac9cc48bcd097.zip
Fix getTotalPlayTime for MP3, FLAC, Vorbis and LinearMemoryStream after the latest loop related changes.
svn-id: r46838
Diffstat (limited to 'sound/vorbis.cpp')
-rw-r--r--sound/vorbis.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 1d265e6025..c80bc700fb 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -92,7 +92,6 @@ protected:
bool _isStereo;
int _rate;
- const uint _totalNumLoops;
uint _numLoops; ///< Number of loops to play
uint _numPlayedLoops; ///< Number of loops which have been played
@@ -126,13 +125,13 @@ public:
uint getNumPlayedLoops() { return _numPlayedLoops; }
int32 getTotalPlayTime() const {
- if (!_totalNumLoops)
+ if (!_numLoops)
return AudioStream::kUnknownPlayTime;
#ifdef USE_TREMOR
- return (_endTime - _startTime) * _totalNumLoops;
+ return (_endTime - _startTime) * _numLoops;
#else
- return (int32)((_endTime - _startTime) * 1000.0) * _totalNumLoops;
+ return (int32)((_endTime - _startTime) * 1000.0) * _numLoops;
#endif
}
@@ -144,7 +143,6 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool
_inStream(inStream),
_disposeAfterUse(dispose),
_numLoops(numLoops),
- _totalNumLoops(numLoops),
_bufferEnd(_buffer + ARRAYSIZE(_buffer)) {
int res = ov_open_callbacks(inStream, &_ovFile, NULL, 0, g_stream_wrap);