preload after resample, not before

This commit is contained in:
Glenn Maynard
2004-11-14 04:29:33 +00:00
parent c483fbbd1a
commit 6e602f89c9
+5 -4
View File
@@ -187,12 +187,13 @@ bool RageSound::Load( CString sSoundFilePath, int precache )
pSound = new RageSoundReader_Silence;
}
/* Try to precache. */
if( precache )
RageSoundReader_Preload::PreloadSound( pSound );
LoadSoundReader( pSound );
/* Try to precache. Do this after calling LoadSoundReader() to put the
* sound in this->Sample, so we preload after resampling. */
if( precache )
RageSoundReader_Preload::PreloadSound( Sample );
m_sFilePath = sSoundFilePath;
m_Mutex.SetName( ssprintf("RageSound (%s)", Basename(sSoundFilePath).c_str() ) );