Error reporting fix, seek fix.

This commit is contained in:
Glenn Maynard
2003-09-15 01:29:02 +00:00
parent 4982aaf43e
commit 5f8a4ad60e
+9 -3
View File
@@ -115,14 +115,20 @@ int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
avail = 0;
int ret;
#if defined(INTEGER_OGG)
const int to = ms;
#else
const float to = ms/1000.0f;
#endif
if( ms )
ret = ov_time_seek(vf, ms);
ret = ov_time_seek( vf, to );
else
ret = ov_raw_seek(vf, ms);
ret = ov_raw_seek( vf, 0 );
if(ret < 0)
{
SetError( ov_ssprintf(ret, "ogg: SetPosition failed") );
return false;
return -1;
}
return ms;