change SetPosition_Accurate and SetPosition_Fast to take and return frames

This commit is contained in:
Glenn Maynard
2006-12-09 06:35:09 +00:00
parent a272414497
commit ca67a9cb7c
17 changed files with 91 additions and 90 deletions
+3 -3
View File
@@ -142,11 +142,11 @@ int RageSoundReader_Vorbisfile::GetLength_Fast() const
return GetLength();
}
int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
int RageSoundReader_Vorbisfile::SetPosition( int iFrame, bool accurate )
{
eof = false;
const ogg_int64_t sample = ogg_int64_t(ms) * GetSampleRate() / 1000;
const ogg_int64_t sample = ogg_int64_t(iFrame);
int ret = ov_pcm_seek( vf, sample );
if(ret < 0)
@@ -162,7 +162,7 @@ int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
}
read_offset = (int) ov_pcm_tell(vf);
return ms;
return iFrame;
}
int RageSoundReader_Vorbisfile::Read(char *buf, unsigned len)