Fix minor windows pedantic warnings.
This commit is contained in:
@@ -69,20 +69,24 @@ bool RageSoundReader_Preload::Open( RageSoundReader *pSource )
|
||||
m_Buffer.Get()->reserve( iBytes );
|
||||
}
|
||||
|
||||
while(1)
|
||||
for(;;)
|
||||
{
|
||||
/* If the rate changes, we won't preload it. */
|
||||
if( pSource->GetStreamToSourceRatio() != m_fRate )
|
||||
{
|
||||
return false; /* Don't bother trying to preload it. */
|
||||
|
||||
}
|
||||
float buffer[1024];
|
||||
int iCnt = pSource->Read( buffer, ARRAYLEN(buffer) / m_iChannels );
|
||||
|
||||
if( iCnt == END_OF_FILE )
|
||||
{
|
||||
break;
|
||||
}
|
||||
if( iCnt < 0 )
|
||||
{
|
||||
return false;
|
||||
|
||||
}
|
||||
/* Add the buffer. */
|
||||
if( m_bBufferIs16Bit )
|
||||
{
|
||||
@@ -96,7 +100,9 @@ bool RageSoundReader_Preload::Open( RageSoundReader *pSource )
|
||||
}
|
||||
|
||||
if( m_Buffer.Get()->size() > iMaxSamples * samplesize )
|
||||
{
|
||||
return false; /* too big */
|
||||
}
|
||||
}
|
||||
|
||||
m_iPosition = 0;
|
||||
|
||||
Reference in New Issue
Block a user