simplify
This commit is contained in:
@@ -356,8 +356,7 @@ int RageSoundReader_Chain::Read( char *pBuffer, int iFrames )
|
|||||||
{
|
{
|
||||||
RageSoundReader *pSound = m_apActiveSounds[i]->pSound;
|
RageSoundReader *pSound = m_apActiveSounds[i]->pSound;
|
||||||
ASSERT( pSound->GetNumChannels() == m_iChannels ); // guaranteed by ActivateSound and Finish
|
ASSERT( pSound->GetNumChannels() == m_iChannels ); // guaranteed by ActivateSound and Finish
|
||||||
int iSamples = min( iFrames * pSound->GetNumChannels(), ARRAYLEN(Buffer) );
|
int iFramesRead = pSound->Read( (char *) Buffer, iFrames );
|
||||||
int iFramesRead = pSound->Read( (char *) Buffer, iSamples/pSound->GetNumChannels() );
|
|
||||||
if( iFramesRead < 0 )
|
if( iFramesRead < 0 )
|
||||||
{
|
{
|
||||||
ReleaseSound( m_apActiveSounds[i] );
|
ReleaseSound( m_apActiveSounds[i] );
|
||||||
|
|||||||
Reference in New Issue
Block a user