Removed alloca calls from sound reader classes because putting it inside a loop tends to cause a stack overflow.
Removed alloca call from png loading because it does not work with setjmp and longjmp. png loading now uses exceptions instead when an error occurs.
This commit is contained in:
@@ -89,7 +89,7 @@ int RageSoundReader_SpeedChange::FillData( int iMaxFrames )
|
||||
if( iBytesToRead <= 0 )
|
||||
return m_iDataBufferAvailFrames;
|
||||
|
||||
float *pTempBuffer = (float *) alloca( iBytesToRead );
|
||||
float pTempBuffer[iBytesToRead/sizeof(float)];
|
||||
int iGotFrames = m_pSource->Read( pTempBuffer, iFramesToRead );
|
||||
if( iGotFrames < 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user