diff options
author | Johannes Schickel | 2010-01-05 20:13:31 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-05 20:13:31 +0000 |
commit | e9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6 (patch) | |
tree | 860360b7d34f7742c066537a6270a681b44ca751 /sound/vorbis.cpp | |
parent | 1712e223e2e520320a5ef4edfc8ad36cd82cc4a1 (diff) | |
download | scummvm-rg350-e9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6.tar.gz scummvm-rg350-e9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6.tar.bz2 scummvm-rg350-e9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6.zip |
Add a "getLength" function to SeekableAudioStream.
svn-id: r47036
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 eced67726a..a130ecc5ec 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -139,6 +139,14 @@ public: } bool seek(const Timestamp &where); + // TODO: Maybe we can have a more precise implementation of this + Timestamp getLength() const { +#ifdef USE_TREMOR + return Timestamp(_endTime, getRate()); +#else + return Timestamp((uint32)(_endTime * 1000.0), getRate()); +#endif + } protected: bool refill(); |