handle STREAM_LOOPED

This commit is contained in:
Glenn Maynard
2006-12-22 12:09:36 +00:00
parent 02aed7bb65
commit 129250bfd0
+4 -1
View File
@@ -5,7 +5,7 @@
REGISTER_CLASS_TRAITS( RageSoundReader, pCopy->Copy() );
/* Read(), handling the empty return case. */
/* Read(), handling the STREAM_LOOPED and empty return cases. */
int RageSoundReader::RetriedRead( char *pBuffer, int iFrames, int *iSourceFrame, float *fRate )
{
if( iFrames == 0 )
@@ -24,6 +24,9 @@ int RageSoundReader::RetriedRead( char *pBuffer, int iFrames, int *iSourceFrame,
int iGotFrames = this->Read( pBuffer, iFrames );
if( iGotFrames == RageSoundReader::STREAM_LOOPED )
iGotFrames = 0;
if( iGotFrames != 0 )
return iGotFrames;
}