return errors

This commit is contained in:
Glenn Maynard
2006-12-23 03:49:06 +00:00
parent 3faec793db
commit ce0308b234
-7
View File
@@ -272,18 +272,11 @@ int RageSound::GetData( char *pBuffer, int iFrames )
iGotFrames = m_pSource->RetriedRead( pBuffer, iFrames, &iSourceFrame, &fRate );
if( iGotFrames == RageSoundReader::ERROR )
{
Fail( m_pSource->GetError() );
/* Pretend we got EOF. */
return RageSoundReader::END_OF_FILE;
}
if( iGotFrames < 0 )
return iGotFrames;
ASSERT_M( iGotFrames >= 0, ssprintf("%i", iGotFrames) ); // unhandled error condition
if( m_pSource->GetNumChannels() == 1 )
RageSoundUtil::ConvertMonoToStereoInPlace( (int16_t *) pBuffer, iGotFrames );