From 129250bfd013b6e7c8012e1214155626cce90e91 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Dec 2006 12:09:36 +0000 Subject: [PATCH] handle STREAM_LOOPED --- stepmania/src/RageSoundReader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageSoundReader.cpp b/stepmania/src/RageSoundReader.cpp index 8b1087e72d..c3cf03266c 100644 --- a/stepmania/src/RageSoundReader.cpp +++ b/stepmania/src/RageSoundReader.cpp @@ -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; }