Fix comm slider when using Tremor (bug #785).

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1941 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-11-01 13:00:09 +00:00
parent 5d10765ab6
commit 49a3707dd3
@@ -199,7 +199,13 @@ ova_Open (THIS_PTR, uio_DirHandle *dir, const char *filename)
} }
This->frequency = vinfo->rate; This->frequency = vinfo->rate;
#ifdef OVCODEC_TREMOR
// With tremor ov_time_total returns an integer, in milliseconds.
This->length = ((float) ov_time_total (&ova->vf, -1)) / 1000.0f;
#else
// With libvorbis ov_time_total returns a double, in seconds.
This->length = (float) ov_time_total (&ova->vf, -1); This->length = (float) ov_time_total (&ova->vf, -1);
#endif /* OVCODEC_TREMOR */
if (vinfo->channels == 1) if (vinfo->channels == 1)
This->format = ova_formats->mono16; This->format = ova_formats->mono16;