src/sgp/SoundMan.cc
static SAMPLETAG* SoundGetEmptySample(void)
{
	FOR_EACH(SAMPLETAG, i, pSampleList)
	{
		if (!(i->uiFlags & SAMPLE_ALLOCATED)) return i;
	}

	// Clean cache if no sample has been found yet and try again
	SoundCleanCache();

	FOR_EACH(SAMPLETAG, i, pSampleList)
	{
		if (!(i->uiFlags & SAMPLE_ALLOCATED)) return i;
	}

	return NULL;
}
/* Returns an available sample. Clears out other samples if necessary
 *
 * Returns: A free sample or NULL if none are left. */
Returns an available sample. Clears out other samples if necessary
Returns: A free sample or NULL if none are left.
Returns an available sample . Clears out other samples if necessary Returns : A free sample or NULL if none are left .
static SAMPLETAG* SoundGetEmptySample(void)
{
	FOR_EACH(SAMPLETAG, i, pSampleList)
	{
		if (!(i->uiFlags & SAMPLE_ALLOCATED)) return i;
	}
	SoundCleanCache();
	FOR_EACH(SAMPLETAG, i, pSampleList)
	{
		if (!(i->uiFlags & SAMPLE_ALLOCATED)) return i;
	}
	return NULL;
}
static SAMPLETAG * SoundGetEmptySample ( void ) { FOR_EACH ( SAMPLETAG , i , pSampleList ) { if ( ! ( i -> uiFlags & SAMPLE_ALLOCATED ) ) return i ; } SoundCleanCache ( ) ; FOR_EACH ( SAMPLETAG , i , pSampleList ) { if ( ! ( i -> uiFlags & SAMPLE_ALLOCATED ) ) return i ; } return NULL ; }
Returns an available sample.
Returns an available sample .
// Clean cache if no sample has been found yet and try again