From a5adbb851a2a16bf7b8edc918be27faf2e46cea9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jan 2010 23:50:18 +0000 Subject: Fix use of getRate in VorbisInputStream's constructor. (Thanks to cyx for spotting this) svn-id: r47144 --- sound/vorbis.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/vorbis.cpp') 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() { -- cgit v1.2.3