Fix minor windows pedantic warnings.

This commit is contained in:
Jason Felds
2016-03-27 22:03:15 -04:00
parent 534909d30a
commit bec18a0d36
31 changed files with 173 additions and 67 deletions
+9 -3
View File
@@ -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;