diff options
author | Johannes Schickel | 2008-05-24 23:39:13 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-24 23:39:13 +0000 |
commit | aba5082d192f04db6d23804a766dddbdcf98fa2d (patch) | |
tree | d37bd15aeb1ca6d44b1b0f9f01c4f7f03bbd9d48 /sound/vorbis.cpp | |
parent | 64910f8c5fb3a9e39e356fc2856d311d8ad77bd6 (diff) | |
download | scummvm-rg350-aba5082d192f04db6d23804a766dddbdcf98fa2d.tar.gz scummvm-rg350-aba5082d192f04db6d23804a766dddbdcf98fa2d.tar.bz2 scummvm-rg350-aba5082d192f04db6d23804a766dddbdcf98fa2d.zip |
Implementation of AudioStream::getTotalPlayTime for FLAC and OGG/Vorbis streams.
svn-id: r32263
Diffstat (limited to 'sound/vorbis.cpp')
-rw-r--r-- | sound/vorbis.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index a4b0f854e9..971207b0be 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -118,6 +118,14 @@ public: bool isStereo() const { return _isStereo; } int getRate() const { return _rate; } + int32 getTotalPlayTime() const { +#ifdef USE_TREMOR + return _endTime - _startTime; +#else + return (int32)((_endTime - _startTime) * 1000.0); +#endif + } + protected: void refill(); }; |