[Scummvm-cvs-logs] SF.net SVN: scummvm:[47144] scummvm/trunk/sound/vorbis.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 8 00:50:19 CET 2010


Revision: 47144
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47144&view=rev
Author:   lordhoto
Date:     2010-01-07 23:50:18 +0000 (Thu, 07 Jan 2010)

Log Message:
-----------
Fix use of getRate in VorbisInputStream's constructor. (Thanks to cyx for spotting this)

Modified Paths:
--------------
    scummvm/trunk/sound/vorbis.cpp

Modified: scummvm/trunk/sound/vorbis.cpp
===================================================================
--- scummvm/trunk/sound/vorbis.cpp	2010-01-07 23:32:45 UTC (rev 47143)
+++ scummvm/trunk/sound/vorbis.cpp	2010-01-07 23:50:18 UTC (rev 47144)
@@ -131,12 +131,6 @@
 		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 @@
 	// 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() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list