Return 1 from SetPosition(n) on success, 0 on seek past EOF, not
"the position seeked to". This fixes a special case: SetPosition(n) returning 0 was EOF except when SetPosition(0). The returned value on success was always n, anyway; we never seek to a different position and return success.
This commit is contained in:
@@ -679,9 +679,7 @@ int RageSoundReader_Resample_Good::SetPosition( int iFrame )
|
||||
{
|
||||
Reset();
|
||||
iFrame = (int) SCALE( iFrame, 0, (int64_t) m_iSampleRate, 0, (int64_t) m_pSource->GetSampleRate() );
|
||||
iFrame = m_pSource->SetPosition( iFrame );
|
||||
iFrame = (int) SCALE( iFrame, 0, (int64_t) m_pSource->GetSampleRate(), 0, (int64_t) m_iSampleRate );
|
||||
return iFrame;
|
||||
return m_pSource->SetPosition( iFrame );
|
||||
}
|
||||
|
||||
int RageSoundReader_Resample_Good::Read( char *pBuf_, int iFrames )
|
||||
|
||||
Reference in New Issue
Block a user