Only load one Ready and HWG announcer sample because it's only played once
This commit is contained in:
@@ -29,7 +29,7 @@ RandomSample::~RandomSample()
|
||||
}
|
||||
|
||||
|
||||
bool RandomSample::LoadSoundDir( CString sDir )
|
||||
bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
|
||||
{
|
||||
if( sDir == "" )
|
||||
return true;
|
||||
@@ -55,6 +55,8 @@ bool RandomSample::LoadSoundDir( CString sDir )
|
||||
GetDirListing( sDir + "*.ogg", arraySoundFiles );
|
||||
GetDirListing( sDir + "*.wav", arraySoundFiles );
|
||||
|
||||
arraySoundFiles.resize( min( arraySoundFiles.size(), (unsigned)iMaxToLoad ) );
|
||||
|
||||
for( unsigned i=0; i<arraySoundFiles.size(); i++ )
|
||||
LoadSound( sDir + arraySoundFiles[i] );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user