no need to manually propagate error messages
This commit is contained in:
@@ -113,9 +113,6 @@ int RageSoundReader_Extend::Read( char *pBuffer, int iFrames )
|
|||||||
return STREAM_LOOPED;
|
return STREAM_LOOPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( iFramesRead == RageSoundReader::ERROR )
|
|
||||||
this->SetError( m_pSource->GetError() );
|
|
||||||
|
|
||||||
return iFramesRead;
|
return iFramesRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ int RageSoundReader_Pan::Read( char *pBuf, int iFrames )
|
|||||||
{
|
{
|
||||||
iFrames = m_pSource->Read( pBuf, iFrames );
|
iFrames = m_pSource->Read( pBuf, iFrames );
|
||||||
if( iFrames < 0 )
|
if( iFrames < 0 )
|
||||||
{
|
|
||||||
this->SetError( m_pSource->GetError() );
|
|
||||||
return iFrames;
|
return iFrames;
|
||||||
}
|
|
||||||
|
|
||||||
int iSamples = iFrames * m_pSource->GetNumChannels();
|
int iSamples = iFrames * m_pSource->GetNumChannels();
|
||||||
|
|
||||||
|
|||||||
@@ -713,12 +713,8 @@ int RageSoundReader_Resample_Good::Read( char *pBuf_, int iFrames )
|
|||||||
int16_t *pTmpBuf = (int16_t *) alloca( iFramesNeeded * sizeof(int16_t) * iChannels );
|
int16_t *pTmpBuf = (int16_t *) alloca( iFramesNeeded * sizeof(int16_t) * iChannels );
|
||||||
ASSERT( pTmpBuf );
|
ASSERT( pTmpBuf );
|
||||||
int iFramesIn = m_pSource->Read( (char *) pTmpBuf, iFramesNeeded );
|
int iFramesIn = m_pSource->Read( (char *) pTmpBuf, iFramesNeeded );
|
||||||
|
|
||||||
if( iFramesIn < 0 )
|
if( iFramesIn < 0 )
|
||||||
{
|
|
||||||
SetError( m_pSource->GetError() );
|
|
||||||
return iFramesIn;
|
return iFramesIn;
|
||||||
}
|
|
||||||
|
|
||||||
const int iSamplesIn = iFramesIn * iChannels;
|
const int iSamplesIn = iFramesIn * iChannels;
|
||||||
|
|
||||||
|
|||||||
@@ -296,9 +296,6 @@ int RageSoundReader_ThreadedBuffer::FillBlock()
|
|||||||
|
|
||||||
m_bEOF = (iGotFrames == END_OF_FILE);
|
m_bEOF = (iGotFrames == END_OF_FILE);
|
||||||
|
|
||||||
if( iGotFrames < 0 && iGotFrames != END_OF_FILE )
|
|
||||||
SetError( m_pSource->GetError() );
|
|
||||||
|
|
||||||
return iGotFrames;
|
return iGotFrames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user