Browse Source

properly compute total time for ogg vorbis

Juan Linietsky 10 years ago
parent
commit
61ecb6a5e6
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/vorbis/audio_stream_ogg_vorbis.cpp

+ 1 - 2
drivers/vorbis/audio_stream_ogg_vorbis.cpp

@@ -289,8 +289,7 @@ Error AudioStreamPlaybackOGGVorbis::set_file(const String& p_file) {
 	const vorbis_info *vinfo=ov_info(&vf,-1);
 	const vorbis_info *vinfo=ov_info(&vf,-1);
 	stream_channels=vinfo->channels;
 	stream_channels=vinfo->channels;
 	stream_srate=vinfo->rate;
 	stream_srate=vinfo->rate;
-	ogg_int64_t len = ov_time_total(&vf,-1);
-	length=len/1000.0;
+	length = ov_time_total(&vf,-1);
 	ov_clear(&vf);
 	ov_clear(&vf);
 	memdelete(f);
 	memdelete(f);
 	f=NULL;
 	f=NULL;