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
@@ -282,24 +282,24 @@ int RageSoundReader_SpeedChange::Read( char *buf, unsigned iLen )
/* We prefer to be able to seek precisely, so seeking to a position produces data
* equal to what you'd get if you read data up to that point. This filter can't do
* that, because the exact selection of slices is dependent on the previous selection. */
int RageSoundReader_SpeedChange::SetPosition_Accurate( int iMS )
int RageSoundReader_SpeedChange::SetPosition_Accurate( int iFrame )
{
Reset();
int64_t iScaled = (int64_t(iMS) * GetWindowSizeFrames()) / m_iDeltaFrames;
iMS = (int) iScaled;
int64_t iScaled = (int64_t(iFrame) * GetWindowSizeFrames()) / m_iDeltaFrames;
iFrame = (int) iScaled;
return RageSoundReader_Filter::SetPosition_Accurate( iMS );
return RageSoundReader_Filter::SetPosition_Accurate( iFrame );
}
int RageSoundReader_SpeedChange::SetPosition_Fast( int iMS )
int RageSoundReader_SpeedChange::SetPosition_Fast( int iFrame )
{
Reset();
int64_t iScaled = (int64_t(iMS) * GetWindowSizeFrames()) / m_iDeltaFrames;
iMS = (int) iScaled;
int64_t iScaled = (int64_t(iFrame) * GetWindowSizeFrames()) / m_iDeltaFrames;
iFrame = (int) iScaled;
return RageSoundReader_Filter::SetPosition_Fast( iMS );
return RageSoundReader_Filter::SetPosition_Fast( iFrame );
}
bool RageSoundReader_SpeedChange::SetProperty( const RString &sProperty, float fValue )