diff options
author | Johannes Schickel | 2010-01-07 23:50:18 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-07 23:50:18 +0000 |
commit | a5adbb851a2a16bf7b8edc918be27faf2e46cea9 (patch) | |
tree | 81635f204f3468f71e9a885fae5c3caac8e2d0ce | |
parent | 2aca490e131bad1a2b199d3077f5c2f8ab8c58a8 (diff) | |
download | scummvm-rg350-a5adbb851a2a16bf7b8edc918be27faf2e46cea9.tar.gz scummvm-rg350-a5adbb851a2a16bf7b8edc918be27faf2e46cea9.tar.bz2 scummvm-rg350-a5adbb851a2a16bf7b8edc918be27faf2e46cea9.zip |
Fix use of getRate in VorbisInputStream's constructor. (Thanks to cyx for spotting this)
svn-id: r47144
-rw-r--r-- | sound/vorbis.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index 70201cb23d..ed1ccf1346 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -131,12 +131,6 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool return; } -#ifdef USE_TREMOR - _length = Timestamp(ov_time_total(&_ovFile, -1), getRate()); -#else - _length = Timestamp(uint32(ov_time_total(&_ovFile, -1) * 1000.0), getRate()); -#endif - // Read in initial data if (!refill()) return; @@ -144,6 +138,12 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool // Setup some header information _isStereo = ov_info(&_ovFile, -1)->channels >= 2; _rate = ov_info(&_ovFile, -1)->rate; + +#ifdef USE_TREMOR + _length = Timestamp(ov_time_total(&_ovFile, -1), getRate()); +#else + _length = Timestamp(uint32(ov_time_total(&_ovFile, -1) * 1000.0), getRate()); +#endif } VorbisInputStream::~VorbisInputStream() { |