Error reporting fix, seek fix.
This commit is contained in:
@@ -115,14 +115,20 @@ int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
|
|||||||
avail = 0;
|
avail = 0;
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
#if defined(INTEGER_OGG)
|
||||||
|
const int to = ms;
|
||||||
|
#else
|
||||||
|
const float to = ms/1000.0f;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( ms )
|
if( ms )
|
||||||
ret = ov_time_seek(vf, ms);
|
ret = ov_time_seek( vf, to );
|
||||||
else
|
else
|
||||||
ret = ov_raw_seek(vf, ms);
|
ret = ov_raw_seek( vf, 0 );
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
{
|
{
|
||||||
SetError( ov_ssprintf(ret, "ogg: SetPosition failed") );
|
SetError( ov_ssprintf(ret, "ogg: SetPosition failed") );
|
||||||
return false;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ms;
|
return ms;
|
||||||
|
|||||||
Reference in New Issue
Block a user