Error reporting fix, seek fix.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user