src/experiments/babybot/soundlocalization/ILDBuffer.cpp
int CILDBuffer::Resize(int new_size)
{
	if (new_size < 1) return 0;
	
	delete [] pointer;
	m_size=new_size;

	actual=0;
	pointer = new LEVEL_DATA [m_size];

	if (pointer == NULL) 
			return 0;
	for (int i=0;i<m_size;i++) 	
	{
		pointer[i].ild         = 0;
		pointer[i].left_level  = 0;
		pointer[i].right_level = 0;
		pointer[i].valid       = 0;
	}

	global_valid=0;

	return 1;
}
//--------------------------------------------------------------------------------------
//       Class: CILDBuffer 
//      Method: Resize(new_size) 
// Description: Change the buffer dimension. The previous values are lost. If the dimensions
// are not valit it returns 0 
//--------------------------------------------------------------------------------------
CILDBuffer
Method: Resize(new_size)
Description: Change the buffer dimension. The previous values are lost. If the dimensions
are not valit it returns 0
CILDBuffer Method : Resize ( new_size ) Description : Change the buffer dimension . The previous values are lost . If the dimensions are not valit it returns 0
int CILDBuffer::Resize(int new_size)
{
	if (new_size < 1) return 0;
	delete [] pointer;
	m_size=new_size;
	actual=0;
	pointer = new LEVEL_DATA [m_size];
	if (pointer == NULL) 
			return 0;
	for (int i=0;i<m_size;i++) 	
	{
		pointer[i].ild         = 0;
		pointer[i].left_level  = 0;
		pointer[i].right_level = 0;
		pointer[i].valid       = 0;
	}
	global_valid=0;
	return 1;
}
int CILDBuffer :: Resize ( int new_size ) { if ( new_size < 1 ) return 0 ; delete [ ] pointer ; m_size = new_size ; actual = 0 ; pointer = new LEVEL_DATA [ m_size ] ; if ( pointer == NULL ) return 0 ; for ( int i = 0 ; i < m_size ; i ++ ) { pointer [ i ] . ild = 0 ; pointer [ i ] . left_level = 0 ; pointer [ i ] . right_level = 0 ; pointer [ i ] . valid = 0 ; } global_valid = 0 ; return 1 ; }
Class: CILDBuffer
Method: Resize(new_size)
Description: Change the buffer dimension.
Class : CILDBuffer Method : Resize ( new_size ) Description : Change the buffer dimension .